]> git.pld-linux.org Git - packages/php-pecl-htscanner.git/blob - php-pecl-htscanner.spec
f49fd05b03d067d0be77eff2f9e99b6c9c6bf631
[packages/php-pecl-htscanner.git] / php-pecl-htscanner.spec
1 %define         _modname        htscanner
2 %define         _status         stable
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
6 Version:        1.0.1
7 Release:        4
8 License:        PHP 3.01
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)
19
20 %description
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
24 that solution.
25
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.
30
31 In PECL status of this extension is: %{_status}.
32
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.
38
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.
43
44 To rozszerzenie ma w PECL status: %{_status}.
45
46 %prep
47 %setup -q -n htscanner-%{version}
48
49 %build
50 phpize
51 %configure \
52         --enable-htscanner
53 %{__make}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 %{__make} install \
58         INSTALL_ROOT=$RPM_BUILD_ROOT
59
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
64
65 ;htscanner.config_file          = .htaccess
66 ;htscanner.default_docroot      = /
67 ;htscanner.default_ttl          = 300
68 ;htscanner.stop_on_error        = 0
69 EOF
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %post
75 %php_webserver_restart
76
77 %postun
78 if [ "$1" = 0 ]; then
79         %php_webserver_restart
80 fi
81
82 %files
83 %defattr(644,root,root,755)
84 %doc CREDITS README
85 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
86 %attr(755,root,root) %{php_extensiondir}/%{_modname}.so
This page took 0.056503 seconds and 3 git commands to generate.