summaryrefslogtreecommitdiffstats
path: root/pdflib-lite.spec
blob: 43401d128a32dbe2114410a4cc2c6f35438bac44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_include:  %global python_include  %(%{__python} -c "from distutils.sysconfig import get_python_inc; print get_python_inc(0)")}

Summary:        Portable C library for dynamically generating PDF files
Name:           pdflib-lite
# Remenber to check the URL after changing this...
Version:        7.0.5
Release:        5%{?dist}
License:        Distributable
Group:          System Environment/Libraries
URL:            http://www.pdflib.com/

Source:         http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-%{version}.tar.gz

Patch0:         pdflib-lite-7.0.4-gcc43.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
PDFlib is a development tool for PDF-enabling your software, 
or generating PDF on your server. PDFlib offers a simple-to-use API
for programmatically creating PDF files from within your own server- 
or client-side software. PDFlib doesn't make use of third-party software
for generating PDF, nor does it require any other tools.

%package devel
Summary:        Development files for pdflib
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description devel
PDFlib is a development tool for PDF-enabling your software, 
or generating PDF on your server. PDFlib offers a simple-to-use API
for programmatically creating PDF files from within your own server- 
or client-side software. PDFlib doesn't make use of third-party software
for generating PDF, nor does it require any other tools.

This package contains the files needed for compiling programs that will use
the PDFlib library.

%package python
Summary:        Python shared library for pdflib
Group:          System Environment/Libraries
BuildRequires:  python-devel
Requires:       %{name} = %{version}-%{release}
Provides:       python-pdflib = %{version}-%{release}

%description python
PDFlib is a development tool for PDF-enabling your software, 
or generating PDF on your server. PDFlib offers a simple-to-use API
for programmatically creating PDF files from within your own server- 
or client-side software. PDFlib doesn't make use of third-party software
for generating PDF, nor does it require any other tools.

This package contains the library needed for python programs 
that will use the PDFlib library.

%package perl
Summary:        Perl shared library for pdflib
Group:          System Environment/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Provides:       perl-pdflib = %{version}-%{release}
%if 0%{?fedora} >= 7 || 0%{?rhel} >= 6
BuildRequires:  perl-devel
%endif

%description perl
PDFlib is a development tool for PDF-enabling your software, 
or generating PDF on your server. PDFlib offers a simple-to-use API
for programmatically creating PDF files from within your own server- 
or client-side software. PDFlib doesn't make use of third-party software
for generating PDF, nor does it require any other tools.

This package contains the library needed for perl programs 
that will use the PDFlib library.


%prep
%setup -q -n PDFlib-Lite-%{version}
%patch0 -p0 -b .gcc43

sed -i -e 's,^PYTHONLIBDIR.*,PYTHONLIBDIR = %{python_sitearch},' \
       -e 's,^PERLLIBDIR.*,PERLLIBDIR = %{perl_vendorarch},' \
       config/mkcommon.inc.in

%build
# C, CPP, perl and python bindings enabled
# java, ruby and tcl disabled
# File a bug with RFE and patch if you need it
%configure \
    --with-pyincl=%{python_include} \
    --with-java=no \
    --with-ruby=no \
    --with-tcl=no \
    --enable-large_files --enable-tiffwrite

# for x86_64 build
sed -e s@/usr/lib@%{_libdir}@ -i libtool
sed -e /redhat-hardened-ld/s@%{_libdir}@/usr/lib@ -i libtool

%{__make} %{?_smp_mflags}
for lang in perl python
do
  %{__make} -C bind/pdflib/$lang
done

%install
rm -rf %{buildroot} examples
mkdir -p %{buildroot}%{python_sitearch}
mkdir -p %{buildroot}%{perl_vendorarch}

make install DESTDIR=%{buildroot}
for lang in perl python
do
  make -C bind/pdflib/$lang install DESTDIR=%{buildroot}
done

install -p -m 0644 bind/pdflib/cpp/pdflib.hpp %{buildroot}%{_includedir}/pdflib.hpp

rm %{buildroot}%{_libdir}/*.{la,a}
rm %{buildroot}%{python_sitearch}/*.{la,a}
rm %{buildroot}%{perl_vendorarch}/*.{la,a}

# require to extract debuginfo
chmod +x %{buildroot}%{_libdir}/libpdf*
chmod +x %{buildroot}%{python_sitearch}/pdflib_py.so*
chmod +x %{buildroot}%{perl_vendorarch}/pdflib_pl.so*

# Only sources
mkdir -p examples/{c,cpp,perl,php,python}
cp -r bind/pdflib/data examples/data
cp bind/pdflib/c/*.c \
   bind/pdflib/c/Makefile \
   bind/pdflib/c/readme.txt \
   examples/c
cp bind/pdflib/cpp/*.cpp \
   bind/pdflib/cpp/Makefile \
   bind/pdflib/cpp/readme.txt \
   examples/cpp
cp bind/pdflib/perl/*.pl \
   bind/pdflib/perl/Makefile \
   bind/pdflib/perl/readme.txt \
   examples/perl
cp bind/pdflib/python/*.py \
   bind/pdflib/python/Makefile \
   bind/pdflib/python/readme.txt \
   examples/python
cp bind/pdflib/php/*.php \
   bind/pdflib/php/readme.txt \
   examples/php
# overwrite the default php4 one
cp bind/pdflib/php/examples.php5/*.php \
   examples/php


%clean
rm -rf %{buildroot}


%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%files
%defattr(-, root, root, -)
%doc readme.txt doc/pdflib/PDFlib-Lite-license.pdf
%{_bindir}/pdfimage
%{_bindir}/text2pdf
%{_libdir}/*.so.*


%files devel
%defattr(-, root, root, -)
%doc doc/pdflib/PDFlib-Lite-license.pdf
%doc doc/pdflib/changes.txt doc/pdflib/compatibility.txt examples
%doc doc/pdflib/PDFlib-API-reference.pdf doc/pdflib/PDFlib-tutorial.pdf doc/pdflib/readme-source-unix.txt
%{_bindir}/pdflib-config
%{_includedir}/*
%{_libdir}/*.so


%files python
%defattr(-, root, root, -)
%doc doc/pdflib/PDFlib-Lite-license.pdf
%{python_sitearch}/pdflib_py.so*


%files perl
%defattr(-, root, root, -)
%doc doc/pdflib/PDFlib-Lite-license.pdf
%{perl_vendorarch}/pdflib_pl.*


%changelog
* Fri Aug 28 2015 Remi Collet <Fedora@FamilleCollet.com> 7.0.5-5
- rebuild

* Thu Dec 19 2013 Remi Collet <Fedora@FamilleCollet.com> 7.0.5-4
- rebuild

* Sun Oct 21 2012 Remi Collet <Fedora@FamilleCollet.com> 7.0.5-3
- rebuild

* Wed Oct 10 2012 Nicolas Chauvet <kwizart@gmail.com> - 7.0.5-3
- Rebuilt for perl

* Thu Feb 09 2012 Nicolas Chauvet <kwizart@gmail.com> - 7.0.5-2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sat Jul 23 2011 Remi Collet <Fedora@FamilleCollet.com> 7.0.5-1.1
- BR perl-devel on EL-6

* Thu May 06 2010 Remi Collet <Fedora@FamilleCollet.com> 7.0.5-1
- update to 7.0.5

* Sat Jun 13 2009 Remi Collet <Fedora@FamilleCollet.com> 7.0.4p4-1
- update to 7.0.4p4

* Thu Mar 19 2009 Remi Collet <Fedora@FamilleCollet.com> 7.0.4p1-1
- update to 7.0.4p1

* Thu Mar 19 2009 Remi Collet <Fedora@FamilleCollet.com> 7.0.4-1
- update to 7.0.4

* Sat Dec 20 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 7.0.3-3
- rebuild for python 2.6

* Sun Sep 28 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 7.0.3-2
- rebuild

* Fri Mar 28 2008 Remi Collet <Fedora@FamilleCollet.com> 7.0.3-1
- update to 7.0.3
- fix CVE-2007-6561: PDFlib stack-based buffer overflows

* Sat Mar 15 2008 Thorsten Leemhuis <fedora at leemhuis.info> 7.0.2p8-2
- rebuild for new perl

* Fri Feb 29 2008 Remi Collet <Fedora@FamilleCollet.com> 7.0.2p8-1
- update to 7.0.2p8
- del destdir.patch ("make install DESTDIR" is now ok)
- add gcc43.patch for Fedora 9

* Thu Aug 16 2007 Remi Collet <Fedora@FamilleCollet.com> 7.0.2-1
- Add BR perl-devel for fedora >= 7

* Thu Aug 16 2007 Remi Collet <Fedora@FamilleCollet.com> 7.0.2-1
- update to 7.0.2

* Thu Mar 15 2007 Remi Collet <Fedora@FamilleCollet.com> 7.0.1-1
- update to 7.0.1

* Mon Dec 18 2006 Remi Collet <Fedora@FamilleCollet.com> 7.0.0p3-3
- review for Livna
- Requires/BuildRequires cleanup
- Change License = Distributable, include PDFlib-Lite-license.pdf in sub-packages
- add --with-pyinc, python2.5 not defined in configure
- add some comments

* Sun Dec 10 2006 Remi Collet <Fedora@FamilleCollet.com> 7.0.0p3-2
- add python subpackage
- add perl subpackage

* Sat Dec 09 2006 Remi Collet <Fedora@FamilleCollet.com> 7.0.0p3-1
- initial release for Extras