aboutsummaryrefslogtreecommitdiff
path: root/system/chkconfig/chkconfig.SlackBuild
diff options
context:
space:
mode:
authorMenno E. Duursma <druiloor@zonnet.nl>2010-05-11 20:01:54 +0200
committerErik Hanson <erik@slackbuilds.org>2010-05-11 20:01:54 +0200
commit31303c1daf8a185c391c2bc995666b452ce859c1 (patch)
treeed4b9ea19d6184d9bae6385d1f31517474428a50 /system/chkconfig/chkconfig.SlackBuild
parent3347e10b1bfd29ca824068e069b681c33e8a6476 (diff)
system/chkconfig: Added to 12.0 repository
Diffstat (limited to 'system/chkconfig/chkconfig.SlackBuild')
-rw-r--r--system/chkconfig/chkconfig.SlackBuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/system/chkconfig/chkconfig.SlackBuild b/system/chkconfig/chkconfig.SlackBuild
new file mode 100644
index 0000000000000..7b415fc1689b3
--- /dev/null
+++ b/system/chkconfig/chkconfig.SlackBuild
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+# Slackware build script for chkconfig
+# Written by Menno E. Duursma <druiloor@zonnet.nl>
+
+# Exit on most errors
+set -e
+
+PRGNAM=chkconfig
+VERSION=1.3.30c
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+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 .
+find . \
+ \( -perm 777 -o -perm 775 -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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man
+
+make
+make install-strip DESTDIR=$PKG
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a [A-Z][A-Z]* ChangeLog $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
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# 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