cups-pdf-vl.spec 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. Name: cups-pdf
  2. Version: 2.6.1
  3. Release: 1%{?_dist_release}
  4. Summary: Extension for creating pdf-Files with CUPS
  5. Summary(ja): CUPS を用いた仮想 PDF プリンター
  6. Group: Applications/Publishing
  7. URL: http://www.cups-pdf.de/
  8. License: GPLv2+
  9. Source0: http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/src/%{name}_%{version}.tar.gz
  10. Source1: INSTALL.cups-pdf
  11. Patch0: cups-pdf-conf-vine.patch
  12. # Handle ${DESKTOP} from config
  13. Patch2: cups-pdf-desktop.patch
  14. # Handle new lines in title
  15. Patch3: cups-pdf-title.patch
  16. # Fix build warning
  17. Patch4: cups-pdf-build.patch
  18. # Report error/success in log
  19. Patch5: cups-pdf-result.patch
  20. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  21. #BuildRequires: cups-devel
  22. Requires: ghostscript, cups
  23. Requires(post): cups
  24. Requires(postun): cups
  25. # These are the defaults paths defined in config.h
  26. # CUPS-PDF spool directory
  27. %global CPSPOOL %{_localstatedir}/spool/cups-pdf/SPOOL
  28. # CUPS-PDF output directory
  29. %global CPOUT %{_localstatedir}/spool/cups-pdf
  30. # CUPS-PDF log directory
  31. %global CPLOG %{_localstatedir}/log/cups
  32. # CUPS-PDF cups-pdf.conf config file
  33. %global ETCCUPS %(cups-config --serverroot 2>/dev/null || echo %{_sysconfdir}/cups)
  34. # Additional path to backend directory
  35. %global CPBACKEND %(cups-config --serverbin 2>/dev/null || echo %{_libdir}/cups)/backend
  36. %description
  37. "cups-pdf" is a backend script for use with CUPS - the "Common UNIX Printing
  38. System" (see more for CUPS under http://www.cups.org/).
  39. "cups-pdf" uses the ghostscript pdfwrite device to produce PDF Files.
  40. This version has been modified to store the PDF files on the Desktop of the
  41. user. This behavior can be changed by editing the configuration file.
  42. %description -l ja
  43. cups-pdf は CUPS (Common UNIX Printing System, http://www.cups.org/) を用いたいわゆる仮想 PDF プリンタのためのバックエンドスクリプトです。
  44. cups-pdf は PDF ファイルを生成するために Ghostscript の pdfwrite デバイスを使います。
  45. CUPS が動作しているときに %{name} をインストールすると、自動的に "CUPS-PDF Printer" として CUPS の設定を行います。
  46. %prep
  47. %setup -n %{name}-%{version}
  48. %patch0 -p1 -b .vine
  49. %patch2 -p0 -b .desktop
  50. %patch3 -p0 -b .title
  51. %patch4 -p0 -b .build
  52. %patch5 -p0 -b .result
  53. cp -p %{SOURCE1} INSTALL.RPM
  54. %build
  55. pushd src
  56. %{__cc} $RPM_OPT_FLAGS -o cups-pdf cups-pdf.c
  57. popd
  58. # Avoid perl dependencies
  59. %{__chmod} -x contrib/pstitleiconv-0.2/pstitleiconv
  60. %{__chmod} -x contrib/cups-pdf-dispatch-0.1/cups-pdf-dispatch
  61. %{__chmod} -x contrib/SELinux-HOWTO/update-module
  62. %install
  63. %__rm -rf ${RPM_BUILD_ROOT}
  64. %__mkdir_p $RPM_BUILD_ROOT%{CPBACKEND}
  65. %__mkdir_p $RPM_BUILD_ROOT%{CPSPOOL}
  66. %__mkdir_p $RPM_BUILD_ROOT%{CPOUT}
  67. %__mkdir_p $RPM_BUILD_ROOT%{CPLOG}
  68. %__mkdir_p $RPM_BUILD_ROOT%{CPBACKEND}
  69. %__mkdir_p $RPM_BUILD_ROOT%{ETCCUPS}
  70. %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/cups/model/
  71. %__install -m644 extra/CUPS-PDF.ppd $RPM_BUILD_ROOT%{_datadir}/cups/model/
  72. %__install -m644 extra/cups-pdf.conf $RPM_BUILD_ROOT%{ETCCUPS}/
  73. %__install -m755 src/cups-pdf $RPM_BUILD_ROOT%{CPBACKEND}
  74. %clean
  75. [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
  76. %post
  77. # First install : create the printer if cupsd is running
  78. if [ "$1" -eq "1" -a -f "%{_var}/run/cupsd.pid" ]
  79. then
  80. /sbin/service cups condrestart
  81. if [ -d /proc/$(cat %{_var}/run/cupsd.pid) ]
  82. then
  83. echo "Install CUPS-PDF Printer ... "
  84. /usr/sbin/lpadmin -p Cups-PDF -v cups-pdf:/ -m CUPS-PDF.ppd -E || :
  85. fi
  86. fi
  87. %postun
  88. if [ "$1" -eq "0" ]; then
  89. # Delete the printer
  90. echo "Remove CUPS-PDF Printer ... "
  91. /usr/sbin/lpadmin -x Cups-PDF || :
  92. fi
  93. %files
  94. %defattr(-,root,root)
  95. %doc ChangeLog COPYING README INSTALL.RPM contrib/
  96. %dir %{CPSPOOL}
  97. %dir %{CPOUT}
  98. %attr(700, root, root) %{CPBACKEND}/cups-pdf
  99. %config(noreplace) %{ETCCUPS}/cups-pdf.conf
  100. %{_datadir}/cups/model/CUPS-PDF.ppd
  101. %changelog
  102. * Sun Mar 15 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.6.1-1
  103. - new upstream release
  104. - updated Patch0
  105. - added Patch3, 4 and 5 from Fedora
  106. * Mon Sep 23 2013 Remi Collet <remi@fedoraproject.org> 2.6.1-7
  107. - report success/error in log file #1010434
  108. * Tue Mar 19 2013 Remi Collet <remi@fedoraproject.org> 2.6.1-4
  109. - fix title detection
  110. - fix build warning
  111. * Fri Feb 25 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2.5.1-1
  112. - new upstream release
  113. - fixed %%description -l ja
  114. * Sun Jul 26 2009 Munehiro Yamamoto <munepi@vinelinux.org> 2.5.0-4
  115. - rename Patch0 to cups-pdf-conf-vine.patch
  116. - updated cups-pdf-conf-vine.patch
  117. - set Truncate 256
  118. - change cups-pdf.conf to %%config(noreplace) in %%files section
  119. * Wed Jul 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.5.0-3
  120. - updated cups-pdf.conf.vl.patch: set DecodeHexStrings 1 (Experimental)
  121. * Tue Jul 07 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.5.0-2
  122. - added cups-pdf_2.5.0-4.diff.gz from Ubuntu
  123. - applied 60_cups-pdf_remove-contrib-SELinux-HOWTO-bashisms.patch
  124. - applied 70_cups-pdf_support-pdf-workflow.patch
  125. - added some comments in %%description -l ja
  126. - added echo "install/remove CUPS-PDF Printer" in %%post and %%postun
  127. - removed INSTALL and added README in %%doc
  128. * Sat Feb 14 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.5.0-1
  129. - new upstream release
  130. - updated the URL tag
  131. - correct the License tag
  132. * Tue Dec 30 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.4.8-2
  133. - fixed typo in spec
  134. * Wed Oct 29 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.8-1
  135. - new upstream release
  136. * Sun Sep 21 2008 Shu KONNO <owa@bg.wakwak.com> 2.4.6-1vl5
  137. - applied new versioning policy, spec in utf-8
  138. * Thu Jun 28 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 2.4.6-0vl2
  139. - rebuld for VineSeed
  140. * Thu Jun 28 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 2.4.6-0vl1
  141. - source update
  142. - delete -dNOKANJI option of Ghostscript
  143. * Sun Mar 25 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 2.4.5-0vl1
  144. - initial build for Vine Linux 4.1
  145. * Mon Sep 26 2005 Christian Ellsworth C. <k.ellsworth@gmail.com>
  146. - adapted to fit the new runtime config file of version 2.0
  147. * Sat Mar 05 2005 Christian Ellsworth C. <k.ellsworth@gmail.com>
  148. - adapted to cups-pdf 1.7.0
  149. - added auto configure a cups-pdf printer
  150. * Tue Feb 22 2005 Christian Ellsworth C. <k.ellsworth@gmail.com>
  151. - adapted to cups-pdf 1.6.6
  152. * Thu Aug 12 2004 Volker Behr <vrbehr@cip.physik.uni-wuerzburg.de>
  153. - adapted to cups-pdf 1.5.2
  154. * Sat Jan 31 2004 Volker Behr <vrbehr@cip.physik.uni-wuerzburg.de>
  155. - adapetd to cups-pdf 1.4.0 and new building environment
  156. * Wed Jan 14 2004 Mark Lane <harddata.com>
  157. - fixed the specfile so that x86_64 version installs the filter
  158. - in /usr/lib64 instead of /usr/lib
  159. * Sun Nov 02 2003 Volker Behr <vrbehr@cip.physik.uni-wuerzburg.de>
  160. - third release of cups-pdf, RPM-Edition for cups-pdf 1.3
  161. * Tue Sep 09 2003 Dirk Schwier <rpms@raumhochdrei.de>
  162. - second Release of cups-pdf, RPM-Edition for cups-pdf 1.1
  163. * Tue May 27 2003 Dirk Schwier <rpms@raumhochdrei.de>
  164. - we're proud to present the first version of cups-pdf, RPM-Edition
  165. # end of file