]> git.pld-linux.org Git - packages/php-pecl-tcpwrap.git/blob - php-pecl-tcpwrap.spec
d869049eae0008a53aa5e7c19424c3ec27678c9c
[packages/php-pecl-tcpwrap.git] / php-pecl-tcpwrap.spec
1 %define         _modname        tcpwrap
2 %define         _status         stable
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}
8 Version:        1.0
9 Release:        2
10 License:        PHP 2.02
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)
22
23 %description
24 This package handles /etc/hosts.allow and /etc/hosts.deny files.
25
26 In PECL status of this package is: %{_status}.
27
28 %description -l pl
29 Za pomoc± tego pakietu mo¿liwa jest obs³uga plików /etc/hosts.allow
30 oraz /etc/hosts.deny.
31
32 To rozszerzenie ma w PECL status: %{_status}.
33
34 %prep
35 %setup -q -c
36
37 %build
38 cd %{_modname}-%{version}
39 phpize
40 %configure
41 %{__make}
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
46
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
51 EOF
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post
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
59
60 %postun
61 if [ "$1" = 0 ]; then
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
64 fi
65
66 %files
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
This page took 0.075712 seconds and 2 git commands to generate.