libppd-vl.spec 8.1 KB

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