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