diff options
Diffstat (limited to 'network/monkey/monkey.SlackBuild')
-rw-r--r-- | network/monkey/monkey.SlackBuild | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/network/monkey/monkey.SlackBuild b/network/monkey/monkey.SlackBuild index d6e1dbb404..6be5b1299d 100644 --- a/network/monkey/monkey.SlackBuild +++ b/network/monkey/monkey.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for monkey http server. @@ -28,10 +28,13 @@ # Francisco Ambrozio <sbo@franciscoambrozio.com> # and libev script by Šime Ramov <s@ramov.com> +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=monkey VERSION=${VERSION:-1.6.9} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -41,7 +44,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -75,7 +85,7 @@ 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 {} \; -CFLAGS="$SLKCFLAGS" \ +CFLAGS="$SLKCFLAGS -fcommon" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -106,10 +116,7 @@ sed -i "s|# Load /usr/lib${LIBDIRSUFFIX}/monkey/monkey-logger.so|Load /usr/lib${ # 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 +# move init script to its dir mkdir -p $PKG/etc/rc.d install -Dpm 0644 monkey.init $PKG/etc/rc.d/rc.monkey.new @@ -132,4 +139,4 @@ install -Dpm 0644 $CWD/slack-desc $PKG/install/slack-desc install -Dpm 0644 $CWD/doinst.sh $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |