]>
Commit | Line | Data |
---|---|---|
5c7c656c ER |
1 | %define modname pdflib |
2 | %define smodname pdf | |
3 | %define status stable | |
4 | Summary: %{modname} - creating PDF on the fly with the PDFlib library | |
5 | Summary(pl.UTF-8): %{modname} - tworzenie PDF "w locie" za pomocą biblioteki PDFlib | |
6 | Name: php-pecl-%{modname} | |
7 | Version: 2.1.8 | |
cbd0fd89 | 8 | Release: 2 |
61e8b327 | 9 | License: PHP |
596d3329 | 10 | Group: Development/Languages/PHP |
5c7c656c ER |
11 | Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz |
12 | # Source0-md5: ee1b7c30b68b2caba8a95ef9a45e9b84 | |
13 | URL: http://pecl.php.net/package/pdflib/ | |
e6d2669d | 14 | BuildRequires: libjpeg-devel |
e6d2669d | 15 | BuildRequires: libpng-devel |
61e8b327 | 16 | BuildRequires: libtiff-devel |
e6d2669d | 17 | BuildRequires: pdflib-devel |
8b8740f7 | 18 | BuildRequires: php-devel >= 3:5.0.0 |
ac96e783 | 19 | BuildRequires: rpmbuild(macros) >= 1.344 |
e6d2669d | 20 | BuildRequires: zlib-devel |
8b8740f7 | 21 | %{?requires_php_extension} |
ac96e783 | 22 | Requires: php-common >= 4:5.0.4 |
5c7c656c | 23 | Obsoletes: php-pear-%{modname} |
e6d2669d | 24 | Obsoletes: php-pdf < 3:5.0.0 |
596d3329 AG |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
596d3329 | 27 | %description |
61e8b327 ER |
28 | This extension wraps the PDFlib programming library for processing PDF |
29 | on the fly. | |
596d3329 | 30 | |
5c7c656c | 31 | In PECL status of this extension is: %{status}. |
596d3329 | 32 | |
4ac52193 JR |
33 | %description -l pl.UTF-8 |
34 | To rozszerzenie "owija" bibliotekę PDFlib przeznaczoną do tworzenia | |
35 | dokumentów PDF "w locie". | |
596d3329 | 36 | |
5c7c656c | 37 | To rozszerzenie ma w PECL status: %{status}. |
596d3329 AG |
38 | |
39 | %prep | |
5c7c656c ER |
40 | %setup -qc |
41 | mv %{modname}-%{version}/* . | |
596d3329 AG |
42 | |
43 | %build | |
596d3329 AG |
44 | phpize |
45 | %configure \ | |
46 | --with-png-dir=%{_prefix} \ | |
47 | --with-jpeg-dir=%{_prefix} \ | |
48 | --with-tiff-dir=%{_prefix} \ | |
49 | --with-zlib-dir=%{_prefix} | |
50 | %{__make} | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
ac96e783 | 54 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} |
596d3329 | 55 | |
5c7c656c ER |
56 | install -p modules/%{smodname}.so $RPM_BUILD_ROOT%{php_extensiondir} |
57 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini | |
58 | ; Enable %{modname} extension module | |
59 | extension=%{smodname}.so | |
8b8740f7 | 60 | EOF |
596d3329 AG |
61 | |
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %post | |
ac96e783 | 66 | %php_webserver_restart |
596d3329 | 67 | |
8b8740f7 ER |
68 | %postun |
69 | if [ "$1" = 0 ]; then | |
ac96e783 | 70 | %php_webserver_restart |
596d3329 AG |
71 | fi |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
5c7c656c ER |
75 | %doc CREDITS |
76 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini | |
77 | %attr(755,root,root) %{php_extensiondir}/%{smodname}.so |