network/htscanner: Updated for version 0.9.0

This commit is contained in:
Menno Duursma 2010-05-12 17:43:27 +02:00 committed by Robby Workman
parent 4435bd3842
commit 8e73901373
5 changed files with 34 additions and 21 deletions

View File

@ -2,12 +2,10 @@ Htscanner allows one to use htaccess-like files to configure PHP
on a per-directory basis, just like Apache's htaccess. It is
especially useful with fastcgi.
Please read the "Description" part of /usr/doc/htscanner-<version>/README
after installation. An example [htscanner] block for php.ini is included
in /usr/doc/htscanner-<version>/htscanner.ini this can be appended to
/etc/httpd/php.ini (after editing to ones preferences).
Please read the "Description" part of /usr/doc/htscanner-1.15/README
after installation. An example /etc/php/htscanner.ini is included.
Currently, for example, something like:
A configuration example, maybe something like the following:
cat << EOF > /var/www/htdocs/.htaccess
<IfModule mod_php.c>
@ -15,8 +13,9 @@ cat << EOF > /var/www/htdocs/.htaccess
</IfModule>
EOF
cat /usr/doc/htscanner-0.8.1/htscanner.ini >> /etc/httpd/php.ini
sh /etc/rc.d/rc.httpd stop
sh /etc/rc.d/rc.httpd start
To test, try:
php -i | grep htscanner

View File

@ -0,0 +1,14 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/php/htscanner.ini.new

View File

@ -1,14 +1,14 @@
#!/bin/sh
# Slackware build script for htscanner
# Written by Menno E. Duursma <druiloor@zonnet.nl>
# Written by Menno Duursma <druiloor@zonnet.nl>
# This program is free software. It comes without any warranty.
# Granted WTFPL, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
PRGNAM=htscanner
VERSION=${VERSION:-0.8.1}
VERSION=${VERSION:-0.9.0}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -16,7 +16,7 @@ TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@ -49,22 +49,22 @@ CXXFLAGS="$SLKCFLAGS" \
./configure \
--enable-htscanner
# Compile
make
# Copy it over by hand (as per the README)
mkdir -p $PKG/usr/lib/php/extensions
install --mode=755 --strip modules/htscanner.so $PKG/usr/lib/php/extensions
install -D --mode=644 docs/htscanner.ini $PKG/etc/php/htscanner.ini.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a [A-Z][A-Z]* docs/htscanner.ini \
$PKG/usr/doc/$PRGNAM-$VERSION
cp -a CREDITS README ../package.xml $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
chown -R root:root $PKG/usr/doc
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Make the package; be sure to leave it in $OUTPUT
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz

View File

@ -1,8 +1,8 @@
PRGNAM="htscanner"
VERSION="0.8.1"
VERSION="0.9.0"
HOMEPAGE="http://pecl.php.net/package/htscanner"
DOWNLOAD="http://pecl.php.net/get/htscanner-0.8.1.tgz"
MD5SUM="8d3a4a63639c380b9268717a9a28dabe"
MAINTAINER="Menno E. Duursma"
DOWNLOAD="http://pecl.php.net/get/htscanner-0.9.0.tgz"
MD5SUM="ad8f28e4cdfec6d3a5a990e1531a1a12"
MAINTAINER="Menno Duursma"
EMAIL="druiloor@zonnet.nl"
APPROVED="David Somero"
APPROVED="rworkman"

View File

@ -5,7 +5,7 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler-----------------------------------------------------|
|-----handy-ruler-------------------------------------------------------|
htscanner: Htscanner (an PHP extention)
htscanner:
htscanner: Htscanner allows one to use htaccess-like files to configure