source: projects/specs/trunk/c/cups-pdf/cups-pdf-vl.spec @ 521

Revision 521, 6.0 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

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