2011-05-26 12:30:53 +08:00
|
|
|
# Platform Packages for Chakra, part of chakra-project.org
|
|
|
|
#
|
2012-06-14 09:20:45 +08:00
|
|
|
# maintainer abveritas@chakra-project.org
|
2010-06-01 05:26:29 +08:00
|
|
|
|
|
|
|
pkgname=hplip
|
2012-11-29 03:33:01 +08:00
|
|
|
pkgver=3.12.11
|
|
|
|
# incase a or b is used in hplip rls:
|
|
|
|
_pkgver=3.12.11
|
2012-10-03 04:52:04 +08:00
|
|
|
pkgrel=1
|
2010-06-01 05:26:29 +08:00
|
|
|
pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet."
|
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
url="http://hplipopensource.com"
|
|
|
|
license=('GPL')
|
2012-11-29 03:33:01 +08:00
|
|
|
makedepends=('pyqt' 'python2-gobject' 'pkgconfig' 'sane' 'rpcbind' 'dbus-python' 'cups')
|
2010-12-19 09:06:53 +08:00
|
|
|
depends=('python2' 'ghostscript>=8.64-6' 'foomatic-db' 'foomatic-db-engine'
|
2012-02-16 11:42:33 +08:00
|
|
|
'libcups' 'net-snmp>=5.5' 'libusb-compat')
|
2010-06-01 05:26:29 +08:00
|
|
|
optdepends=('cups: for printing support'
|
|
|
|
'dbus-python: for dbus support'
|
|
|
|
'sane: for scanner support'
|
|
|
|
'rpcbind: for network support'
|
|
|
|
'pyqt: for running hp-toolbox'
|
2012-11-29 03:33:01 +08:00
|
|
|
'python2-gobject: for running hp-toolbox')
|
2012-10-03 04:52:04 +08:00
|
|
|
options=('!libtool')
|
|
|
|
install=${pkgname}.install
|
2012-10-27 06:58:47 +08:00
|
|
|
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${_pkgver}.tar.gz"
|
2012-10-03 04:52:04 +08:00
|
|
|
"cups-1.6-buildfix.diff")
|
2012-11-29 03:33:01 +08:00
|
|
|
sha256sums=('c5b81167b21aa4ee6bdf3f5c120bfa050d0c794608da8bcc32e2580234919ffa'
|
2012-10-03 04:52:04 +08:00
|
|
|
'9813f754670f9b4a01e6094c673f63ac62421817c7eb463999abf828358e67df')
|
2010-06-01 05:26:29 +08:00
|
|
|
|
|
|
|
build() {
|
2012-10-27 06:58:47 +08:00
|
|
|
cd "${srcdir}/${pkgname}-${_pkgver}"
|
2012-10-03 04:52:04 +08:00
|
|
|
|
|
|
|
# fix build with cups 1.6 - FC hplip-ipp-accessors.patch
|
2012-10-27 06:58:47 +08:00
|
|
|
patch -p1 -i ${srcdir}/cups-1.6-buildfix.diff
|
2011-12-21 04:18:58 +08:00
|
|
|
|
2012-10-03 04:52:04 +08:00
|
|
|
export PYTHON=python2
|
|
|
|
find . -type f -exec sed -i 's~^#.*env python~#!/usr/bin/env python2~' {} +
|
|
|
|
sed -i '1s|#!/usr/bin/python|#!/usr/bin/python2|' setup.py makeuri.py logcapture.py base/magic.py
|
|
|
|
sed -i '1s|#!/usr/bin/python|#!/usr/bin/python2|' ui/upgradeform.py uninstall.py upgrade.py config_usb_printer.py
|
|
|
|
sed -i 's|python ./print.py|python2 ./print.py|' scan.py
|
|
|
|
sed -i 's|python ./testpage.py|python2 ./testpage.py|' setup.py
|
|
|
|
sed -i 's|python ./setup.py|python2 ./setup.py|' ui4/devmgr5.py ui4/nodevicesdialog.py
|
|
|
|
sed -i 's|python %HOME%|python2 %HOME%|' base/utils.py
|
|
|
|
sed -i 's|python ./plugin.py|python2 ./plugin.py|' base/pkit.py
|
2011-12-21 04:18:58 +08:00
|
|
|
|
2012-11-29 03:33:01 +08:00
|
|
|
# from Gentoo
|
2012-10-03 04:52:04 +08:00
|
|
|
# Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
|
|
|
|
local i
|
|
|
|
for i in ppd/hpijs/*.ppd.gz ; do
|
|
|
|
rm -f ${i}.temp
|
|
|
|
gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
|
|
|
|
gzip > ${i}.temp || return 1
|
|
|
|
mv ${i}.temp ${i}
|
|
|
|
done
|
|
|
|
|
|
|
|
export AUTOMAKE='automake --foreign'
|
|
|
|
autoreconf --force --install
|
2011-12-21 04:18:58 +08:00
|
|
|
|
|
|
|
./configure --prefix=/usr \
|
2010-06-01 05:26:29 +08:00
|
|
|
--enable-qt4 \
|
2012-10-27 06:58:47 +08:00
|
|
|
--disable-foomatic-rip-hplip-install \
|
2010-06-01 05:26:29 +08:00
|
|
|
--enable-foomatic-ppd-install \
|
|
|
|
--enable-hpcups-install \
|
2011-12-21 04:18:58 +08:00
|
|
|
--enable-new-hpcups \
|
|
|
|
--enable-cups-ppd-install \
|
2010-06-01 05:26:29 +08:00
|
|
|
--enable-cups-drv-install \
|
|
|
|
--enable-hpijs-install \
|
|
|
|
--enable-foomatic-drv-install \
|
2011-03-19 04:46:12 +08:00
|
|
|
--enable-pp-build \
|
2010-06-01 05:26:29 +08:00
|
|
|
--enable-udev-acl-rules
|
2012-10-03 04:52:04 +08:00
|
|
|
make
|
2010-06-01 05:26:29 +08:00
|
|
|
}
|
2011-12-21 04:18:58 +08:00
|
|
|
|
|
|
|
package() {
|
2012-10-27 06:58:47 +08:00
|
|
|
cd "${srcdir}/${pkgname}-${_pkgver}"
|
2011-12-21 04:18:58 +08:00
|
|
|
|
2012-10-03 04:52:04 +08:00
|
|
|
make rulesdir=/lib/udev/rules.d DESTDIR="${pkgdir}/" install
|
2011-12-21 04:18:58 +08:00
|
|
|
|
2012-10-03 04:52:04 +08:00
|
|
|
# remove config provided by sane and autostart of hp-daemon
|
|
|
|
rm -rf "${pkgdir}"/etc/{sane.d,xdg}
|
|
|
|
|
|
|
|
# remove HAL .fdi file because HAL is no longer used
|
|
|
|
rm -rf "${pkgdir}"/usr/share/hal
|
|
|
|
}
|