Guest User

Untitled

a guest
May 16th, 2011
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.26 KB | None | 0 0
  1. # $Id: PKGBUILD 116953 2011-03-26 16:48:46Z tpowa $
  2. # Maintainer : Tobias Powalowski <[email protected]>
  3. # Contributor: Morgan LEFIEUX <[email protected]>
  4.  
  5. pkgname=hplip
  6. pkgver=3.11.5
  7. pkgrel=1
  8. pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet"
  9. arch=('i686' 'x86_64')
  10. url="http://hplipopensource.com"
  11. license=('GPL')
  12. makedepends=('python2-qt' 'pygobject' 'pkgconfig' 'sane' 'rpcbind' 'cups')
  13. depends=('python2' 'ghostscript>=8.64-6' 'foomatic-db' 'foomatic-db-engine'
  14.     'libcups>=1.3.10-3' 'net-snmp>=5.6.1' 'libusb-compat')
  15. optdepends=('cups: for printing support'
  16.             'dbus-python: for dbus support'
  17.             'sane: for scanner support'
  18.             'python-imaging: for commandline scanning support'
  19.             'python-notify: for Desktop notification support'
  20.             'rpcbind: for network support'
  21.             'python2-qt: for running hp-toolbox'
  22.             'pygobject: for running hp-toolbox')
  23. replaces=('hpijs')
  24. options=('!libtool')
  25. install=hplip.install
  26. source=(http://downloads.sourceforge.net/${pkgname}/$pkgname-$pkgver.tar.gz)
  27.  
  28. build() {
  29.  cd "$srcdir/$pkgname-$pkgver"
  30.  find . -type f -exec sed -i 's~^#.*env python~#!/usr/bin/env python2~' {} +
  31.  export PYTHON=`which python2`
  32.  ./configure --prefix=/usr \
  33.              --enable-qt4 \
  34.              --enable-foomatic-rip-hplip-install \
  35.              --enable-foomatic-ppd-install \
  36.              --enable-hpcups-install \
  37.              --enable-cups-drv-install \
  38.              --enable-hpijs-install \
  39.              --enable-foomatic-drv-install \
  40.              --enable-pp-build \
  41.              --enable-udev-acl-rules
  42.  
  43.  make
  44. }
  45.  
  46. package() {
  47.  cd "$srcdir/$pkgname-$pkgver"
  48.  make DESTDIR="$pkgdir/" install
  49.  
  50.  rm -rf "$pkgdir/etc/sane.d"
  51.  # remove autostart of hp-daemon
  52.  rm -r "$pkgdir/etc/xdg"
  53.  # move udev rules to /lib/udev/rules.d
  54.  mkdir -p "$pkgdir/lib/udev/rules.d"
  55.  mv "$pkgdir"/etc/udev/rules.d/* "$pkgdir/lib/udev/rules.d/"
  56.  rm -r "$pkgdir/etc/udev"
  57.  # remove lp user, it's not used on archlinux
  58.  sed -i 's|OWNER="lp", ||g' "$pkgdir/lib/udev/rules.d/40-hplip.rules"
  59.  # fix sysfs rules
  60.  sed -i -e "s|SYSFS|ATTRS|g" -e "s|sysfs|attrs|g" "$pkgdir/lib/udev/rules.d/56-hpmud_support.rules"
  61. }
  62. md5sums=('0a3d0f46ec89857b4c0feea6923864f1')
Advertisement
Add Comment
Please, Sign In to add comment