# $Id: PKGBUILD 31086 2009-03-24 09:38:40Z eric $ # Maintainer : Tobias Powalowski pkgname=hpoj pkgver=0.91 pkgrel=13 pkgdesc="Hewlett-Packard OfficeJet, PSC, LaserJet, and PhotoSmart printer multi-function peripherals (MFPs) drivers" arch=('i686' 'x86_64') url="http://hpoj.sourceforge.net" license=('GPL' 'custom') depends=('perl' 'libusb' 'net-snmp>=5.4' 'hplip>=1.7.2') makedepends=('qt3') optdepends=('qt3: for using xojpanel') install=hpoj.install source=(http://downloads.sourceforge.net/sourceforge/hpoj/$pkgname-$pkgver.tgz \ hpoj-gcc4.patch hpoj-kernel26.patch hpoj-pack.patch snmp_api.h \ hpoj_gcc43.diff net-snmp-header-fix.patch) md5sums=('0e083aeab9b00495aa433fa9465456e0' '347bb155c5dde443a93d92d8e64579a2'\ '18481d3dcf6e9cadf0a3d196ee164e37' '1c3b99f1a2178675d56ece29daba0fd7'\ 'a3c23abaee2c5aafcc33b3944dcb1b72' '42bb57791cacf83e4d339e3653ad003e'\ 'e78f16dc75b95dabc0c845526aa6d87b') build() { cd $startdir/src/$pkgname-$pkgver # adding various patches patch -Np1 -i ../hpoj-gcc4.patch || return 1 patch -Np1 -i ../hpoj-kernel26.patch || return 1 patch -Np1 -i ../hpoj-pack.patch || return 1 patch -Np1 -i ../hpoj_gcc43.diff || return 1 cp $startdir/src/snmp_api.h $startdir/src/$pkgname-$pkgver/lib/ptal/ cd $startdir/src/$pkgname-$pkgver/lib/ptal patch -Np0 -i ../../../net-snmp-header-fix.patch || return 1 cd $startdir/src/$pkgname-$pkgver/ ./configure --prefix=/usr || return 1 make || return 1 make prefix=$startdir/pkg/usr/ user_install || return 1 mkdir -p $startdir/pkg/etc/rc.d mkdir -p $startdir/pkg/usr/lib/sane mkdir -p $startdir/pkg/usr/lib/cups/backend install -m 644 lib/sane/libsane-hpoj.so.1.0 $startdir/pkg/usr/lib/sane install -D -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE install -D -m644 LICENSE.OpenSSL $pkgdir/usr/share/licenses/$pkgname/LICENSE.OpenSSL cd $startdir/pkg/usr/lib/sane ln -s libsane-hpoj.so.1.0 libsane-hpoj.so ln -s libsane-hpoj.so.1.0 libsane-hpoj.so.1 ln -s /usr/sbin/ptal-init $startdir/pkg/etc/rc.d ln -s /usr/sbin/ptal-cups $startdir/pkg/usr/lib/cups/backend/ptal }