]> git.pld-linux.org Git - packages/php-pecl-htscanner.git/blame - php-pecl-htscanner.spec
provide php(extname) to really be supporting multiple php versions
[packages/php-pecl-htscanner.git] / php-pecl-htscanner.spec
CommitLineData
8a8bfd9d
ER
1%define php_name php%{?php_suffix}
2%define modname htscanner
3%define status stable
4Summary: %{modname} - PHP module to emulate .htaccess support in PHP engine
5Summary(pl.UTF-8): %{modname} - moduł PHP do emulacji obsługi .htaccess w silniku PHP
6Name: %{php_name}-pecl-htscanner
970c3295 7Version: 1.0.1
3e1211c4 8Release: 6
86f32982 9License: PHP 3.01
e68fcc29 10Group: Development/Languages/PHP
52239da2 11Source0: http://pecl.php.net/get/htscanner-%{version}.tgz
970c3295 12# Source0-md5: 7fbef47361933fd932a2ff8f44849f0e
86f32982 13URL: http://pecl.php.net/package/htscanner/
8a8bfd9d
ER
14BuildRequires: %{php_name}-devel >= 3:5.0
15BuildRequires: rpmbuild(macros) >= 1.650
e68fcc29 16%{?requires_php_extension}
b5a9039a 17Requires: php(core) >= 5.0.4
3e1211c4 18Provides: php(%{modname}) = %{version}
408bbcdf 19Obsoletes: php-htscanner
e68fcc29
AG
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22%description
52239da2
AG
23When using a CGI version of PHP (plain old CGI or Fast-CGI) Apache
24can't pass any PHP settings from htaccess files it parses. This can be
25solved by giving each user it's own php.ini file, but I didn't like
26that solution.
27
28This extension parses these configuration files (in most cases
29.htaccess) and changes the settings. It will search all directories
30for a configuration file from the docroot until the directory where
31the request scripts is found.
e68fcc29 32
8a8bfd9d 33In PECL status of this extension is: %{status}.
e68fcc29 34
e6c2ac6c 35%description -l pl.UTF-8
52239da2
AG
36Przy używaniu PHP w wersji CGI (zwykłej CGI lub Fast-CGI) Apache nie
37może przekazać ustawień PHP z plików htaccess. Można to rozwiązać
38dając każdemu użytkownikowi własny plik php.ini, ale nie wszystkim to
39rozwiązanie odpowiada.
40
41To rozszerzenie analizuje wspomniane pliki konfiguracyjne (w
42większości przypadków .htaccess) i zmienia ustawienia. Szuka pliku
43konfiguracyjnego we kwszystkich katalogach od głównego (DocumentRoot)
44co katalogu zawierającego żadane skrypty.
e68fcc29 45
8a8bfd9d 46To rozszerzenie ma w PECL status: %{status}.
e68fcc29
AG
47
48%prep
52239da2
AG
49%setup -q -n htscanner-%{version}
50
e68fcc29 51%build
e68fcc29 52phpize
52239da2
AG
53%configure \
54 --enable-htscanner
e68fcc29
AG
55%{__make}
56
57%install
58rm -rf $RPM_BUILD_ROOT
e68fcc29 59%{__make} install \
52239da2
AG
60 INSTALL_ROOT=$RPM_BUILD_ROOT
61
62install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
8a8bfd9d
ER
63cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
64; Enable %{modname} extension module
65extension=%{modname}.so
52239da2
AG
66
67;htscanner.config_file = .htaccess
68;htscanner.default_docroot = /
69;htscanner.default_ttl = 300
70;htscanner.stop_on_error = 0
e68fcc29
AG
71EOF
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%post
77%php_webserver_restart
78
79%postun
80if [ "$1" = 0 ]; then
81 %php_webserver_restart
82fi
83
84%files
85%defattr(644,root,root,755)
52239da2 86%doc CREDITS README
8a8bfd9d
ER
87%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
88%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.086103 seconds and 4 git commands to generate.