summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-03-14 21:25:00 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-03-14 21:25:00 -0300
commit9873b3668085d09d729f33923481f62b50671b19 (patch)
treeadce59769372f5aa930a254145920c42ab50f87e /libre
parent2ae63c0d32343631c81107ee5d050ac0d5c3f0d9 (diff)
hplip-libre-3.14.1-2.1: removing printers not supported with free drivers from the database
Diffstat (limited to 'libre')
-rw-r--r--libre/hplip-libre/PKGBUILD26
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