network/monkey: Updated for version 1.5.6.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Sergey Fedosoff 2015-03-14 06:04:44 +07:00 committed by Willy Sudiarto Raharjo
parent a8a0566fc7
commit a4dce0e590
3 changed files with 87 additions and 24 deletions

View File

@ -0,0 +1,74 @@
diff -ruN monkey-1.5.6/configure monkey-1.5.6.new/configure
--- monkey-1.5.6/configure 2015-03-03 00:52:16.000000000 +0300
+++ monkey-1.5.6.new/configure 2015-03-13 11:51:55.984045498 +0300
@@ -903,17 +903,17 @@
create_banana_script()
{
- cat > bin/banana << EOF
+ cat > bin/rc.monkey << EOF
#!/bin/sh
#
-# Monkey HTTP Daemon - Banana Script
+# Monkey HTTP Daemon - rc.monkey Script
# -----------------------------------
# This script allow you to control monkey. Written by Eduardo Silva
# ----------------------------
# Date : 2002/09/01.
# ----------------------------
#
-# Use: ./banana OPTION
+# Use: ./rc.monkey OPTION
#
# Options available to banana:
#
@@ -1000,16 +1000,16 @@
exit 0
;;
*)
- echo "Use : banana [start|stop|restart|status|help]"
+ echo "Use : \$0 [start|stop|restart|status|help]"
exit 1
;;
esac
done
-echo "Use : banana [start|stop|restart|status|help]"
+echo "Use : \$0 [start|stop|restart|status|help]"
exit 0
EOF
- chmod 755 bin/banana
+ chmod 755 bin/rc.monkey
}
#---------------------------#
diff -ruN monkey-1.5.6/lang/en/mconf monkey-1.5.6.new/lang/en/mconf
--- monkey-1.5.6/lang/en/mconf 2015-03-03 00:52:16.000000000 +0300
+++ monkey-1.5.6.new/lang/en/mconf 2015-03-13 11:52:36.464045763 +0300
@@ -66,7 +66,7 @@
# For security reasons, sometimes people want to hide the version of his
# own webserver to clients (values on/off).
- HideVersion off
+ HideVersion on
# Resume:
@@ -124,7 +124,7 @@
# --------
# Allow request to symbolic link files.
- SymLink Off
+ SymLink On
# TransportLayer:
# ---------------
diff -ruN monkey-1.5.6/plugins/cgi/conf/cgi.conf monkey-1.5.6.new/plugins/cgi/conf/cgi.conf
--- monkey-1.5.6/plugins/cgi/conf/cgi.conf 2015-03-03 00:52:16.000000000 +0300
+++ monkey-1.5.6.new/plugins/cgi/conf/cgi.conf 2015-03-13 11:41:34.654041430 +0300
@@ -19,4 +19,4 @@
Match /cgi-bin/.*\.cgi
# Execute PHP scripts through php-cgi interpreter:
- Match /.*\.php /usr/bin/php-cgi application/x-httpd-php
+ #Match /.*\.php /usr/bin/php-cgi application/x-httpd-php

View File

@ -29,7 +29,7 @@
# and libev script by Šime Ramov <s@ramov.com>
PRGNAM=monkey
VERSION=${VERSION:-1.5.2}
VERSION=${VERSION:-1.5.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -75,6 +75,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
patch -p1 --verbose -i $CWD/config_values_fix.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@ -101,35 +103,22 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
# fix PID-file path and make empty dir under /var/run
sed -i 's/\/var\/log\/monkey\/monkey.pid/\/var\/run\/monkey\/monkey.pid/g' $PKG/etc/monkey/monkey.conf
# Hide version of http daemon
sed -i 's/HideVersion off/HideVersion on/g' $PKG/etc/monkey/monkey.conf
# Enable use of symlinks - it _is_ a good and usable feature
sed -i 's/SymLink Off/SymLink On/g' $PKG/etc/monkey/monkey.conf
# Php via CGI if EVIL, not feature, disable it
sed -i 's/Match \/\.\*\\\.php/#Match \/\.\*\\\.php/g' $PKG/etc/monkey/plugins/cgi/cgi.conf
mkdir -p $PKG/var/run/monkey
# out of the box logging is disabled, enable it to audit http server's life
# out of the box logging is disabled (and looks like this part in configure script is broken),
# enable it to audit http server's life
sed -i 's/# Load \/usr\/lib\/monkey\/monkey\-logger\.so/Load \/usr\/lib\/monkey\/monkey\-logger\.so/g' $PKG/etc/monkey/plugins.load
# make log dir
mkdir -p $PKG/var/log/monkey
# make run dir
mkdir -p $PKG/var/run/monkey
# move init script to it's dir
mkdir -p $PKG/etc/rc.d
mv $PKG/usr/sbin/banana $PKG/etc/rc.d/rc.monkey.new
# and fix it a bit
sed -i 's/Use: \.\/banana OPTION/Use: \.\/rc.monkey OPTION/g' $PKG/etc/rc.d/rc.monkey.new
sed -i 's/Options available to banana:/Options available to rc.monkey:/g' $PKG/etc/rc.d/rc.monkey.new
sed -i 's/echo \"Use : banana/echo \"Use : \$0/g' $PKG/etc/rc.d/rc.monkey.new
mv $PKG/usr/sbin/rc.monkey $PKG/etc/rc.d/rc.monkey.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README LICENSE ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README LICENSE NOTICE ChangeLog CONTRIBUTING.md $PKG/usr/doc/$PRGNAM-$VERSION
install -m 644 $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/etc/logrotate.d

View File

@ -1,8 +1,8 @@
PRGNAM="monkey"
VERSION="1.5.2"
VERSION="1.5.6"
HOMEPAGE="http://monkey-project.com/"
DOWNLOAD="http://monkey-project.com/releases/1.5/monkey-1.5.2.tar.gz"
MD5SUM="c90ccba23a814265c7e0fd3a75f883fd"
DOWNLOAD="http://monkey-project.com/releases/1.5/monkey-1.5.6.tar.gz"
MD5SUM="9699e4c9ea6ce6b989907c252ae80254"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""