updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / hda-jack-retask-bzr / PKGBUILD
bloba60caf473efa26244d4b2db8b417113fdb5609d9
1 # Maintainer: Julien Nicoulaud <julien.nicoulaud@gmail.com>
2 # Source: https://github.com/nicoulaj/archlinux-packages
3 pkgname=hda-jack-retask-bzr
4 _pkgname=hda-jack-retask
5 pkgver=9
6 pkgrel=1
7 pkgdesc="Retask your jack plugs (eg. turn your microphone jack plug into a headphone one)."
8 arch=(x86 x86_64)
9 url="https://code.launchpad.net/~diwic/+junk/hda-jack-retask"
10 license=(GPL2)
11 depends=(gtk3 desktop-file-utils)
12 makedepends=(bzr)
13 changelog=Changelog
14 install=${pkgname}.install
16 _bzrtrunk="https://code.launchpad.net/~diwic/+junk/hda-jack-retask"
17 _bzrmod="hda-jack-retask"
19 build() {
20   cd "${srcdir}"
21   
22   msg2 "Connecting to Bazaar server and checking out..."
23   if [ -d ${_bzrmod} ] ; then
24         cd ${_bzrmod} && bzr --no-plugins pull ${_bzrtrunk} -q -r ${pkgver}
25         msg2 "Local files are up to date."
26   else
27         bzr --no-plugins branch ${_bzrtrunk} ${_bzrmod} -q -r ${pkgver}
28   fi
29   msg2 "Bazaar checkout done or server timeout."
31   msg2 "Building..."
32   cd "${srcdir}/${_bzrmod}"
33   make || return 1
35   msg2 "Generate desktop application entry..."
36   cat > "${srcdir}"/${_pkgname}.desktop << EOF
37 [Desktop Entry]
38 Name=HDA jack retask
39 Comment=${pkgdesc}
40 Exec=/usr/bin/hda-jack-retask
41 Terminal=false
42 Icon=applications-system
43 Type=Application
44 Categories=Settings;HardwareSettings;
45 EOF
48 package() {
49   msg2 "Installing..."
50   cd "${srcdir}/${_bzrmod}"
51   make install DESTDIR="${pkgdir}"
53   msg2 "Install desktop application entry in /usr/share/applications..."
54   install -Dm644 "${srcdir}"/${_pkgname}.desktop "${pkgdir}"/usr/share/applications/${_pkgname}.desktop