]> git.pld-linux.org Git - packages/pdflib.git/blob - pdflib.spec
- perl -pi -e "s/^libtoolize --copy --force/\%\{__libtoolize\}/"
[packages/pdflib.git] / pdflib.spec
1
2 %include        /usr/lib/rpm/macros.perl
3 %include        /usr/lib/rpm/macros.python
4
5 Summary:        Portable C library for dynamically generating PDF files
6 Summary(pl):    Przeno¶na biblioteka C do dynamicznej generacji plików PDF
7 Name:           pdflib
8 Version:        4.0.2
9 Release:        3
10 License:        Alladin Free Public License
11 Group:          Libraries
12 Source0:        http://www.pdflib.com/pdflib/download/%{name}-%{version}.tar.gz
13 Patch0:         %{name}-DESTDIR.patch
14 Patch1:         %{name}-shared-libs.patch
15 BuildRequires:  autoconf
16 BuildRequires:  automake
17 BuildRequires:  libpng-devel >= 1.0.8
18 BuildRequires:  libtiff-devel
19 BuildRequires:  libtool
20 BuildRequires:  perl-devel >= 5.6.1
21 BuildRequires:  python-devel >= 2.2
22 BuildRequires:  python-modules >= 2.2
23 BuildRequires:  tcl-devel
24 BuildRequires:  zlib-devel
25 URL:            http://www.pdflib.com/
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 PDFlib is a C library for generating PDF files. It offers a graphics
30 API with support for drawing, text, fonts, images, and hypertext. Call
31 PDFlib routines from within your client program and voila: dynamic PDF
32 files! For detailed instructions on PDFlib programming and the
33 associated API, see the PDFlib Programming Manual, included in PDF
34 format in the PDFlib distribution.
35
36 %description -l pl
37 PDFlib to biblioteka w C do generowania plików PDF. Oferuje ona API do
38 obs³ugi grafiki ze wsparciem dla rysowania, tekstów, fontów, obrazków
39 oraz hipertekstu.
40
41 %package devel
42 Summary:        Header file for pdflib
43 Summary(pl):    Pliki nag³ówkowe dla %{name}
44 Group:          Development/Libraries
45 Requires:       %{name} = %{version}
46
47 %description devel
48 This package contains the files needed for compiling programs using
49 the PDF library.
50
51 %description devel -l pl
52 Pakiet zawiera pliki potrzebne do kompilacji programów u¿ywaj±cych
53 biblioteki PDF.
54
55 %package perl
56 Summary:        Perl bindings for pdflib
57 Summary(pl):    Dowi±zania Perla do pdflib
58 Group:          Development/Languages/Perl
59 Requires:       %{name} = %{version}
60 Obsoletes:      %{name}-perl5
61
62 %description perl
63 Perl bindings for pdflib.
64
65 %description perl -l pl
66 Dowi±zania Perla do pdflib.
67
68 %package tcl
69 Summary:        Tcl bindings for pdflib
70 Summary(pl):    Dowi±zania Tcl do pdflib
71 Group:          Development/Languages/Tcl
72 Requires:       %{name} = %{version}
73 Obsoletes:      %{name}-tcl8.0
74
75 %description tcl
76 Tcl bindings for pdflib.
77
78 %description tcl -l pl
79 Dowi±zania TCL dla pdflib.
80
81 %package python
82 Summary:        Python bindings for pdflib
83 Summary(pl):    Dowi±zania pythona dla pdflib
84 Group:          Development/Languages/Python
85 Requires:       %{name} = %{version}
86 %pyrequires_eq  python
87 Obsoletes:      %{name}-python1.5
88
89 %description python
90 Python bindings for pdflib.
91
92 %description python -l pl
93 Dowi±zania pythona dla pdflib.
94
95 %package static
96 Summary:        Static libraries for pdflib
97 Summary(pl):    Statyczna biblioteka pdflib
98 Group:          Development/Libraries
99 Requires:       %{name}-devel = %{version}
100
101 %description static
102 Static libraries for pdflib.
103
104 %description static -l pl
105 Statyczna biblioteka pdflib.
106
107 %prep
108 %setup -q
109 %patch0 -p1
110 %patch1 -p1
111
112 %build
113 %{__libtoolize}
114 aclocal --output=config/aclocal.m4
115 %{__autoconf}
116 if [ -f %{_pkgconfigdir}/libpng12.pc ] ; then
117         CPPFLAGS="`pkg-config libpng12 --cflags`"
118 fi
119
120 %configure CPPFLAGS="$CPPFLAGS" \
121         --enable-cxx \
122         --enable-shared-pdflib \
123         --with-py=%{py_sitedir} --with-pyincl=%{py_incdir} \
124         --with-perl=%{_bindir}/perl \
125         --with-tcl=%{_bindir}/tclsh \
126         --with-zlib \
127         --with-pnglib \
128         --with-tifflib
129
130 %{__make} CPPFLAGS="$CPPFLAGS" 
131
132 %install
133 rm -rf $RPM_BUILD_ROOT
134
135 # arrrghh!!! libtool 1.4 supports linking with non-installed library,
136 # but without DESTDIR! use hack to avoid "relinking" (which requires
137 # libpdf already installed in /usr/lib).
138 for f in bind/{perl/pdflib_pl,python/pdflib_py,tcl/pdflib_tcl}.la ; do
139         sed -e '/^relink_command=/d' $f > $f.new
140         mv -f $f.new $f
141 done
142
143 %{__make} install DESTDIR=$RPM_BUILD_ROOT
144
145 install ./bind/cpp/pdflib.hpp $RPM_BUILD_ROOT%{_includedir}
146
147 %clean
148 rm -rf $RPM_BUILD_ROOT
149
150 %post   -p /sbin/ldconfig
151 %postun -p /sbin/ldconfig
152
153 %files
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_libdir}/lib*.so.*.*
156
157 %files devel
158 %defattr(644,root,root,755)
159 %doc readme.txt doc/{readme_unix,compatibility}.txt
160 %attr(755,root,root) %{_libdir}/lib*.so
161 %attr(755,root,root) %{_libdir}/lib*.la
162 %{_includedir}/pdflib.h
163 %{_includedir}/pdflib.hpp
164
165 %files perl
166 %defattr(644,root,root,755)
167 %{perl_sitearch}/pdflib_pl.pm
168 %attr(755,root,root) %{perl_sitearch}/pdflib_pl.so*
169
170 %files tcl
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_libdir}/tcl*/pdflib/pdflib_tcl.so.*
173 %{_libdir}/tcl*/pdflib/pkgIndex.tcl
174
175 %files python
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{py_libdir}/lib-dynload/pdflib_py.so.*
178
179 %files static
180 %defattr(644,root,root,755)
181 %{_libdir}/libpdf.a
182 %{perl_sitearch}/pdflib_pl.a
183 %{_libdir}/tcl*/pdflib/pdflib_tcl.a
184 %{py_libdir}/lib-dynload/pdflib_py.a
This page took 0.037892 seconds and 3 git commands to generate.