]>
Commit | Line | Data |
---|---|---|
fc1df23f ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
9ec83f18 | 5 | %define php_name php%{?php_suffix} |
fc1df23f ER |
6 | %define modname - |
7 | Summary: %{modname} - | |
8 | Summary(pl.UTF-8): %{modname} - | |
9ec83f18 | 9 | Name: %{php_name}-pecl-%{modname} |
a7223ec4 AG |
10 | Version: 1.0 |
11 | Release: 1 | |
4099af7d | 12 | License: PHP 3.01 |
a7223ec4 | 13 | Group: Development/Languages/PHP |
fc1df23f | 14 | Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz |
dc5e1efb | 15 | # Source0-md5: - |
9ec83f18 ER |
16 | URL: http://pecl.php.net/package/modname/ |
17 | BuildRequires: %{php_name}-devel | |
3ad11c3e | 18 | BuildRequires: rpmbuild(macros) >= 1.666 |
672c5afc | 19 | %{?requires_php_extension} |
a7223ec4 AG |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
a7223ec4 AG |
22 | %description |
23 | ||
9be49f18 | 24 | %description -l pl.UTF-8 |
a7223ec4 | 25 | |
a7223ec4 | 26 | %prep |
05e722ff | 27 | %setup -qc |
fc1df23f | 28 | mv %{modname}-%{version}/* . |
a7223ec4 AG |
29 | |
30 | %build | |
a7223ec4 AG |
31 | phpize |
32 | %configure | |
33 | %{__make} | |
34 | ||
35 | %install | |
36 | rm -rf $RPM_BUILD_ROOT | |
f6dd55ea | 37 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d |
9c71ffdc ER |
38 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} |
39 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}} | |
a7223ec4 | 40 | |
852624ea | 41 | %{__make} install \ |
0ec203b9 ER |
42 | EXTENSION_DIR=%{php_extensiondir} \ |
43 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
01c11931 ER |
44 | |
45 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d | |
fc1df23f ER |
46 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini |
47 | ; Enable %{modname} extension module | |
48 | extension=%{modname}.so | |
ceb2ba66 | 49 | EOF |
a7223ec4 | 50 | |
68c7fa4c | 51 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
9c71ffdc ER |
52 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
53 | ||
a7223ec4 AG |
54 | %clean |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %post | |
6e284c47 | 58 | %php_webserver_restart |
a7223ec4 | 59 | |
ceb2ba66 AG |
60 | %postun |
61 | if [ "$1" = 0 ]; then | |
6e284c47 | 62 | %php_webserver_restart |
a7223ec4 AG |
63 | fi |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
f8cfa67b | 67 | %doc CREDITS EXPERIMENTAL |
fc1df23f ER |
68 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini |
69 | %attr(755,root,root) %{php_extensiondir}/%{modname}.so | |
9c71ffdc | 70 | %{_examplesdir}/%{name}-%{version} |