Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD

By: a guest on Dec 13th, 2010  |  syntax: None  |  size: 1.79 KB  |  views: 332  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. _appname=wicd
  2. _suffix=-bzr
  3. pkgname=${_appname}${_suffix}
  4. pkgver=565
  5. pkgrel=1
  6. pkgdesc="New and alternative wireless/wired network management utility - no gtk gui."
  7. arch=('any')
  8. url="http://wicd.sourceforge.net/"
  9. license=('GPL2')
  10. depends=('python2' 'dbus-python' 'dhcpcd' 'wpa_supplicant' 'wireless_tools' 'ethtool' 'python-urwid' 'consolekit' 'pygobject')
  11. optdepends=('python-wpactrl:    needed if you want to use the new experimental ioctrl backend'
  12.             'python-iwscan:     needed if you want to use the new experimental ioctrl backend')
  13.  
  14. replaces=('wicd' 'wicd-bzr')
  15. provides=('wicd')
  16. install=${_appname}.install
  17. source=(wicd-daemon)
  18. options=('emptydirs')
  19. backup=('etc/wicd/encryption/templates/active')
  20. md5sums=('f40e5f59998d0829707a7c9976afa8f8')
  21. _bzrtrunk=lp:wicd
  22. _bzrmod=wicd
  23.  
  24. build() {
  25.   cd ${srcdir}
  26.  
  27.   msg "Connecting to the server...."
  28.  
  29.   bzr branch ${_bzrtrunk} -q -r ${pkgver}
  30.  
  31.   msg "BZR checkout done or server timeout"
  32.   msg "Starting make..."
  33.  
  34.   [ -d ./${_bzrmod}-build ] && rm -rf ./${_bzrmod}-build
  35.   cp -r ./${_bzrmod} ./${_bzrmod}-build
  36.   cd ./${_bzrmod}-build
  37.  
  38.  
  39.  
  40. #  find . -type f -exec sed -i 's@#!/usr.*python@#!/usr/bin/python2@' {} \;
  41. #  export PYTHON=python2
  42.   python2 setup.py configure --no-install-init \
  43.                             --resume=/usr/share/wicd/scripts/ \
  44.                             --suspend=/usr/share/wicd/scripts/ \
  45.                             --verbose \
  46.                             --python=/usr/bin/python2
  47. }
  48.  
  49. package() {
  50.   cd ${srcdir}/${_bzrmod}-build
  51.   python2 setup.py install --root=$pkgdir
  52.  
  53.   # Add custom rc.d script
  54.   install -Dm755 $srcdir/wicd-daemon $pkgdir/etc/rc.d/wicd
  55.  
  56.   cd build/lib/wicd
  57.   for i in *.py; do
  58.     install -Dm 755 $i ${pkgdir}/usr/lib/wicd/$i
  59.   done
  60.  
  61.   rm -rf ${pkgdir}/usr/share/autostart
  62. }
clone this paste RAW Paste Data