]> git.pld-linux.org Git - packages/php-pecl-htscanner.git/blob - php-pecl-htscanner.spec
- obsolete old php name
[packages/php-pecl-htscanner.git] / php-pecl-htscanner.spec
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
7 Version:        1.0.1
8 Release:        8
9 License:        PHP 3.01
10 Group:          Development/Languages/PHP
11 Source0:        http://pecl.php.net/get/htscanner-%{version}.tgz
12 # Source0-md5:  7fbef47361933fd932a2ff8f44849f0e
13 URL:            http://pecl.php.net/package/htscanner/
14 BuildRequires:  %{php_name}-devel >= 3:5.0.4
15 BuildRequires:  rpmbuild(macros) >= 1.650
16 %{?requires_php_extension}
17 Provides:       php(%{modname}) = %{version}
18 Obsoletes:      php-pecl-htscanner < 1.0.1-7
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
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.
31
32 In PECL status of this extension is: %{status}.
33
34 %description -l pl.UTF-8
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.
44
45 To rozszerzenie ma w PECL status: %{status}.
46
47 %prep
48 %setup -q -n htscanner-%{version}
49
50 %build
51 phpize
52 %configure \
53         --enable-htscanner
54 %{__make}
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 %{__make} install \
59         INSTALL_ROOT=$RPM_BUILD_ROOT
60
61 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
62 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
63 ; Enable %{modname} extension module
64 extension=%{modname}.so
65
66 ;htscanner.config_file          = .htaccess
67 ;htscanner.default_docroot      = /
68 ;htscanner.default_ttl          = 300
69 ;htscanner.stop_on_error        = 0
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)
85 %doc CREDITS README
86 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
87 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.08067 seconds and 3 git commands to generate.