cups-pdf-vl.spec 6.3 KB

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