4 %define _sysconfdir /etc/php
5 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
6 Summary: %{_modname} - a NIS client for PHP
7 Summary(pl): %{_modname} - klient NIS dla PHP
8 Name: php-pecl-%{_modname}
12 Group: Development/Languages/PHP
13 Source0: %{name}-%{_snap}.tar.gz
14 # Source0-md5: ea77871191b0a32c4734964f7c02bc6c
15 URL: http://cvs.php.net/pecl/yp/
16 BuildRequires: php-devel >= 3:5.0.0
17 BuildRequires: rpmbuild(macros) >= 1.322
18 %{?requires_php_extension}
19 Requires: %{_sysconfdir}/conf.d
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 This is a dynamic shared object (DSO) for PHP that will add NIS
26 (Yellow Pages) support.
29 Modu³ PHP dodaj±cy wsparcie dla NIS (Yellow Pages).
32 %setup -q -n %{name}-%{_snap}
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
43 install modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
44 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
45 ; Enable %{_modname} extension module
46 extension=%{_modname}.so
50 rm -rf $RPM_BUILD_ROOT
53 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
54 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
58 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
59 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
63 %defattr(644,root,root,755)
65 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
66 %attr(755,root,root) %{extensionsdir}/%{_modname}.so