diff options
Diffstat (limited to 'libre/hplip-libre/PKGBUILD')
-rw-r--r-- | libre/hplip-libre/PKGBUILD | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/libre/hplip-libre/PKGBUILD b/libre/hplip-libre/PKGBUILD index 77d324667..b39575e9c 100644 --- a/libre/hplip-libre/PKGBUILD +++ b/libre/hplip-libre/PKGBUILD @@ -7,8 +7,8 @@ _pkgname=hplip pkgname=hplip-libre pkgver=3.14.1 -pkgrel=2 -pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet, without hplip-plugin binary blobs recommendation (Parabola rebranded)" +pkgrel=2.1 +pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet, without printers with nonfree drivers support and hplip-plugin binary blobs recommendation (Parabola rebranded)" arch=('i686' 'x86_64') url="http://hplipopensource.com" license=('GPL') @@ -37,6 +37,28 @@ md5sums=('11eb45f3d3edf1f03887fd13afc61b51' prepare() { cd $_pkgname-$pkgver + + echo "Removing printers not supported with free drivers from the database" + + # based on http://devel.trisquel.info/gitweb/?p=package-helpers.git;a=blob_plain;f=helpers/make-hplip;hb=refs/heads/toutatis revision 4 + # keep header license + sed '/\[/,99999d' data/models/models.dat > mktemp + + for model in $(grep '\[' data/models/models.dat | /bin/sed 's/\[//; s/\]//'); do + sed -n "/\[$model\]/,/^$/p;" data/models/models.dat > mktemp1 + grep '^download=True' -q mktemp1 && continue + grep '^plugin=1' -q mktemp1 && continue + grep '^support-type=0' -q mktemp1 && continue + cat mktemp1 >> mktemp + done + + sed -i 's/plugin=2/plugin=0/g' mktemp + + cp mktemp data/models/models.dat + + rm -v mktemp{,1} + + echo "Preparing source" export PYTHON=python2 |