]>
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 |
0c96e292 | 8 | Release: 8 |
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/ |
0c96e292 | 14 | BuildRequires: %{php_name}-devel >= 3:5.0.4 |
8a8bfd9d | 15 | BuildRequires: rpmbuild(macros) >= 1.650 |
e68fcc29 | 16 | %{?requires_php_extension} |
3e1211c4 | 17 | Provides: php(%{modname}) = %{version} |
0c96e292 | 18 | Obsoletes: php-pecl-htscanner < 1.0.1-7 |
e68fcc29 AG |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
52239da2 AG |
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 | |
25 | that solution. | |
26 | ||
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. | |
e68fcc29 | 31 | |
8a8bfd9d | 32 | In PECL status of this extension is: %{status}. |
e68fcc29 | 33 | |
e6c2ac6c | 34 | %description -l pl.UTF-8 |
52239da2 AG |
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. | |
39 | ||
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. | |
e68fcc29 | 44 | |
8a8bfd9d | 45 | To rozszerzenie ma w PECL status: %{status}. |
e68fcc29 AG |
46 | |
47 | %prep | |
52239da2 AG |
48 | %setup -q -n htscanner-%{version} |
49 | ||
e68fcc29 | 50 | %build |
e68fcc29 | 51 | phpize |
52239da2 AG |
52 | %configure \ |
53 | --enable-htscanner | |
e68fcc29 AG |
54 | %{__make} |
55 | ||
56 | %install | |
57 | rm -rf $RPM_BUILD_ROOT | |
e68fcc29 | 58 | %{__make} install \ |
52239da2 AG |
59 | INSTALL_ROOT=$RPM_BUILD_ROOT |
60 | ||
61 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} | |
8a8bfd9d ER |
62 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini |
63 | ; Enable %{modname} extension module | |
64 | extension=%{modname}.so | |
52239da2 AG |
65 | |
66 | ;htscanner.config_file = .htaccess | |
67 | ;htscanner.default_docroot = / | |
68 | ;htscanner.default_ttl = 300 | |
69 | ;htscanner.stop_on_error = 0 | |
e68fcc29 AG |
70 | EOF |
71 | ||
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %post | |
76 | %php_webserver_restart | |
77 | ||
78 | %postun | |
79 | if [ "$1" = 0 ]; then | |
80 | %php_webserver_restart | |
81 | fi | |
82 | ||
83 | %files | |
84 | %defattr(644,root,root,755) | |
52239da2 | 85 | %doc CREDITS README |
8a8bfd9d ER |
86 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini |
87 | %attr(755,root,root) %{php_extensiondir}/%{modname}.so |