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