cups-pdf-vl.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. Summary: Extension for creating pdf-Files with CUPS
  2. Summary(ja): CUPS を用いた仮想 PDF プリンター
  3. Name: cups-pdf
  4. Version: 2.5.0
  5. Release: 4%{?_dist_release}
  6. Source0: http://www.cups-pdf.de/src/%{name}_%{version}.tar.gz
  7. Source1: INSTALL.cups-pdf
  8. Patch0: cups-pdf-conf-vine.patch
  9. Patch2: cups-pdf-desktop.patch
  10. Patch10: http://archive.ubuntu.com/ubuntu/pool/universe/c/cups-pdf/cups-pdf_2.5.0-4.diff.gz
  11. License: GPLv2+
  12. Group: Applications/Publishing
  13. URL: http://www.cups-pdf.de/
  14. Prefix: %{_prefix}
  15. Requires: ghostscript, cups
  16. #Requires: perl-MIME-tools, perl-MailTools
  17. BuildPreReq: gcc
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  19. # These are the defaults paths defined in config.h
  20. # CUPS-PDF spool directory
  21. %define CPSPOOL /var/spool/cups-pdf/SPOOL
  22. # CUPS-PDF output directory
  23. %define CPOUT /var/spool/cups-pdf
  24. # CUPS-PDF log directory
  25. %define CPLOG /var/log/cups
  26. # CUPS-PDF cups-pdf.conf config file
  27. %define ETCCUPS /etc/cups
  28. # Additional path to backend directory
  29. %ifarch x86_64
  30. %define CPBACKEND %{prefix}/lib64/cups/backend
  31. %else
  32. %define CPBACKEND %{prefix}/lib/cups/backend
  33. %endif
  34. %description
  35. "cups-pdf" is a backend script for use with CUPS -
  36. the "Common UNIX Printing System" (see more for CUPS under
  37. http://www.cups.org/). "cups-pdf" uses the ghostscript pdfwrite
  38. device to produce PDF Files.
  39. %description -l ja
  40. cups-pdf は CUPS を用いたいわゆる仮想 PDF プリンターのための
  41. バックエンドスクリプトです.
  42. cups-pdf は PDF ファイルを生成するために Ghostscript の
  43. pdfwrite デバイスを使います.
  44. CUPS が動作しているときに %{name} をインストールすると、
  45. 自動的に CUPS-PDF Printer として CUPS の設定を行います。
  46. DecodeHexStrings 1
  47. %prep
  48. %setup -n %{name}-%{version}
  49. %patch0 -p1 -b .vine
  50. %patch2 -p0
  51. %patch10 -p1
  52. patch -p0 -i debian/patches/60_cups-pdf_remove-contrib-SELinux-HOWTO-bashisms.patch
  53. patch -p1 -i debian/patches/70_cups-pdf_support-pdf-workflow.patch
  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}/cups-pdf.conf
  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 contrib/
  96. %dir %{CPSPOOL}
  97. %dir %{CPOUT}
  98. %attr(700, root, root) %{CPBACKEND}/cups-pdf
  99. %{_datadir}/cups/model/CUPS-PDF.ppd
  100. %config(noreplace) %{ETCCUPS}/cups-pdf.conf
  101. %changelog
  102. * Sun Jul 26 2009 Munehiro Yamamoto <munepi@vinelinux.org> 2.5.0-4
  103. - rename Patch0 to cups-pdf-conf-vine.patch
  104. - updated cups-pdf-conf-vine.patch
  105. - set Truncate 256
  106. - change cups-pdf.conf to %%config(noreplace) in %%files section
  107. * Wed Jul 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.5.0-3
  108. - updated cups-pdf.conf.vl.patch: set DecodeHexStrings 1 (Experimental)
  109. * Tue Jul 07 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.5.0-2
  110. - added cups-pdf_2.5.0-4.diff.gz from Ubuntu
  111. - applied 60_cups-pdf_remove-contrib-SELinux-HOWTO-bashisms.patch
  112. - applied 70_cups-pdf_support-pdf-workflow.patch
  113. - added some comments in %%description -l ja
  114. - added echo "install/remove CUPS-PDF Printer" in %%post and %%postun
  115. - removed INSTALL and added README in %%doc
  116. * Sat Feb 14 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.5.0-1
  117. - new upstream release
  118. - updated the URL tag
  119. - correct the License tag
  120. * Tue Dec 30 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.4.8-2
  121. - fixed typo in spec
  122. * Wed Oct 29 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.8-1
  123. - new upstream release
  124. * Sun Sep 21 2008 Shu KONNO <owa@bg.wakwak.com> 2.4.6-1vl5
  125. - applied new versioning policy, spec in utf-8
  126. * Thu Jun 28 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 2.4.6-0vl2
  127. - rebuld for VineSeed
  128. * Thu Jun 28 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 2.4.6-0vl1
  129. - source update
  130. - delete -dNOKANJI option of Ghostscript
  131. * Sun Mar 25 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 2.4.5-0vl1
  132. - initial build for Vine Linux 4.1
  133. * Mon Sep 26 2005 Christian Ellsworth C. <k.ellsworth@gmail.com>
  134. - adapted to fit the new runtime config file of version 2.0
  135. * Sat Mar 05 2005 Christian Ellsworth C. <k.ellsworth@gmail.com>
  136. - adapted to cups-pdf 1.7.0
  137. - added auto configure a cups-pdf printer
  138. * Tue Feb 22 2005 Christian Ellsworth C. <k.ellsworth@gmail.com>
  139. - adapted to cups-pdf 1.6.6
  140. * Thu Aug 12 2004 Volker Behr <vrbehr@cip.physik.uni-wuerzburg.de>
  141. - adapted to cups-pdf 1.5.2
  142. * Sat Jan 31 2004 Volker Behr <vrbehr@cip.physik.uni-wuerzburg.de>
  143. - adapetd to cups-pdf 1.4.0 and new building environment
  144. * Wed Jan 14 2004 Mark Lane <harddata.com>
  145. - fixed the specfile so that x86_64 version installs the filter
  146. - in /usr/lib64 instead of /usr/lib
  147. * Sun Nov 02 2003 Volker Behr <vrbehr@cip.physik.uni-wuerzburg.de>
  148. - third release of cups-pdf, RPM-Edition for cups-pdf 1.3
  149. * Tue Sep 09 2003 Dirk Schwier <rpms@raumhochdrei.de>
  150. - second Release of cups-pdf, RPM-Edition for cups-pdf 1.1
  151. * Tue May 27 2003 Dirk Schwier <rpms@raumhochdrei.de>
  152. - we're proud to present the first version of cups-pdf, RPM-Edition
  153. # end of file