1 %define php_name php%{?php_suffix}
2 %define modname htscanner
4 Summary: %{modname} - PHP module to emulate .htaccess support in PHP engine
5 Summary(pl.UTF-8): %{modname} - moduł PHP do emulacji obsługi .htaccess w silniku PHP
6 Name: %{php_name}-pecl-htscanner
10 Group: Development/Languages/PHP
11 Source0: http://pecl.php.net/get/htscanner-%{version}.tgz
12 # Source0-md5: 7fbef47361933fd932a2ff8f44849f0e
13 URL: http://pecl.php.net/package/htscanner/
14 BuildRequires: %{php_name}-devel >= 3:5.0.4
15 BuildRequires: rpmbuild(macros) >= 1.650
16 %{?requires_php_extension}
17 Provides: php(%{modname}) = %{version}
18 Obsoletes: php-pecl-htscanner < 1.0.1-7
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 When using a CGI version of PHP (plain old CGI or Fast-CGI) Apache
23 can't pass any PHP settings from htaccess files it parses. This can be
24 solved by giving each user it's own php.ini file, but I didn't like
27 This extension parses these configuration files (in most cases
28 .htaccess) and changes the settings. It will search all directories
29 for a configuration file from the docroot until the directory where
30 the request scripts is found.
32 In PECL status of this extension is: %{status}.
34 %description -l pl.UTF-8
35 Przy używaniu PHP w wersji CGI (zwykłej CGI lub Fast-CGI) Apache nie
36 może przekazać ustawień PHP z plików htaccess. Można to rozwiązać
37 dając każdemu użytkownikowi własny plik php.ini, ale nie wszystkim to
38 rozwiązanie odpowiada.
40 To rozszerzenie analizuje wspomniane pliki konfiguracyjne (w
41 większości przypadków .htaccess) i zmienia ustawienia. Szuka pliku
42 konfiguracyjnego we kwszystkich katalogach od głównego (DocumentRoot)
43 co katalogu zawierającego żadane skrypty.
45 To rozszerzenie ma w PECL status: %{status}.
48 %setup -q -n htscanner-%{version}
57 rm -rf $RPM_BUILD_ROOT
59 INSTALL_ROOT=$RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
62 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
63 ; Enable %{modname} extension module
64 extension=%{modname}.so
66 ;htscanner.config_file = .htaccess
67 ;htscanner.default_docroot = /
68 ;htscanner.default_ttl = 300
69 ;htscanner.stop_on_error = 0
73 rm -rf $RPM_BUILD_ROOT
76 %php_webserver_restart
80 %php_webserver_restart
84 %defattr(644,root,root,755)
86 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
87 %attr(755,root,root) %{php_extensiondir}/%{modname}.so