SPECS: php-htscanner.spec (NEW) - new
glen
glen at pld-linux.org
Wed Jun 7 14:38:21 CEST 2006
Author: glen Date: Wed Jun 7 12:38:21 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- new
---- Files affected:
SPECS:
php-htscanner.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SPECS/php-htscanner.spec
diff -u /dev/null SPECS/php-htscanner.spec:1.1
--- /dev/null Wed Jun 7 14:38:21 2006
+++ SPECS/php-htscanner.spec Wed Jun 7 14:38:16 2006
@@ -0,0 +1,83 @@
+# $Revision$, $Date$
+%define _modname htscanner
+%define _sysconfdir /etc/php
+%define extensionsdir %(php-config --extension-dir 2>/dev/null)
+Summary: PHP Module to emulate .htaccess support in PHP engine
+Name: php-htscanner
+Version: 0.4
+Release: 0.1
+License: PHP 3.0
+Group: Development/Languages/PHP
+Source0: http://files.zoeloelip.be/htscanner/htscanner-%{version}.tar.bz2
+# Source0-md5: 2880cfe79c72b06e9f783d4ad7991849
+Patch0: %{name}-zts.patch
+URL: http://trac.lighttpd.net/trac/wiki/HowToPhpHtaccess
+BuildRequires: php-devel >= 3:5.0.3
+BuildRequires: rpmbuild(macros) >= 1.254
+%{?requires_php_extension}
+Requires: %{_sysconfdir}/conf.d
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+When using a cgi version of php (plain old cgi or fast-cgi) apache
+can't pass any php settings from htaccess files it parses. This can be
+solved by giving each user it's own php.ini file, but I didn't like
+that solution.
+
+This extension parses these configuration files (in most cases
+.htaccess) and changes the settings. It will search all directories
+for a configuration file from the docroot until the directory where
+the request scripts is found.
+
+%prep
+%setup -q -n htscanner
+%patch0 -p1
+
+%build
+phpize
+%configure \
+ --enable-htscanner
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+ INSTALL_ROOT=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+; Enable %{_modname} extension module
+extension=%{_modname}.so
+
+;htscanner.config_file = .htaccess
+;htscanner.default_docroot = /
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
+[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
+
+%postun
+if [ "$1" = 0 ]; then
+ [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
+ [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc CREDITS README
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
+%attr(755,root,root) %{extensionsdir}/%{_modname}.so
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2006/06/07 12:38:16 glen
+- new
+
================================================================
More information about the pld-cvs-commit
mailing list