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