71 lines
2.3 KiB
Bash
71 lines
2.3 KiB
Bash
#!/bin/sh
|
|
#
|
|
# Copyright (C) 2011 MPA
|
|
# Copyright (C) 2013-2021 Ruben Rodriguez <ruben@trisquel.info>
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
#
|
|
|
|
VERSION=1
|
|
|
|
# note, we need version 3.20.6 or higher, the binary plugin requirement
|
|
# was reworked on that version.
|
|
|
|
EXTERNAL='deb-src http://archive.ubuntu.com/ubuntu hirsute main universe'
|
|
REPOKEY=871920D1991BC93C
|
|
QUILT=skip
|
|
|
|
. ./config
|
|
|
|
sed '/debhelper-compat/s/13/12/' -i debian/control
|
|
|
|
# This is somehow missing from the source tarball, fetched from Debian git
|
|
cp $DATA/Common.h .
|
|
|
|
rm debian/patches/*-Fix-building-with-Python-3.8.patch
|
|
sed -i '/Fix-building-with-Python-3.8/d' debian/patches/series
|
|
rm debian/patches/*-Install-check-plugin.py-as-a-script.patch
|
|
sed -i '/Install-check-plugin.py-as-a-script.patch/d' debian/patches/series
|
|
sed '/plugin/d' -i debian/hplip-gui.manpages debian/hplip.manpages debian/hplip-gui.install debian/hplip.install
|
|
|
|
export QUILT_PATCHES=debian/patches
|
|
quilt push -a
|
|
|
|
echo Removing printers not supported with free drivers from the database
|
|
tmp=`mktemp`
|
|
output=`mktemp`
|
|
printers='data/models/models.dat'
|
|
|
|
# Keep header license
|
|
sed '/\[/,99999d' $printers > $output
|
|
|
|
for model in $(grep '\[' $printers | /bin/sed 's/\[//; s/\]//'); do
|
|
sed -n "/\[$model\]/,/^$/p;" $printers > $tmp
|
|
grep '^download=True' -q $tmp && continue
|
|
grep '^plugin=1' -q $tmp && continue
|
|
grep '^support-type=0' -q $tmp && continue
|
|
cat $tmp >> $output
|
|
done
|
|
|
|
cp $output $printers
|
|
|
|
# Set plugin-optional entries to not-required
|
|
/bin/sed -i 's/plugin=2/plugin=0/g' $printers debian/patches/*
|
|
|
|
rm $tmp $tmp2
|
|
|
|
changelog "Removed printers with propietary drivers"
|
|
|
|
compile
|