1 %define _modname pdflib
3 %define _sysconfdir /etc/php
4 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
5 Summary: %{_modname} - creating PDF on the fly with the PDFlib library
6 Summary(pl): %{_modname} - tworzenie PDF "w locie" za pomoc± biblioteki PDFlib
7 Name: php-pecl-%{_modname}
11 Group: Development/Languages/PHP
12 Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5: 60341f1afd61a6ec01790793473a702a
14 Patch0: %{name}-fix_includes.patch
15 URL: http://pecl.php.net/package/Modname/
16 BuildRequires: libjpeg-devel
17 BuildRequires: libpng-devel
18 BuildRequires: libtiff-devel
19 BuildRequires: pdflib-devel
20 BuildRequires: php-devel >= 3:5.0.0
21 BuildRequires: rpmbuild(macros) >= 1.254
22 BuildRequires: zlib-devel
23 %{?requires_php_extension}
24 Requires: %{_sysconfdir}/conf.d
25 Obsoletes: php-pear-%{_modname}
26 Obsoletes: php-pdf < 3:5.0.0
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 This extension wraps the PDFlib programming library for processing PDF
33 In PECL status of this extension is: %{_status}.
36 To rozszerzenie "owija" bibliotekê PDFlib przeznaczon± do tworzenia
37 dokumentów PDF "w locie".
39 To rozszerzenie ma w PECL status: %{_status}.
46 cd %{_modname}-%{version}
49 --with-png-dir=%{_prefix} \
50 --with-jpeg-dir=%{_prefix} \
51 --with-tiff-dir=%{_prefix} \
52 --with-zlib-dir=%{_prefix}
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
59 install %{_modname}-%{version}/modules/pdf.so $RPM_BUILD_ROOT%{extensionsdir}/%{_modname}.so
60 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
61 ; Enable %{_modname} extension module
62 extension=%{_modname}.so
66 rm -rf $RPM_BUILD_ROOT
69 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
70 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
74 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
75 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
79 %defattr(644,root,root,755)
80 %doc %{_modname}-%{version}/CREDITS
81 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
82 %attr(755,root,root) %{extensionsdir}/%{_modname}.so