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

Revision 12121, 7.0 KB checked in by tomop, 5 years ago (diff)

Merge branch 'tomop'

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