diff --git a/foomatic-db-4.0-20200414.tar.gz b/foomatic-db-4.0-20200414.tar.gz new file mode 100644 index 0000000..2a7c096 Binary files /dev/null and b/foomatic-db-4.0-20200414.tar.gz differ diff --git a/foomatic-db-device-ids.patch b/foomatic-db-device-ids.patch new file mode 100644 index 0000000..b1c3bfd --- /dev/null +++ b/foomatic-db-device-ids.patch @@ -0,0 +1,110 @@ +diff -up foomatic-db-20120103/db/source/PPD/Brother/BR8840_2_GPL.ppd.device-ids-20120103 foomatic-db-20120103/db/source/PPD/Brother/BR8840_2_GPL.ppd +--- foomatic-db-20120103/db/source/PPD/Brother/BR8840_2_GPL.ppd.device-ids-20120103 2012-01-03 00:40:44.000000000 +0000 ++++ foomatic-db-20120103/db/source/PPD/Brother/BR8840_2_GPL.ppd 2012-02-24 09:33:37.047452635 +0000 +@@ -32,6 +32,7 @@ + *ShortNickName: "Brother MFC-8840D BR-Script3" + *ModelName: "Brother MFC-8840D BR-Script3" + *NickName: "Brother MFC-8840D BR-Script3" ++*1284DeviceID: "MFG:Brother;MDL:MFC-8840D;CMD:HBP,PJL,PCL,PCLXL;" + + *%==== Basic Device Capabilities ============= + *LanguageLevel: "3" +diff -up foomatic-db-20120103/db/source/PPD/Lexmark/Lexmark_C543.ppd.device-ids-20120103 foomatic-db-20120103/db/source/PPD/Lexmark/Lexmark_C543.ppd +--- foomatic-db-20120103/db/source/PPD/Lexmark/Lexmark_C543.ppd.device-ids-20120103 2012-01-03 00:40:44.000000000 +0000 ++++ foomatic-db-20120103/db/source/PPD/Lexmark/Lexmark_C543.ppd 2012-02-24 09:33:37.049452637 +0000 +@@ -62,7 +62,7 @@ + *LXCountPIN: "4" + *LXlowPINchar: "0" + *LXhiPINchar: "9" +-*1284DeviceID: "MFG: Lexmark;MDL: Lexmark C543" ++*1284DeviceID: "MFG:Lexmark International;MDL:Lexmark C543;" + *FreeVM: "252000000" + *VMOption 256Meg: "252000000" + *VMOption 320Meg: "312000000" +diff -up foomatic-db-20120103/db/source/printer/Brother-MFC-8840D.xml.device-ids-20120103 foomatic-db-20120103/db/source/printer/Brother-MFC-8840D.xml +--- foomatic-db-20120103/db/source/printer/Brother-MFC-8840D.xml.device-ids-20120103 2012-02-24 09:33:36.314452298 +0000 ++++ foomatic-db-20120103/db/source/printer/Brother-MFC-8840D.xml 2012-02-24 09:33:37.051452638 +0000 +@@ -15,7 +15,7 @@ + + + +- MFG:Brother;MDL:Brother MFC-8840D; ++ MFG:Brother;MDL:MFC-8840D;CMD:HBP,PJL,PCL,PCLXL; + Brother + Brother MFC-8840D + +diff -up foomatic-db-20120103/db/source/printer/HP-DeskJet_720C.xml.device-ids-20120103 foomatic-db-20120103/db/source/printer/HP-DeskJet_720C.xml +--- foomatic-db-20120103/db/source/printer/HP-DeskJet_720C.xml.device-ids-20120103 2012-02-24 09:33:36.401452339 +0000 ++++ foomatic-db-20120103/db/source/printer/HP-DeskJet_720C.xml 2012-02-24 09:33:37.087452655 +0000 +@@ -20,7 +20,7 @@ + SCP,VLINK + Hewlett-Packard DeskJet 720 Series + HEWLETT-PACKARD +- DESKJET 720 ++ DESKJET 720C + + + A +diff -up foomatic-db-20120103/db/source/printer/HP-LaserJet_M1522nf_MFP.xml.device-ids-20120103 foomatic-db-20120103/db/source/printer/HP-LaserJet_M1522nf_MFP.xml +--- foomatic-db-20120103/db/source/printer/HP-LaserJet_M1522nf_MFP.xml.device-ids-20120103 2012-02-24 09:33:36.411452343 +0000 ++++ foomatic-db-20120103/db/source/printer/HP-LaserJet_M1522nf_MFP.xml 2012-02-24 09:33:37.089452655 +0000 +@@ -13,6 +13,13 @@ + + + ++ ++ ++ PJL,PML,PCLXL,POSTSCRIPT,PCL ++ Hewlett-Packard ++ HP LaserJet MFP M1522nf MFP ++ ++ + D + pxlmono + +diff -up foomatic-db-20120103/db/source/printer/Kyocera-FS-1118MFP.xml.device-ids-20120103 foomatic-db-20120103/db/source/printer/Kyocera-FS-1118MFP.xml +--- foomatic-db-20120103/db/source/printer/Kyocera-FS-1118MFP.xml.device-ids-20120103 2012-02-24 09:34:34.375478948 +0000 ++++ foomatic-db-20120103/db/source/printer/Kyocera-FS-1118MFP.xml 2012-02-24 09:41:52.635757050 +0000 +@@ -19,10 +19,10 @@ + + + +- MFG:Kyocera;MODEL:Kyocera FS-1118MFP;COMMAND SET: POSTSCRIPT,PJL,PCL +- POSTSCRIPT,PJL,PCL ++ MFG:Kyocera;MODEL:FS-1118MFP;CMD:PCLXL,PostScript Emulation,PCL5E,PJL; ++ CMD:PCLXL,PostScript Emulation,PCL5E,PJL + Kyocera +- Kyocera FS-1118MFP ++ FS-1118MFP + + + A +diff -up foomatic-db-20120103/db/source/printer/Lexmark-C543.xml.device-ids-20120103 foomatic-db-20120103/db/source/printer/Lexmark-C543.xml +--- foomatic-db-20120103/db/source/printer/Lexmark-C543.xml.device-ids-20120103 2012-02-24 09:33:36.463452367 +0000 ++++ foomatic-db-20120103/db/source/printer/Lexmark-C543.xml 2012-02-24 09:33:37.090452655 +0000 +@@ -15,7 +15,7 @@ + + + +- MFG: Lexmark;MDL: Lexmark C543 ++ MFG:Lexmark International;MDL:Lexmark C543; + Lexmark + Lexmark C543 + +diff -up foomatic-db-20130911/db/source/printer/Brother-HL-2040.xml.device-ids foomatic-db-20130911/db/source/printer/Brother-HL-2040.xml +--- foomatic-db-20130911/db/source/printer/Brother-HL-2040.xml.device-ids 2013-09-11 15:55:21.853642637 +0200 ++++ foomatic-db-20130911/db/source/printer/Brother-HL-2040.xml 2013-09-11 15:53:30.775176972 +0200 +@@ -15,6 +15,13 @@ + + + ++ ++ ++ MFG:Brother;MDL:HL-2040 series;CMD:PJL,HBP; ++ Brother ++ Brother HL-2040 series ++ ++ + B + hl1250 + diff --git a/foomatic-db-invalid.patch b/foomatic-db-invalid.patch new file mode 100644 index 0000000..ecfe200 --- /dev/null +++ b/foomatic-db-invalid.patch @@ -0,0 +1,23 @@ +diff -up foomatic-db-20131218/db/source/driver/Postscript.xml.orig foomatic-db-20131218/db/source/driver/Postscript.xml +--- foomatic-db-20131218/db/source/driver/Postscript.xml.orig 2013-12-18 01:41:18.000000000 +0100 ++++ foomatic-db-20131218/db/source/driver/Postscript.xml 2013-12-18 15:09:08.471674405 +0100 +@@ -358,9 +358,6 @@ + printer/HP-Business_Inkjet_3000 + + +- printer/HP-Business_Inkjet_9100 +- +- + printer/HP-Color_LaserJet_2500 + + +@@ -1066,9 +1063,6 @@ + printer/Oce-3155PS + + +- printer/Oce-3165 +- +- + printer/Oce-3165PS + + diff --git a/foomatic-db.spec b/foomatic-db.spec new file mode 100644 index 0000000..222a875 --- /dev/null +++ b/foomatic-db.spec @@ -0,0 +1,107 @@ +Name: foomatic-db +Version: 4.0 +Release: 62.20200414 +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 -S git +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 Apr 15 2020 Jeffery.Gao - 4.0-61.20180228 +- Package init. diff --git a/foomatic-db.yaml b/foomatic-db.yaml new file mode 100644 index 0000000..caf4227 --- /dev/null +++ b/foomatic-db.yaml @@ -0,0 +1,4 @@ +version-control: NA +src_repo: NA +tag_prefix: NA +seperator: NA