1 %define _modname tcpwrap
3 %define _sysconfdir /etc/php
4 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
5 Summary: %{_modname} - tcpwrapper bindings
6 Summary(pl): %{_modname} - dowi±zania tcpwrapper
7 Name: php-pecl-%{_modname}
11 Group: Development/Languages/PHP
12 Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5: ed68d289c6ce0155b2bd6e62b6ed0996
14 URL: http://pecl.php.net/package/tcpwrap/
15 BuildRequires: libwrap-devel
16 BuildRequires: php-devel >= 3:5.0.0
17 BuildRequires: rpmbuild(macros) >= 1.322
18 %{?requires_php_extension}
19 Requires: %{_sysconfdir}/conf.d
20 Obsoletes: php-pear-%{_modname}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 This package handles /etc/hosts.allow and /etc/hosts.deny files.
26 In PECL status of this package is: %{_status}.
29 Za pomoc± tego pakietu mo¿liwa jest obs³uga plików /etc/hosts.allow
32 To rozszerzenie ma w PECL status: %{_status}.
38 cd %{_modname}-%{version}
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
47 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
48 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
49 ; Enable %{_modname} extension module
50 extension=%{_modname}.so
54 rm -rf $RPM_BUILD_ROOT
57 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
58 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
62 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
63 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
67 %defattr(644,root,root,755)
68 %doc %{_modname}-%{version}/{CREDITS,EXPERIMENTAL}
69 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
70 %attr(755,root,root) %{extensionsdir}/%{_modname}.so