summaryrefslogtreecommitdiff
path: root/system/rsyslog/rsyslog.SlackBuild
diff options
context:
space:
mode:
authorChristophe Trussardi <chris@teria.org>2011-12-11 13:19:47 -0600
committerNiels Horn <niels.horn@slackbuilds.org>2011-12-18 00:07:45 -0200
commitc7dedc98824f1aec760ef542e39f2289cb469f9c (patch)
treebd100e2f170de3448d61e051b21fb58ddac22c3f /system/rsyslog/rsyslog.SlackBuild
parenta13590db46cdd8b1f3c6cb1fb0e58ef6850c9a8b (diff)
downloadslackbuilds-c7dedc98824f1aec760ef542e39f2289cb469f9c.tar.gz
system/rsyslog: Added (enhanced syslogd)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/rsyslog/rsyslog.SlackBuild')
-rw-r--r--system/rsyslog/rsyslog.SlackBuild102
1 files changed, 102 insertions, 0 deletions
diff --git a/system/rsyslog/rsyslog.SlackBuild b/system/rsyslog/rsyslog.SlackBuild
new file mode 100644
index 0000000000..addc4d6be2
--- /dev/null
+++ b/system/rsyslog/rsyslog.SlackBuild
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# Slackware build script for rsyslog
+# Written by Christophe Trussardi (chris at teria dot org)
+#
+
+PRGNAM=rsyslog
+VERSION=${VERSION:-5.8.6}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+[ "${MYSQL:-no}" = "no" ] || mysql_option="--enable-mysql"
+[ "${PGSQL:-no}" = "no" ] || pgsql_option="--enable-pgsql"
+[ "${LIBDBI:-no}" = "no" ] || libdbi_option="--enable-libdbi"
+[ "${GNUTLS:-no}" = "no" ] || gnutls_option="--enable-gnutls"
+[ "${RELP:-no}" = "no" ] || relp_option="--enable-relp"
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux \
+ $mysql_option $pgsql_option $libdbi_option $gnutls_option $relp_option
+
+make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/etc/rc.d/
+cat $CWD/config/rsyslog.conf > $PKG/etc/rsyslog.conf.new
+cat $CWD/config/rc.rsyslogd > $PKG/etc/rc.d/rc.rsyslogd.new
+chmod 0755 $PKG/etc/rc.d/rc.rsyslogd.new
+
+mkdir -p $PKG/etc/logrotate.d/
+cat $CWD/config/rsyslog > $PKG/etc/logrotate.d/rsyslog.new
+
+# Create log files in such a way that they won't clobber existing ones
+mkdir -p $PKG/var/log
+for i in cron debug maillog messages secure spooler syslog; do
+ touch $PKG/var/log/$i.new ;
+done
+
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html
+cp -a \
+ AUTHORS COPYING COPYING.LESSER ChangeLog INSTALL NEWS README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a doc/*.{jpg,html,png} $PKG/usr/doc/$PRGNAM-$VERSION/html
+chmod -R 0644 $PKG/usr/doc/$PRGNAM-$VERSION/*
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}