Name: foomatic-db Version: 4.0 Release: 63.20210602 Summary: Database of printers and printer drivers License: GPLv2+ Mit Public Domain Url: http://www.openprinting.org Source0: http://www.openprinting.org/download/foomatic/foomatic-db-%{version}-20200414.tar.gz Patch0000: foomatic-db-device-ids.patch Patch0001: foomatic-db-invalid.patch BuildArch: noarch BuildRequires: python3-cups cups perl-interpreter sed Requires: foomatic-db-filesystem = %{version}-%{release} foomatic-db-ppds = %{version}-%{release} %description The database Foomatic contain of printers, printer drivers, and driver options. %package filesystem Summary: Directory structure for the foomatic package %description filesystem Directory structure for the foomatic package. %package ppds Summary: PPDs from printer manufacturers BuildRequires: cups Requires: cups sed foomatic-db-filesystem = %{version}-%{release} %description ppds PPDs from printer manufacturers. %prep %autosetup -n foomatic-db-20200414 -p1 find -type d | xargs chmod g-s cd db/source for i in printer/*.xml do perl -pi -e 's,>gutenprint<,>gutenprint-ijs-simplified.5.2<,' $i done find printer -name '*.xml' |xargs grep -l "splix"|xargs rm -vf rm -f driver/splix.xml for x in zjs zjs-z1 zjs-z2 zjs-z3 oak oak-z1 hp qpdl lava kyo xqx slx hiperc hiperc-z1 hbpl2 do find printer -name '*.xml' |xargs grep -l "foo2${x}"|xargs rm -vf rm -f driver/foo2${x}.xml opt/foo2${x}-* done for x in drv_x125 ml85p pbm2lwxl pbmtozjs bjc800j m2300w m2400w lm1100 pentaxpj pbm2l2030 \ pbm2l7k lex5700 lex7000 c2050 c2070 cjet do find printer -name '*.xml' |xargs grep -l "${x}"|xargs rm -vf rm -vf driver/${x}.xml opt/${x}-* done find printer -name '*.xml' |grep -E 'Samsung-CLP-610|Samsung-CLP-620'|xargs rm -vf find printer -name '*.xml' |grep -E 'KONICA_MINOLTA-magicolor_2430_DL'|xargs rm -vf rm -vf driver/ptouch.xml for PRT in `ls printer/*.xml opt/*.xml`; do nf=${PRT%.*} if [[ $nf == "printer/Brother-PT-"* ]]||[[ $nf == "printer/Brother-QL-"* ]]||[[ $nf == "opt/Brother-Ptouch-"* ]];then rm $PRT fi done cd ../.. find db/source/PPD -type f -name '*.ppd' -exec sed -i 's,perl -p,sed,g' {} + %build %configure %make_build %install %make_install find %{buildroot}%{_datadir}/foomatic/db/source/ -type f | xargs chmod 0644 install -d %{buildroot}%{_datadir}/foomatic/db/source/PPD/Custom ln -sf ../../foomatic/db/source/PPD %{buildroot}%{_datadir}/cups/model/foomatic-db-ppds %files filesystem %dir %{_datadir}/foomatic/ %dir %{_datadir}/foomatic/db/ %dir %{_datadir}/foomatic/db/source/ %dir %{_datadir}/foomatic/db/source/driver/ %dir %{_datadir}/foomatic/db/source/opt/ %dir %{_datadir}/foomatic/db/source/printer/ %dir %{_datadir}/foomatic/db/source/PPD/ %files %doc db/source/PPD/Kyocera/*.htm %doc README %{_datadir}/foomatic/db/oldprinterids %{_datadir}/foomatic/db/source/{printer,driver,opt}/* %{_datadir}/foomatic/xmlschema %exclude %{_datadir}/foomatic/db/source/driver/{bjc6000a1,PM760p,PM820p,s400a1,sharp,Stc670pl}.upp.xml %exclude %{_datadir}/foomatic/db/source/driver/{Stc670p,Stc680p,Stc760p,Stc777p,Stp720p,Stp870p}.upp.xml %exclude %{_datadir}/foomatic/db/source/PPD/Kyocera/*.htm %exclude %{_datadir}/cups/model/{3-distribution,foomatic-db-ppds} %files ppds %doc COPYING %{_datadir}/foomatic/db/source/PPD/* %{_datadir}/cups/model/foomatic-db-ppds %changelog * Wed Jun 2 2021 baizhonggui - 4.0-63.20210602 - Fix building error: /usr/bin/git: No such file or directory - %prep no longer patch with git * Wed Apr 15 2020 Jeffery.Gao - 4.0-61.20180228 - Package init.