foomatic-db-vl.spec 12 KB

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