foomatic-db-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. %global dbver_rel 4.0
  2. # When you change dbver_snap, rebuild also foomatic against this build to pick up new IEEE 1284 Device IDs.
  3. # The postscriptdriver tags get put onto foomatic, because that's there the actual CUPS driver lives.
  4. %global dbver_snap 20210824
  5. Summary: Database of printers and printer drivers
  6. Name: foomatic-db
  7. Version: %{dbver_rel}
  8. Release: 49.%{dbver_snap}%{?_dist_release}
  9. Group: system,publishing
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. License: GPLv2+
  13. URL: https://openprinting.github.io/
  14. Source0: https://www.openprinting.org/download/foomatic/foomatic-db-%{dbver_rel}-%{dbver_snap}.tar.gz
  15. Patch1: foomatic-db-device-ids.patch
  16. Patch2: foomatic-db-invalid.patch
  17. BuildArch: noarch
  18. # Make sure we get postscriptdriver tags.
  19. BuildRequires: python3-cups
  20. # Build requires cups so that configure knows where to put PPDs.
  21. BuildRequires: cups
  22. Requires: %{name}-filesystem = %{version}-%{release}
  23. Requires: %{name}-ppds = %{version}-%{release}
  24. %description
  25. This is the database of printers, printer drivers, and driver options
  26. for Foomatic.
  27. The site http://www.openprinting.org/ is based on this database.
  28. %package filesystem
  29. Summary: Directory layout for the foomatic package
  30. License: Public Domain
  31. Group: system,publishing
  32. %description filesystem
  33. Directory layout for the foomatic package.
  34. %package ppds
  35. Summary: PPDs from printer manufacturers
  36. License: GPLv2+ and MIT
  37. Group: system,publishing
  38. # We ship a symlink in a directory owned by cups
  39. BuildRequires: cups
  40. Requires: cups
  41. Requires: sed
  42. Requires: %{name}-filesystem = %{version}-%{release}
  43. %description ppds
  44. PPDs from printer manufacturers.
  45. %prep
  46. %setup -q -n foomatic-db-%{dbver_snap}
  47. find -type d | xargs chmod g-s
  48. pushd db/source
  49. # For gutenprint printers, use gutenprint-ijs-simplified.5.2.
  50. perl -pi -e 's,>gutenprint<,>gutenprint-ijs-simplified.5.2<,' printer/*.xml
  51. # Remove references to SpliX (Samsung/Xerox/Dell)
  52. find printer -name '*.xml' |xargs grep -l "<driver>splix"|xargs rm -vf
  53. rm -f driver/splix.xml
  54. # Remove references to foo2zjs, foo2oak, foo2hp and foo2qpdl (bug #208851).
  55. # foo2zjs-z1, foo2zjs-z2, foo2zjs-z3 (bug #967930)
  56. # foo2lava, foo2kyo, foo2xqx (bug #438319)
  57. # foo2slx and foo2hiperc (bug #518267)
  58. # foo2hbpl2 (bug #970393)
  59. for x in zjs zjs-z1 zjs-z2 zjs-z3 oak oak-z1 hp qpdl lava kyo xqx slx hiperc hbpl2
  60. do
  61. find printer -name '*.xml' |xargs grep -l "<driver>foo2${x}"|xargs rm -vf
  62. rm -f driver/foo2${x}.xml opt/foo2${x}-*
  63. done
  64. # Binaries for these were previously provided by printer-filters, but aren't anymore (bug #972740)
  65. for x in lm1100 pentaxpj pbm2l2030 pbm2l7k lex5700 lex7000 c2050 c2070 cjet
  66. do
  67. find printer -name '*.xml' |xargs grep -l "<driver>${x}</driver>"|xargs rm -vf
  68. rm -vf driver/${x}.xml opt/${x}-*
  69. done
  70. # Same for all these.
  71. for x in drv_x125 ml85p pbm2lwxl pbmtozjs bjc800j m2300w m2400w
  72. do
  73. find printer -name '*.xml' |xargs grep -l "<driver>${x}</driver>"|xargs rm -vf
  74. rm -vf driver/${x}.xml opt/${x}-*
  75. done
  76. # Remove Samsung-CLP-610/620 (bug #967930), they're in foo2qpdl
  77. find printer -name '*.xml' |grep -E 'Samsung-CLP-610|Samsung-CLP-620'|xargs rm -vf
  78. # This one is part of foo2zjs
  79. find printer -name '*.xml' |grep -E 'KONICA_MINOLTA-magicolor_2430_DL'|xargs rm -vf
  80. # Remove Brother P-touch (bug #560610, comment #10)
  81. rm -vf driver/ptouch.xml
  82. rm -vf printer/Brother-PT-*.xml
  83. rm -vf printer/Brother-QL-*.xml
  84. rm -vf opt/Brother-Ptouch-*.xml
  85. popd
  86. # foomatic-db patches
  87. # Don't use "-b" when patching PPD files as the backups will be packaged.
  88. # Device IDs for:
  89. # Brother MFC-8840D (#678065)
  90. # HP LaserJet M1522nf MFP (#745499)
  91. # Lexmark C453 (#770169)
  92. # HP DeskJet 720C (bug #797099)
  93. # Kyocera FS-1118MFP (bug #782377)
  94. # Brother HL-2040 (bug #999040)
  95. %patch1 -p1
  96. # These can't be generated at all (bug #866476)
  97. %patch2 -p1
  98. # Use sed instead of perl in the PPDs (bug #512739).
  99. find db/source/PPD -type f -name '*.ppd' | xargs perl -pi -e 's,perl -p,sed,'
  100. %build
  101. %configure
  102. make PREFIX=%{_prefix}
  103. %install
  104. make DESTDIR=%buildroot PREFIX=%{_prefix} \
  105. install
  106. # Remove ghostscript UPP drivers that are gone in 7.07
  107. rm -f %{buildroot}%{_datadir}/foomatic/db/source/driver/{bjc6000a1,PM760p,PM820p,s400a1,sharp,Stc670pl,Stc670p,Stc680p,Stc760p,Stc777p,Stp720p,Stp870p}.upp.xml
  108. find %{buildroot}%{_datadir}/foomatic/db/source/ -type f | xargs chmod 0644
  109. mkdir %{buildroot}%{_datadir}/foomatic/db/source/PPD/Custom
  110. rm -f %{buildroot}%{_datadir}/foomatic/db/source/PPD/Kyocera/*.htm \
  111. %{buildroot}%{_datadir}/cups/model/3-distribution
  112. # Convert absolute symlink to relative.
  113. rm -f %{buildroot}%{_datadir}/cups/model/foomatic-db-ppds
  114. ln -sf ../../foomatic/db/source/PPD %{buildroot}%{_datadir}/cups/model/foomatic-db-ppds
  115. %files filesystem
  116. %dir %{_datadir}/foomatic
  117. %dir %{_datadir}/foomatic/db
  118. %dir %{_datadir}/foomatic/db/source
  119. %files
  120. %doc db/source/PPD/Kyocera/*.htm
  121. %doc README
  122. %{_datadir}/foomatic/db/oldprinterids
  123. %{_datadir}/foomatic/db/source/printer
  124. %{_datadir}/foomatic/db/source/driver
  125. %{_datadir}/foomatic/db/source/opt
  126. %{_datadir}/foomatic/xmlschema
  127. %files ppds
  128. %license COPYING
  129. %{_datadir}/foomatic/db/source/PPD
  130. %{_datadir}/cups/model/foomatic-db-ppds
  131. %changelog
  132. * Sun Nov 21 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0-49.20210829
  133. - new upstream relase.
  134. * Sun Oct 4 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0-48.20150819
  135. - initial build for Vine Linux.
  136. * Tue Sep 15 2015 Jiri Popelka <jpopelka@redhat.com> - 4.0-47.20150819
  137. - Updated to foomatic-db-4.0-20150819
  138. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-46.20150415
  139. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  140. * Thu May 21 2015 Jiri Popelka <jpopelka@redhat.com> - 4.0-45.20150415
  141. - Updated to foomatic-db-4.0-20150415
  142. * Mon Jul 07 2014 Jiri Popelka <jpopelka@redhat.com> - 4.0-44.20140707
  143. - Updated to foomatic-db-4.0-20140707
  144. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-43.20131218
  145. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  146. * Wed Dec 18 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0-42.20131218
  147. - Remove references to splix and KONICA_MINOLTA-magicolor_2430_DL (bug #970393)
  148. * Wed Dec 18 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0-41.20131218
  149. - Remove references to invalid printers (bug #866476, bug #972740)
  150. - Remove references to foo2hbpl (bug #970393)
  151. - Updated to foomatic-db-4.0-20131218
  152. * Wed Sep 11 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0-40.20130911
  153. - Updated to foomatic-db-4.0-20130911
  154. - Device ID for Brother HL-2040 (bug #999040)
  155. * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-39.20130604
  156. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  157. * Tue Jun 04 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0-38.20130604
  158. - Remove some file conflicts (bug #967930)
  159. - Updated to foomatic-db-4.0-20130604
  160. * Tue May 07 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0-37.20130507
  161. - Updated to foomatic-db-4.0-20130507
  162. - Removed old 'Obsoletes: oki4linux'
  163. * Tue Mar 12 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0-36.20130312
  164. - Updated to foomatic-db-4.0-20130312
  165. * Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-35.20121011
  166. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  167. * Thu Oct 11 2012 Jiri Popelka <jpopelka@redhat.com> 4.0-34.20120719
  168. - Updated to foomatic-db-4.0-20121011
  169. * Thu Jul 19 2012 Jiri Popelka <jpopelka@redhat.com> 4.0-33.20120719
  170. - Updated to foomatic-db-4.0-20120719
  171. * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-32.20120103
  172. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  173. * Fri Feb 24 2012 Tim Waugh <twaugh@redhat.com> 4.0-31.20120103
  174. - Device IDs for:
  175. - HP DeskJet 720C (bug #797099)
  176. - Kyocera FS-1118MFP (bug #782377)
  177. * Wed Jan 04 2012 Jiri Popelka <jpopelka@redhat.com> 4.0-30.20120103
  178. - Updated to foomatic-db-4.0-20120103
  179. - spec modernized
  180. - Device IDs for:
  181. - Brother MFC-8840D (#678065)
  182. - HP LaserJet M1522nf MFP (#745499)
  183. - Lexmark C453 (#770169)
  184. * Tue Jun 14 2011 Tim Waugh <twaugh@redhat.com> 4.0-29.20110614
  185. - Updated to foomatic-db-4.0-20110614.
  186. * Mon Feb 21 2011 Tim Waugh <twaugh@redhat.com> 4.0-28.20110221
  187. - Updated to foomatic-db-4.0-20110221.
  188. - No longer need hpijs data.
  189. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-27.20101123
  190. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  191. * Fri Jan 28 2011 Tim Waugh <twaugh@redhat.com> 4.0-26.20101123
  192. - Rebuilt to pick up postscriptdriver tags now that python-cups
  193. provides the machinery for this.
  194. - Build requires cups so that configure knows where to put PPDs.
  195. * Wed Jan 19 2011 Jiri Popelka <jpopelka@redhat.com> 4.0-25.20101123
  196. - Removed Brother P-touch (bug #560610, comment #10)
  197. * Mon Dec 06 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-24.20101123
  198. - The pycups requirement is now python-cups.
  199. * Mon Dec 06 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-23.20101123
  200. - Device IDs for:
  201. - HP Deskjet D4100 (bug #658091)
  202. - HP Color LaserJet CM4730 MFP (bug #658838)
  203. - HP LaserJet 4050/4100/4350/5100/8000/P3005 (bug #659041)
  204. - HP Color LaserJet 2500/3700/4550/4650/4700/5550 (bug #659042)
  205. * Tue Nov 23 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-22.20101123
  206. - Updated to foomatic-db-4.0-20101123 (bug #655238).
  207. - Device ID for Canon iR 3225 (bug #651500).
  208. * Wed Nov 03 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-21.20100819
  209. - Remove wrong Device ID for Canon iR 3170C (bug #617493).
  210. * Fri Aug 20 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-20.20100819
  211. - Removed printer/Samsung-CLP-300|315.xml (bug #625505).
  212. - Removed references to foo2oak-z1.
  213. * Thu Aug 19 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-19.20100819
  214. - Updated to foomatic-db-4.0-20100819, foomatic-db-hpijs-20090901.tar.gz
  215. - Device ID for Canon iR 3170C (bug #617493).
  216. * Mon Jul 12 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-18.20100204
  217. - Moved COPYING file to ppds sub-package.
  218. * Mon May 17 2010 Tim Waugh <twaugh@redhat.com> 4.0-17.20100204
  219. - Don't ship backup files.
  220. * Sun May 16 2010 Tim Waugh <twaugh@redhat.com> 4.0-16.20100204
  221. - Device IDs for another 1302 Ricoh PPDs.
  222. * Thu May 6 2010 Tim Waugh <twaugh@redhat.com> 4.0-15.20100204
  223. - Device IDs for:
  224. - HP Color LaserJet 2605dn (bug #583909).
  225. - HP DeskJet F300 (bug #585644).
  226. - HP OfficeJet 6200 (bug #215063).
  227. - HP PSC 1400 (bug #586381).
  228. - Ricoh Aficio MP C3500 (bug #589527).
  229. - Ricoh Aficio SP C420DN (bug #589533).
  230. * Fri Apr 16 2010 Tim Waugh <twaugh@redhat.com> 4.0-14.20100204
  231. - Device IDs for:
  232. - Canon BJC-4100 (bug #583060)
  233. - HP Color LaserJet 3800 (bug #581936).
  234. - HP DeskJet D2300 (bug #580341).
  235. - HP DeskJet F2100 (bug #579245).
  236. - HP OfficeJet 7300 (bug #577897).
  237. - Lexmark E120 (bug #577881).
  238. - HP DeskJet 1280 (bug #577870).
  239. - HP PhotoSmart 7400 (bug #577866).
  240. - Brother HL-2140 (bug #577863).
  241. - HP OfficeJet 6200 (bug #215063).
  242. - HP PSC 2400 (bug #188419).
  243. * Fri Mar 26 2010 Tim Waugh <twaugh@redhat.com> 4.0-13.20100204
  244. - Device IDs for HP PhotoSmart 2570, HP DeskJet 959C and HP OfficeJet
  245. Pro K550 (bug #577280, bug #577293, bug #577296).
  246. * Thu Mar 25 2010 Tim Waugh <twaugh@redhat.com> 4.0-12.20100402
  247. - Fixed missing units in driver margins (bug #576370).
  248. * Fri Mar 19 2010 Tim Waugh <twaugh@redhat.com> 4.0-11.20100402
  249. - Device ID for Kyocera Mita FS-1020D (bug #575063).
  250. * Thu Feb 4 2010 Tim Waugh <twaugh@redhat.com> 4.0-10.20100402
  251. - Rebuild for postscriptdriver tags.
  252. * Thu Feb 4 2010 Tim Waugh <twaugh@redhat.com> 4.0-9.20100402
  253. - Updated to foomatic-db-4.0-20100402.
  254. * Fri Dec 4 2009 Tim Waugh <twaugh@redhat.com> 4.0-8.20091126
  255. - Added foomatic-db-hpijs tarball back in.
  256. * Thu Nov 26 2009 Tim Waugh <twaugh@redhat.com> 4.0-7.20091126
  257. - Updated to foomatic-db-4.0-20091126 (bug #538994).
  258. * Thu Aug 20 2009 Tim Waugh <twaugh@redhat.com> 4.0-6.20090819
  259. - Removed references to foo2slx and foo2hiperc (bug #518267).
  260. * Wed Aug 19 2009 Tim Waugh <twaugh@redhat.com> 4.0-5.20090819
  261. - Updated to foomatic-db-4.0-20090819.
  262. - Removed deprecated foomatic-db-hpijs tarball.
  263. - Use buildroot macro throughout.
  264. * Tue Aug 18 2009 Tim Waugh <twaugh@redhat.com> 4.0-4.20090702
  265. - Use stcolor driver for Epson Stylus Color 200 (bug #513676).
  266. * Mon Aug 17 2009 Tim Waugh <twaugh@redhat.com> 4.0-3.20090702
  267. - License for ppds sub-package should include GPLv2+.
  268. - Ship COPYING file in main package.
  269. - Added filesystem sub-package for directory ownership.
  270. * Mon Aug 3 2009 Tim Waugh <twaugh@redhat.com> 4.0-2.20090702
  271. - Move foomatic-db-ppds symlink to ppds sub-package.
  272. - Use sed instead of perl in raster PPDs (bug #512739).
  273. - Removed code to convert old-style printer IDs (there are none).
  274. - Ship README file.
  275. * Mon Aug 3 2009 Tim Waugh <twaugh@redhat.com> 4.0-1.20090702
  276. - Split database out from main foomatic package.