]> git.pld-linux.org Git - packages/pdflib.git/blob - pdflib.spec
- Release 3
[packages/pdflib.git] / pdflib.spec
1 %include        /usr/lib/rpm/macros.perl
2
3 %define python_dir %(echo `python -c "import sys; print (sys.prefix + '/lib/python' + sys.version[:3])"`)
4 %define python_include_dir %(echo `python -c "import sys; print (sys.prefix + '/include/python' + sys.version[:3])"`)
5
6 Summary:        Portable C library for dynamically generating PDF files
7 Name:           pdflib
8 Version:        3.03
9 Release:        3
10 License:        GPL
11 Group:          Libraries
12 Group(fr):      Librairies
13 Group(pl):      Biblioteki
14 Source0:        http://www.pdflib.com/pdflib/download/%{name}-%{version}.tar.gz
15 Patch0:         pdflib-DESTDIR.patch
16 BuildRequires:  python-devel
17 BuildRequires:  perl-devel
18 BuildRequires:  tcl-devel
19 BuildRequires:  zlib-devel
20 BuildRequires:  libpng-devel >= 1.0.8
21 BuildRequires:  libtiff-devel
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 PDFlib is a C library for generating PDF files. It offers a graphics
26 API with support for drawing, text, fonts, images, and hypertext. Call
27 PDFlib routines from within your client program and voila: dynamic PDF
28 files! For detailed instructions on PDFlib programming and the
29 associated API, see the PDFlib Programming Manual, included in PDF
30 format in the PDFlib distribution.
31
32 %package devel
33 Summary:        Header file for pdflib
34 Group:          Development/Libraries
35 Requires:       %{name} = %{version}
36
37 %description devel
38 This package contains the files needed for compiling programs using
39 the PDF library.
40
41 %package perl
42 Summary:        Perl bindings for pdflib
43 Group:          Development/Languages/Perl
44 Group(pl):      Programowanie/Jêzyki/Perl
45 Requires:       %{name} = %{version}
46
47 %description perl
48 Perl bindings for pdflib.
49
50 %package tcl
51 Summary:        Tcl bindings for pdflib
52 Group:          Development/Languages/Tcl
53 Group(pl):      Programowanie/Jêzyki/Tcl
54 Requires:       %{name} = %{version}
55
56 %description tcl
57 Tcl bindings for pdflib.
58
59 %package python
60 Summary:        Python bindings for pdflib
61 Group:          Development/Languages/Python
62 Group(pl):      Programowanie/Jêzyki/Python
63 Requires:       %{name} = %{version}
64
65 %description python
66 Python bindings for pdflib.
67
68 %package static
69 Summary:        Static libraries for pdflib
70 Group:          Development/Libraries
71 Requires:       %{name}-devel = %{version}
72
73 %description static
74 Static libraries for pdflib.
75
76 %prep
77 %setup -q
78 %patch -p1
79
80 %build
81 libtoolize --copy --force
82 autoconf
83 # build as shared library - bindings are not build
84 %configure \
85         --enable-cxx \
86         --enable-shared-pdflib
87 %{__make}
88  
89 install -d pdf-libs
90 cp -a pdflib/.libs/* pdf-libs
91 rm pdf-libs/libpdf.la
92 sed  -e 's/^installed=.*/installed=yes/' pdflib/libpdf.la >pdf-libs/libpdf.la
93 make distclean
94
95 # build as static library - bindings are build
96 %configure \
97         --enable-cxx \
98         --with-py=%{python_dir} --with-pyincl=%{python_include_dir} \
99         --with-perl=/usr/bin/perl \
100         --with-tcl=/usr/bin/tclsh
101 %{__make}
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 %{__make} install DESTDIR=$RPM_BUILD_ROOT
107
108 install ./bind/cpp/pdflib.hpp $RPM_BUILD_ROOT%{_includedir}
109
110 cp -a pdf-libs/* $RPM_BUILD_ROOT%{_libdir}
111
112 gzip -9nf readme.txt doc/*.txt
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post   -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
119
120 %files
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/lib*.so.*.*
123
124 %files devel
125 %defattr(644,root,root,755)
126 %doc *.gz doc/*
127 %attr(755,root,root) %{_libdir}/lib*.so
128 %attr(755,root,root) %{_libdir}/lib*.la
129 %{_includedir}/pdflib.h
130 %{_includedir}/pdflib.hpp
131
132 %files perl
133 %defattr(644,root,root,755)
134 %{perl_sitearch}/pdflib_pl.pm
135 %attr(755,root,root) %{perl_sitearch}/pdflib_pl.so*
136
137 %files tcl
138 %defattr(644,root,root,755)
139 %{_libdir}/tcl*/pdflib/pdflib_tcl.so.*
140 %{_libdir}/tcl*/pdflib/pkgIndex.tcl
141
142 %files python
143 %defattr(644,root,root,755)
144 %{python_dir}/lib-dynload/pdflib_py.so.*
145
146 %files static
147 %defattr(644,root,root,755)
148 %{_libdir}/libpdf.a
149 %{perl_sitearch}/pdflib_pl.a
150 %{_libdir}/tcl*/pdflib/pdflib_tcl.a
151 %{python_dir}/lib-dynload/pdflib_py.a
This page took 0.035744 seconds and 4 git commands to generate.