network/hiawatha: Updated for version 9.8.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Antonio Hernández Blas 2014-11-12 05:49:29 +07:00 committed by Willy Sudiarto Raharjo
parent 77923f41fe
commit 8c8738cf7c
5 changed files with 29 additions and 114 deletions

View File

@ -10,25 +10,19 @@ pipelining, keep alive connections, URL rewriting and many more.
Notes:
To build/use this package the users/groups 'hiawatha' and 'php-fcgi' are
required. You can create them with:
To use this package the user/group 'hiawatha' are required.
You can create them with:
# groupadd -g 259 hiawatha
# useradd -u 259 -g 259 -c "User for hiawatha" -d / -s /bin/false hiawatha
# groupadd -g 260 php-fcgi
# useradd -u 260 -g 260 -c "User for php-fcgi" -d / -s /bin/false php-fcgi
By default:
* hiawatha daemon is going to be listening in the network interface 127.0.0.1:80
and php-fcgi daemon will create the unix socket /var/run/hiawatha/php-fcgi.sock
* Hiawatha's daemon is going to be listening in the network interface 127.0.0.1:80
and it can write temporary files inside /var/lib/hiawatha
* The web root directory is /srv/hiawatha with index.html being
the default start file.
* hiawatha daemon can write temporary files inside /var/lib/hiawatha
Hiawatha's documentation can be readed in the next URL:
http://www.hiawatha-webserver.org/support
Hiawatha's documentation can be readed in the next URL:
http://www.hiawatha-webserver.org/support

View File

@ -3,6 +3,7 @@
# Slackware build script for hiawatha
# Copyright (c) 2009-2012, Antonio Hernández Blas <hba.nihilismus@gmail.com>
# Copyright (c) 2014, Antonio Hernández Blas <hba.nihilismus@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -22,7 +23,7 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=hiawatha
VERSION=${VERSION:-9.3}
VERSION=${VERSION:-9.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -63,10 +64,10 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p build
cd build
@ -82,7 +83,18 @@ cd build
-DPID_DIR=/var/run/$PRGNAM \
-DWEBROOT_DIR=/srv/$PRGNAM \
-DWORK_DIR=/var/lib/$PRGNAM \
-DCMAKE_BUILD_TYPE=Release ..
-DCMAKE_BUILD_TYPE=Release \
\
-DENABLE_CACHE=on \
-DENABLE_DEBUG=off \
-DENABLE_IPV6=on \
-DENABLE_MONITOR=on \
-DENABLE_RPROXY=on \
-DENABLE_SSL=on \
-DENABLE_TOMAHAWK=on \
-DENABLE_TOOLKIT=on \
-DENABLE_XSLT=on \
..
make
make install DESTDIR=$PKG
cd ..
@ -91,27 +103,9 @@ cd ..
sed -i 's/^#ServerId/ServerId/' $PKG/etc/$PRGNAM/$PRGNAM.conf
sed -i "s/www-data/$PRGNAM:$PRGNAM/" $PKG/etc/$PRGNAM/$PRGNAM.conf
# Add the configuration needed by the PHP-FastCGI utility to make it
# Just Work(tm) in Slackware(r) Linux(r) :)
mkdir -p $PKG/var/run/$PRGNAM
echo "Server = /usr/bin/php-cgi ; 1 ; /var/run/$PRGNAM/php-fcgi.sock ; php-fcgi:php-fcgi ; /etc/httpd/php.ini" >> \
$PKG/etc/$PRGNAM/php-fcgi.conf
sed -i "s:/var/run/php-fcgi.pid/:/var/run/$PRGNAM/php-fcgi.pid:" \
$PKG/etc/$PRGNAM/php-fcgi.conf
sed -i "s_ConnectTo = 127.0.0.1:2005_ConnectTo = /var/run/$PRGNAM/php-fcgi.sock_" \
$PKG/etc/$PRGNAM/$PRGNAM.conf
# Set the correct permissions for pid/socket directory.
chown hiawatha:php-fcgi $PKG/var/run/$PRGNAM
chmod 770 $PKG/var/run/$PRGNAM
# Install init scipts
mkdir -p $PKG/etc/rc.d/
install -m 0644 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM
install -m 0644 $CWD/rc.php-fcgi $PKG/etc/rc.d/rc.php-fcgi
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

View File

@ -1,8 +1,8 @@
PRGNAM="hiawatha"
VERSION="9.3"
VERSION="9.8"
HOMEPAGE="http://www.hiawatha-webserver.org"
DOWNLOAD="http://www.hiawatha-webserver.org/files/hiawatha-9.3.tar.gz"
MD5SUM="880f0c5748bc24657a2de11e5b38ce88"
DOWNLOAD="http://www.hiawatha-webserver.org/files/hiawatha-9.8.tar.gz"
MD5SUM="444beab4ace3144557b6ea1f531a4ed0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""

View File

@ -1,7 +1,8 @@
#!/bin/sh
# Start/stop/restart the hiawatha web server
# Copyright (c) 2009-2012 Antonio Hernández Blas <hba.nihilismus@gmail.com>
# Copyright (c) 2009-2012, Antonio Hernández Blas <hba.nihilismus@gmail.com>
# Copyright (c) 2014, Antonio Hernández Blas <hba.nihilismus@gmail.com>
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

View File

@ -1,74 +0,0 @@
#!/bin/sh
# Start/stop/restart PHP as FastCGI daemon
# Copyright (c) 2009-2012 Antonio Hernández Blas <hba.nihilismus@gmail.com>
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
#
# 0. You just DO WHAT THE FUCK YOU WANT TO.
#
CONF='/etc/hiawatha/php-fcgi.conf'
CMMD="/usr/sbin/php-fcgi -c $CONF"
php_fcgi_start() {
if [ -x /usr/sbin/php-fcgi ]; then
if [ -f $CONF ]; then
PIDOF=$(pgrep -f /usr/bin/php-cgi)
if [ ! -z "$PIDOF" ]; then
echo "Error, PHP as FastCGI daemon is already running."
else
echo "Starting PHP as FastCGI daemon: $CMMD"
$CMMD
fi
else
echo "Error, file $CONF does not exist."
fi
fi
}
php_fcgi_stop() {
echo "Stoping PHP as FastCGI daemon: /usr/sbin/php-fcgi -k"
/usr/sbin/php-fcgi -k
}
php_fcgi_status() {
PIDOF=$(pgrep -f /usr/bin/php-cgi)
if [ ! -z "$PIDOF" ]; then
echo "PHP as FastCGI daemon is running."
else
echo "PHP as FastCGI daemon is not running."
fi
}
case $1 in
start)
php_fcgi_start
;;
stop)
php_fcgi_stop
;;
restart)
php_fcgi_stop
sleep 3
php_fcgi_start
;;
status)
php_fcgi_status
;;
*)
echo "Usage $0 {start|stop|restart|status}"
exit 1
;;
esac