3 %define _sysconfdir /etc/php
4 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
5 Summary: %{_modname} - checks if password is vulnerable to dictionary attacks
6 Summary(pl): %{_modname} - sprawdzanie czy has³o jest podatne na ataki s³ownikowe
7 Name: php-pecl-%{_modname}
11 Group: Development/Languages/PHP
12 Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5: 43a3dc3e4f2d16bf1e30ccea0d384183
14 Patch0: %{name}-m4_fixes.patch
15 URL: http://pecl.php.net/package/crack/
16 BuildRequires: cracklib-devel
17 BuildRequires: php-devel >= 3:5.0.0
18 BuildRequires: rpmbuild(macros) >= 1.254
19 %{?requires_php_extension}
21 Obsoletes: php-pear-%{_modname}
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 This package provides an interface to the cracklib (libcrack)
26 libraries that come standard on most unix-like distributions. This
27 allows you to check passwords against dictionaries of words to ensure
28 some minimal level of password security.
30 In PECL status of this extension is: %{_status}.
33 Ten pakiet dostarcza interfejsu do bibliotek cracklib (libcrack),
34 dostarczanych z wiêkszo¶ci± dystrybucji uniksopodobnych. Pozwala to na
35 porównanie hase³ wzglêdem s³owników celem zapewnienia minimalnego
36 poziomu bezpieczeñstwa.
38 To rozszerzenie ma w PECL status: %{_status}.
45 cd %{_modname}-%{version}
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
54 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
55 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
56 ; Enable %{_modname} extension module
57 extension=%{_modname}.so
61 rm -rf $RPM_BUILD_ROOT
64 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
65 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
69 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
70 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
74 %defattr(644,root,root,755)
75 %doc %{_modname}-%{version}/{CREDITS,EXPERIMENTAL}
76 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
77 %attr(755,root,root) %{extensionsdir}/%{_modname}.so