libcupsfilters-vl.spec 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. %global _hardened_build 1
  2. %global upstream_version 2.1b1
  3. Name: libcupsfilters
  4. Version: 2.1~b1
  5. Release: 4%{?_dist_release}
  6. Summary: Library for developing printing filters
  7. Group: system
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. # the CUPS exception text is the same as LLVM exception, so using that name with
  11. # agreement from legal team
  12. # https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/message/A7GFSD6M3GYGSI32L2FC5KB22DUAEQI3/
  13. License: Apache-2.0 WITH LLVM-exception
  14. URL: https://github.com/OpenPrinting/libcupsfilters
  15. Source0: %{URL}/releases/download/%{upstream_version}/%{name}-%{upstream_version}.tar.gz
  16. # Patches
  17. Patch1: 0001-cfgetprinterattributes5-validate-response-attributes.patch
  18. # for generating configure and Makefile scripts in autogen.h
  19. BuildRequires: autoconf
  20. # for generating configure and Makefile scripts in autogen.h
  21. BuildRequires: automake
  22. # font for test script
  23. BuildRequires: TrueType-dejavu
  24. # most filter functions written in C
  25. BuildRequires: gcc
  26. # pdftopdf written in C++
  27. BuildRequires: gcc-c++
  28. # for generating configure and Makefile scripts in autogen.h
  29. BuildRequires: gettext-devel
  30. # we use gs binary in filter functions, so it could be only runtime
  31. # require, but there is a check in configure, which turns off GS
  32. # support in case the binary is not found, so the binary has to be in
  33. # buildroot
  34. BuildRequires: ghostscript >= 10.0.0
  35. # for autosetup
  36. BuildRequires: git
  37. # for generating configure and Makefile scripts in autogen.h
  38. BuildRequires: libtool
  39. # uses Makefiles
  40. BuildRequires: make
  41. # for pkg-config in configure and in SPEC file
  42. BuildRequires: pkgconfig
  43. # CUPS and IPP API functions
  44. BuildRequires: pkgconfig(cups)
  45. # for communication with colord
  46. BuildRequires: pkgconfig(dbus-1)
  47. # font support - configuration and customization
  48. BuildRequires: pkgconfig(fontconfig)
  49. # color management engine in rastering filter functions
  50. BuildRequires: pkgconfig(lcms2)
  51. # used for getting image resolution from images - they have
  52. # EXIF data in them and library accesses it
  53. BuildRequires: pkgconfig(libexif)
  54. # for jpeg file format support
  55. BuildRequires: pkgconfig(libjpeg)
  56. # for png file format support
  57. BuildRequires: pkgconfig(libpng)
  58. # for pdf filter functions
  59. BuildRequires: pkgconfig(libqpdf) >= 10.3.2
  60. # for tiff image support
  61. BuildRequires: pkgconfig(libtiff-4)
  62. # for pdftoraster filter
  63. BuildRequires: pkgconfig(poppler-cpp)
  64. # remove once CentOS Stream 10 is released
  65. #Obsoletes: cups-filters-libs < 2.0
  66. # have a fallback for fonts in texttopdf filter function (bz#1070729)
  67. # but make it weak, so other monospace font can be used if requested
  68. Recommends: liberation-mono-fonts
  69. # we communicate with colord regarding color profiles
  70. Requires: colord
  71. # for directory ownership of:
  72. # /usr/share/cups
  73. # /usr/share/cups/data
  74. Requires: cups
  75. # we call gs command in filter functions
  76. Requires: ghostscript >= 10.0.0
  77. %description
  78. Libcupsfilters provides a library, which implements common functions used
  79. in cups-browsed daemon and printing filters, and additional files
  80. as banner templates and character sets. The filters are used in CUPS daemon
  81. and in printer applications.
  82. %package devel
  83. Summary: Development files for libcupsfilters
  84. Group: programming
  85. # remove once CentOS Stream 10 is released
  86. Conflicts: cups-filters-devel{?_isa} < 2.0
  87. # remove once CentOS Stream 10 is released
  88. Obsoletes: cups-filters-devel < 2.0
  89. # c2esp and perl-Net-CUPS requires cups-filters-devel
  90. # remove once CentOS Stream 10 is released
  91. Provides: cups-filters-devel = %{version}-%{release}
  92. Requires: %{name}%{?_isa} = %{version}-%{release}
  93. %description devel
  94. Development files for OpenPrinting cupsfilters library.
  95. %debug_package
  96. %prep
  97. %autosetup -S git -n %{name}-%{upstream_version}
  98. %build
  99. # to get configure script
  100. ./autogen.sh
  101. %configure --disable-mutool\
  102. --disable-rpath\
  103. --disable-silent-rules\
  104. --disable-static\
  105. --enable-dbus
  106. # fix rpmlint error about linking to libraries, but not actually using their functions
  107. # it happens when the required libraries uses pkgconfig - pkgconfig file doesn't know
  108. # which specific functions our binary calls, so it tells us to link against every
  109. # possibilities
  110. # https://fedoraproject.org/wiki/Common_Rpmlint_issues#unused-direct-shlib-dependency
  111. sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
  112. %make_build
  113. %check
  114. make check
  115. %install
  116. %make_install
  117. find %{buildroot} -name '*.la' -exec rm -f {} ';'
  118. mkdir -p %{buildroot}%{_pkgdocdir}/fontembed/
  119. install -p -m 0644 cupsfilters/fontembed/README %{buildroot}%{_pkgdocdir}/fontembed/README
  120. # remove .odt files (we have their .pdf versions)
  121. rm -f %{buildroot}%{_datadir}/cups/data/*.odt
  122. # remove redundant files
  123. rm -f %{buildroot}%{_pkgdocdir}/{INSTALL.md,ABOUT-NLS}
  124. # license related files are already under /usr/share/licenses
  125. rm -f %{buildroot}%{_pkgdocdir}/{LICENSE,COPYING,NOTICE}
  126. %{?ldconfig_scriptlets}
  127. %files
  128. %license COPYING LICENSE NOTICE
  129. %dir %{_datadir}/cups
  130. %dir %{_datadir}/cups/banners
  131. %{_datadir}/cups/banners/classified
  132. %{_datadir}/cups/banners/confidential
  133. %{_datadir}/cups/banners/form
  134. %{_datadir}/cups/banners/secret
  135. %{_datadir}/cups/banners/standard
  136. %{_datadir}/cups/banners/topsecret
  137. %{_datadir}/cups/banners/unclassified
  138. %dir %{_datadir}/cups/charsets
  139. %{_datadir}/cups/charsets/pdf.utf-8
  140. %{_datadir}/cups/charsets/pdf.utf-8.heavy
  141. %{_datadir}/cups/charsets/pdf.utf-8.simple
  142. %{_datadir}/cups/data/classified.pdf
  143. %{_datadir}/cups/data/confidential.pdf
  144. %{_datadir}/cups/data/default-testpage.pdf
  145. %{_datadir}/cups/data/default.pdf
  146. %{_datadir}/cups/data/form_english.pdf
  147. %{_datadir}/cups/data/form_russian.pdf
  148. %{_datadir}/cups/data/secret.pdf
  149. %{_datadir}/cups/data/standard.pdf
  150. %{_datadir}/cups/data/testprint
  151. %{_datadir}/cups/data/topsecret.pdf
  152. %{_datadir}/cups/data/unclassified.pdf
  153. %doc AUTHORS CHANGES.md CHANGES-1.x.md README.md
  154. %dir %{_docdir}/%{name}/fontembed
  155. %{_docdir}/%{name}/fontembed/README
  156. %{_libdir}/libcupsfilters.so.2*
  157. %files devel
  158. %{_docdir}/%{name}/CONTRIBUTING.md
  159. %{_docdir}/%{name}/DEVELOPING.md
  160. %dir %{_includedir}/cupsfilters
  161. %{_includedir}/cupsfilters/*
  162. %{_libdir}/libcupsfilters.so
  163. %{_libdir}/pkgconfig/libcupsfilters.pc
  164. %changelog
  165. * Fri Oct 04 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.1~b1-4
  166. - initial build for Vine Linux.
  167. * Thu Sep 26 2024 Justin M. Forbes <jforbes@fedoraproject.org> - 1:2.1~b1-3
  168. - Fix for CVE-2024-47076
  169. * Thu Aug 22 2024 Marek Kasik <mkasik@redhat.com> - 1:2.1~b1-2
  170. - Rebuild for poppler 24.08.0
  171. * Thu Aug 15 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.1~b1-1
  172. - 2305074 - libcupsfilters-2.1b1 is available
  173. * Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.0-8
  174. - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
  175. * Mon Mar 11 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-7
  176. - 2266609 - fix color printing via URF to driverless printer
  177. * Tue Feb 20 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-6
  178. - fix several issues reported in upstream
  179. * Mon Jan 29 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.0-5
  180. - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
  181. * Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.0-4
  182. - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
  183. * Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.0-3
  184. - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
  185. * Thu Oct 19 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-2
  186. - rebuilt for side-tag with libppd
  187. * Tue Oct 03 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-1
  188. - 2240388 - libcupsfilters-2.0.0 is available
  189. * Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0~rc2-2
  190. - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
  191. * Wed Jun 28 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc2-1
  192. - 2.0rc2
  193. * Wed Apr 19 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc1-1
  194. - 2.0rc1
  195. * Wed Mar 01 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~b4-1
  196. - (fedora#2173137) - libcupsfilters-2.0b4 is available
  197. - introduce Epoch because I'm not careful reader of FPG...
  198. * Mon Feb 20 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-4
  199. - rebuilt with obsoletes
  200. - fix define in image-png.c to enable PNG support
  201. * Mon Feb 20 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-3
  202. - fix double free caused by coverity fix
  203. * Wed Feb 15 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-2
  204. - remove Obsoletes for now
  205. * Tue Jan 31 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2.0b3-1
  206. - Initial import