libppd-vl.spec 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. %global _hardened_build 1
  2. # don't build libppd-tools until CUPS 3.x drops them
  3. %bcond_with tools
  4. Name: libppd
  5. Summary: Library for retro-fitting legacy printer drivers
  6. Version: 2.1.0
  7. Release: 1%{?_dist_release}
  8. Group: system
  9. Vendor: Project Vine
  10. Distribution: Vine Linux
  11. # the CUPS exception text is the same as LLVM exception, so using that name with
  12. # agreement from legal team
  13. # https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/message/A7GFSD6M3GYGSI32L2FC5KB22DUAEQI3/
  14. License: Apache-2.0 WITH LLVM-exception
  15. URL: https://github.com/OpenPrinting/libppd
  16. Source0: %{URL}/releases/download/%{version}/%{name}-%{version}.tar.gz
  17. # Patches
  18. # none
  19. # for autogen.sh
  20. BuildRequires: autoconf
  21. # for autogen.sh
  22. BuildRequires: automake
  23. # mostly written in C
  24. BuildRequires: gcc
  25. # PPD compiler support written in C++
  26. BuildRequires: gcc-c++
  27. # for autogen.sh
  28. BuildRequires: gettext-devel
  29. # ghostscript is needed during build due configure check
  30. BuildRequires: ghostscript >= 10.0.0
  31. # for autosetup
  32. BuildRequires: git
  33. # for autogen.sh
  34. BuildRequires: libtool
  35. # uses make
  36. BuildRequires: make
  37. # for pkg-config in SPEC file and in configure
  38. BuildRequires: pkgconfig
  39. # for CUPS API functions
  40. BuildRequires: pkgconfig(cups) >= 2.2.2
  41. # for filter functions
  42. BuildRequires: libcupsfilters-devel
  43. # for rastertops
  44. BuildRequires: pkgconfig(zlib)
  45. # pdftops has to be in buildroot due configure check
  46. BuildRequires: poppler-utils
  47. %if %{without tools}
  48. # libppd exports symbols for compiling PPD compilers, which needs charset
  49. # definitions and header files during runtime to generate a PPD file - those
  50. # are provided by cups right now - once cups drops them, require libppd-tools
  51. Requires: cups
  52. %else
  53. Requires: %{name}-tools%{?_isa} = %{version}-%{release}
  54. %endif
  55. # needded for hybrid pdftops filter function - for all legacy printers
  56. # except for Brother and Minolta/Konica Minolta, which firmware bugs
  57. # doesn't work with pdftops from GS
  58. Requires: ghostscript >= 10.0.0
  59. # needed for hybrid pdftops filter function - for Brother and Minolta/
  60. # Konica Minolta printers
  61. Requires: poppler-utils
  62. %description
  63. Libppd provides all PPD related function/API which is going
  64. to be removed from CUPS 3.X, but are still required for retro-fitting
  65. support of legacy printers. The library is meant only for retro-fitting
  66. printer applications, any new printer drivers have to be written as
  67. native printer application without libppd.
  68. %package devel
  69. Summary: Development files for %{name}
  70. Group: programming
  71. Requires: %{name}%{?_isa} = %{version}-%{release}
  72. Requires: cups-devel
  73. Requires: libcupsfilters-devel
  74. %description devel
  75. The %{name}-devel package contains libraries and header files for
  76. developing retro-fitting printer applications.
  77. %if %{with tools}
  78. %package tools
  79. Summary: PPD compiler tools and definition files
  80. Requires: %{name}%{?_isa} = %{version}-%{release}
  81. %description tools
  82. The package contains PPD compiler and definition files needed for generating
  83. PPD files from *.drv files.
  84. %endif
  85. %debug_package
  86. %prep
  87. %autosetup -S git -n %{name}-%{version}
  88. %build
  89. # generate configuration/compilation files
  90. ./autogen.sh
  91. # disable PPD compiler tools for now (until CUPS 3.x drops PPD support) to prevent
  92. # conflicts with cups 2.x package
  93. %configure\
  94. --disable-acroread\
  95. --disable-mutool\
  96. --disable-rpath\
  97. --disable-silent-rules\
  98. --disable-static\
  99. %if %{with tools}
  100. --enable-ppdc-utils\
  101. --enable-testppdfile\
  102. %else
  103. --disable-ppdc-utils\
  104. --disable-testppdfile\
  105. %endif
  106. --with-pdftops=hybrid
  107. # fix rpmlint error about linking to libraries, but not actually using their functions
  108. # it happens when the required libraries uses pkgconfig - pkgconfig file doesn't know
  109. # which specific functions our binary calls, so it tells us to link against every
  110. # possibilities
  111. # https://fedoraproject.org/wiki/Common_Rpmlint_issues#unused-direct-shlib-dependency
  112. sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
  113. %make_build
  114. %check
  115. make check
  116. %install
  117. %make_install
  118. find %{buildroot} -name '*.la' -exec rm -f {} ';'
  119. # remove the license files from doc dir, since we ship them in /usr/share/licenses
  120. rm -f %{buildroot}%{_pkgdocdir}/{LICENSE,NOTICE,COPYING}
  121. # remove INSTALL since it is unnecessary
  122. rm -f %{buildroot}%{_pkgdocdir}/INSTALL.md
  123. # 1.x was the release were all cups-filters components were together
  124. # let only libcupsfilters to carry it
  125. rm -f %{buildroot}%{_pkgdocdir}/CHANGES-1.x.md
  126. # charsets and header files needed for PPD compilation in runtime
  127. # are for now shipped by cups - libppd will ship them once cups
  128. # drops them
  129. %if %{without tools}
  130. rm -rf %{buildroot}%{_datadir}/ppdc
  131. %endif
  132. %{?ldconfig_scriptlets}
  133. %files
  134. %license LICENSE NOTICE COPYING
  135. %doc ABOUT-NLS AUTHORS CHANGES.md README.md
  136. %{_libdir}/libppd.so.2*
  137. %files devel
  138. %{_docdir}/%{name}/CONTRIBUTING.md
  139. %{_docdir}/%{name}/DEVELOPING.md
  140. %dir %{_includedir}/ppd
  141. %{_includedir}/ppd/ppd-filter.h
  142. %{_includedir}/ppd/ppdc.h
  143. %{_includedir}/ppd/ppd.h
  144. %{_libdir}/libppd.so
  145. %{_libdir}/pkgconfig/libppd.pc
  146. %if %{with tools}
  147. %files tools
  148. %{_bindir}/ppdc
  149. %{_bindir}/ppdhtml
  150. %{_bindir}/ppdi
  151. %{_bindir}/ppdmerge
  152. %{_bindir}/ppdpo
  153. %{_bindir}/testppdfile
  154. %dir %{_datadir}/ppdc/
  155. %{_datadir}/ppdc/epson.h
  156. %{_datadir}/ppdc/font.defs
  157. %{_datadir}/ppdc/hp.h
  158. %{_datadir}/ppdc/label.h
  159. %{_datadir}/ppdc/media.defs
  160. %{_datadir}/ppdc/raster.defs
  161. %endif
  162. %changelog
  163. * Wed Oct 23 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.1.0-1
  164. - new upstream release.
  165. * Fri Oct 04 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.1~b1-3
  166. - initial build for Vine Linux.
  167. * Thu Sep 26 2024 Justin M. Forbes <jforbes@fedoraproject.org> - 1:2.1~b1-2
  168. - Fix for CVE-2024-47175
  169. * Thu Aug 15 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.1~b1-1
  170. - 2305073 - libppd-2.1b1 is available
  171. * Tue Aug 06 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-6
  172. - fix deciding page sizes by changing delta for difference
  173. * Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.0-5
  174. - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
  175. * Fri Feb 16 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-4
  176. - 2263053 - CUPS/libppd PPD generators didn't check required attrs when deciding which driverless format to use,
  177. causing PPD generation to fail
  178. * Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.0-3
  179. - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
  180. * Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.0-2
  181. - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
  182. * Thu Oct 19 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-1
  183. - 2240389 - libppd-2.0.0 is available
  184. * Wed Sep 20 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc2-4
  185. - CVE-2023-4504 libppd: Postscript Parsing Heap Overflow
  186. * Tue Aug 08 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc2-3
  187. - fix printing for PDF+PJL drivers
  188. * Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0~rc2-2
  189. - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
  190. * Wed Jun 28 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc2-1
  191. - 2216565 - libppd-2.0b4 is available
  192. * Wed May 31 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc1-3
  193. - fix printing for printers with reverse output order
  194. - fix printing resolutions
  195. * Mon May 29 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc1-2
  196. - 2192912 - [Utax, Kyocera, Brother] pdftops hacks are not applied due missing manufacturer in printer-make-and-model
  197. * Thu Apr 27 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc1-1
  198. - 2.0rc1
  199. * Wed Mar 15 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~b4-2
  200. - fix printing images to Postscript printers
  201. * Wed Mar 01 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~b4-1
  202. - 2.0b4
  203. - introduce Epoch because I didn't read FPG carefully...
  204. * Mon Feb 20 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-4
  205. - rebuilt with required cups
  206. * Thu Feb 16 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-3
  207. - don't use bootstrap for now - koji doesn't seem to see it...
  208. * Thu Feb 16 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-2
  209. - bootstrap cups to prevent conflicts for now
  210. * Wed Feb 01 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-1
  211. - Initial import