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