]> git.pld-linux.org Git - packages/php-pecl-pdflib.git/blob - php-pecl-pdflib.spec
5155bca7b1ad4f881ecd18dd675660aa6d9375de
[packages/php-pecl-pdflib.git] / php-pecl-pdflib.spec
1 %define         _modname        pdflib
2 %define         _status         stable
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}
8 Version:        1.0
9 Release:        2
10 License:        PHP
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)
28
29 %description
30 This extension wraps the PDFlib programming library for processing PDF
31 on the fly.
32
33 In PECL status of this extension is: %{_status}.
34
35 %description -l pl
36 To rozszerzenie "owija" bibliotekê PDFlib przeznaczon± do tworzenia
37 dokumentów PDF "w locie".
38
39 To rozszerzenie ma w PECL status: %{_status}.
40
41 %prep
42 %setup -q -c
43 %patch0 -p1
44
45 %build
46 cd %{_modname}-%{version}
47 phpize
48 %configure \
49         --with-png-dir=%{_prefix} \
50         --with-jpeg-dir=%{_prefix} \
51         --with-tiff-dir=%{_prefix} \
52         --with-zlib-dir=%{_prefix}
53 %{__make}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
58
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
63 EOF
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %post
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
71
72 %postun
73 if [ "$1" = 0 ]; then
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
76 fi
77
78 %files
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
This page took 0.043489 seconds and 2 git commands to generate.