updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / wicd-nogtk-bzr / PKGBUILD
blobb8368af5e23dcb216124067846273c7b756d6e19
2 _appname=wicd
3 _suffix=-nogtk-bzr
4 pkgname=${_appname}${_suffix}
5 pkgver=565
6 pkgrel=1
7 pkgdesc="New and alternative wireless/wired network management utility - no gtk gui."
8 arch=('any')
9 url="http://wicd.sourceforge.net/"
10 license=('GPL2')
11 depends=('python2' 'dbus-python' 'dhcpcd' 'wpa_supplicant' 'wireless_tools' 'ethtool' 'python-urwid' 'consolekit' 'pygobject')
12 optdepends=('python-wpactrl:    needed if you want to use the new experimental ioctrl backend'
13             'python-iwscan:     needed if you want to use the new experimental ioctrl backend')
15 replaces=('wicd' 'wicd-nogtk')
16 provides=('wicd-nogtk') # or part of it anyway
17 install=${_appname}.install
18 source=(wicd-daemon)
19 options=('emptydirs')
20 backup=('etc/wicd/encryption/templates/active')
21 md5sums=('f40e5f59998d0829707a7c9976afa8f8')
22 _bzrtrunk=lp:wicd
23 _bzrmod=wicd
25 build() {
26   cd ${srcdir}
28   msg "Connecting to the server...."
30   bzr branch ${_bzrtrunk} -q -r ${pkgver}
32   msg "BZR checkout done or server timeout"
33   msg "Starting make..."
35   [ -d ./${_bzrmod}-build ] && rm -rf ./${_bzrmod}-build
36   cp -r ./${_bzrmod} ./${_bzrmod}-build
37   cd ./${_bzrmod}-build
39   
41 #  find . -type f -exec sed -i 's@#!/usr.*python@#!/usr/bin/python2@' {} \;
42 #  export PYTHON=python2
43   python2 setup.py configure --no-install-init \
44                             --resume=/usr/share/wicd/scripts/ \
45                             --suspend=/usr/share/wicd/scripts/ \
46                             --verbose \
47                             --python=/usr/bin/python2 \
48                             --no-install-gtk \
49                             --no-use-notifications
52 package() {
53   cd ${srcdir}/${_bzrmod}-build
54   python2 setup.py install --root=$pkgdir
56   # Add custom rc.d script
57   install -Dm755 $srcdir/wicd-daemon $pkgdir/etc/rc.d/wicd
59   cd build/lib/wicd
60   for i in *.py; do
61     install -Dm 755 $i ${pkgdir}/usr/lib/wicd/$i
62   done
63   
64   rm -rf ${pkgdir}/usr/share/autostart