]>
Commit | Line | Data |
---|---|---|
c2668365 | 1 | %define php_name php%{?php_suffix} |
c7b8934c | 2 | %define modname cairo |
458ff9d0 | 3 | %define status beta |
a6598950 AG |
4 | Summary: Cairo Graphics Library Extension |
5 | Summary(pl.UTF-8): Rozszerzenie biblioteki Cairo | |
c2668365 | 6 | Name: %{php_name}-pecl-%{modname} |
458ff9d0 | 7 | Version: 0.3.2 |
e0538570 | 8 | Release: 4 |
a6598950 AG |
9 | License: PHP 3.01 |
10 | Group: Development/Languages/PHP | |
11 | Source0: http://pecl.php.net/get/Cairo-%{version}.tgz | |
458ff9d0 | 12 | # Source0-md5: e89d0842eef2b3111b4579b4a4753dda |
a6598950 | 13 | URL: http://pecl.php.net/package/Cairo/ |
c2668365 | 14 | BuildRequires: %{php_name}-devel >= 4:5.2.0 |
458ff9d0 | 15 | BuildRequires: cairo-devel >= 1.4 |
d00764e6 | 16 | BuildRequires: pkgconfig |
c2668365 | 17 | BuildRequires: rpmbuild(macros) >= 1.650 |
d00764e6 | 18 | BuildRequires: which |
a6598950 | 19 | %{?requires_php_extension} |
aaed8345 | 20 | Provides: php(%{modname}) = %{version} |
a6598950 AG |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %description | |
24 | Cairo is a 2D graphics library with support for multiple output | |
25 | devices. Currently supported output targets include the X Window | |
26 | System, Quartz, Win32, image buffers, PostScript, PDF, and SVG file | |
27 | output. | |
28 | ||
c7b8934c | 29 | In PECL status of this extension is: %{status}. |
a6598950 | 30 | |
c7b8934c ER |
31 | %package devel |
32 | Summary: Header files for Cairo PECL extension | |
33 | Group: Development/Libraries | |
035351af | 34 | # does not require base |
c2668365 | 35 | Requires: %{php_name}-devel >= 4:5.2.0 |
c7b8934c ER |
36 | |
37 | %description devel | |
38 | Header files for Cairo PECL extension. | |
a6598950 AG |
39 | |
40 | %prep | |
c7b8934c | 41 | %setup -qc |
a6598950 AG |
42 | mv Cairo-%{version}/* . |
43 | ||
44 | %build | |
45 | phpize | |
46 | %configure | |
47 | %{__make} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d | |
52 | ||
53 | %{__make} install \ | |
54 | INSTALL_ROOT=$RPM_BUILD_ROOT \ | |
55 | EXTENSION_DIR=%{php_extensiondir} | |
c7b8934c ER |
56 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini |
57 | ; Enable %{modname} extension module | |
58 | extension=%{modname}.so | |
a6598950 AG |
59 | EOF |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %post | |
65 | %php_webserver_restart | |
66 | ||
67 | %postun | |
68 | if [ "$1" = 0 ]; then | |
69 | %php_webserver_restart | |
70 | fi | |
71 | ||
72 | %files | |
73 | %defattr(644,root,root,755) | |
74 | %doc README SYMBOLS TODO | |
c7b8934c ER |
75 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini |
76 | %attr(755,root,root) %{php_extensiondir}/%{modname}.so | |
77 | ||
78 | %files devel | |
79 | %defattr(644,root,root,755) | |
80 | %dir %{php_includedir}/ext/cairo | |
81 | %{php_includedir}/ext/cairo/php_cairo_api.h |