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