SHARE
TWEET

Untitled

a guest Oct 20th, 2015 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         # Contributor: Johannes Dewender  arch at JonnyJD dot net
  2. pkgname=python2-ethtool
  3. _pkgname=python-ethtool
  4. pkgver=0.11
  5. pkgrel=1
  6. pkgdesc="python bindings for the ethtool kernel interface"
  7. arch=('i686' 'x86_64')
  8. url="https://fedorahosted.org/python-ethtool/"
  9. license=('GPL2')
  10. groups=()
  11. depends=('python2' 'libnl')
  12. makedepends=('asciidoc')
  13. provides=()
  14. conflicts=()
  15. replaces=()
  16. backup=()
  17. options=(!emptydirs)
  18. install=
  19. source=("https://fedorahosted.org/releases/p/y/$_pkgname/$_pkgname-$pkgver.tar.bz2"
  20. "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;att=1;filename=gcc5.patch;bug=797250")
  21. sha256sums=('686756e4b2b239319e8513025debcc0d97103815b0879f94d8234cbbca6ada24'
  22. 'e8a904b4f13a9cf4c9b04d1e208050e4d6ce7828b56dfd60412f85b86caa5359')
  23.  
  24. build() {
  25.   cd "$srcdir"
  26.   patch -p0 < "bugreport.cgi?msg=15;att=1;filename=gcc5.patch;bug=797250"
  27.   cd "$_pkgname-$pkgver"
  28.   python2 setup.py build
  29.  
  30.   a2x -d manpage -f manpage man/pethtool.8.asciidoc
  31.   a2x -d manpage -f manpage man/pifconfig.8.asciidoc
  32.   gzip --stdout man/pethtool.8 > "man/pethtool.8.gz"
  33.   gzip --stdout man/pifconfig.8 > "man/pifconfig.8.gz"
  34. }
  35.  
  36. package() {
  37.   cd "$srcdir/$_pkgname-$pkgver"
  38.   python2 setup.py install --skip-build --root="$pkgdir/" --optimize=1
  39.  
  40.   install -d "$pkgdir/usr/bin"
  41.   install -m 0755 pethtool.py "$pkgdir/usr/bin/pethtool"
  42.   sed -i '1s/python/python2/' "$pkgdir/usr/bin/pethtool"
  43.   install -m 0755 pifconfig.py "$pkgdir/usr/bin/pifconfig"
  44.   sed -i '1s/python/python2/' "$pkgdir/usr/bin/pifconfig"
  45.  
  46.   install -d "$pkgdir/usr/share/man/man8"
  47.   install -m 644 man/pethtool.8.gz "$pkgdir/usr/share/man/man8/"
  48.   install -m 644 man/pifconfig.8.gz "$pkgdir/usr/share/man/man8/"
  49. }
  50.  
  51. # vim:set ts=2 sw=2 et:
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top