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