diff options
author | Paul Wisehart <wise@lupulin.net> | 2010-05-13 00:41:46 +0200 |
---|---|---|
committer | Michiel van Wessem <michiel@slackbuilds.org> | 2010-05-13 00:41:46 +0200 |
commit | e550883348ce9fa59b969b6997bcd1f5132a1785 (patch) | |
tree | 2293fd9522b3cde6c9dc2a5daf12cebe133eecad /system/set_rlimits/set_rlimits.SlackBuild | |
parent | 6623346a8ad98715b143fa6e4816d9313afcdf45 (diff) | |
download | slackbuilds-e550883348ce9fa59b969b6997bcd1f5132a1785.tar.gz |
system/set_rlimits: Updated for version 1.3.0
Diffstat (limited to 'system/set_rlimits/set_rlimits.SlackBuild')
-rw-r--r-- | system/set_rlimits/set_rlimits.SlackBuild | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/system/set_rlimits/set_rlimits.SlackBuild b/system/set_rlimits/set_rlimits.SlackBuild index 6200946d2a..673bed551d 100644 --- a/system/set_rlimits/set_rlimits.SlackBuild +++ b/system/set_rlimits/set_rlimits.SlackBuild @@ -5,13 +5,12 @@ # Modified by the SlackBuilds Project -set -e - PKGNAME=set_rlimits -VERSION=1.2.0 +VERSION=1.3.0 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PKGNAME @@ -19,41 +18,52 @@ 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" fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PKGNAME-$VERSION -tar xvzf $CWD/$PKGNAME-$VERSION.tgz || exit 1 -cd $PKGNAME-$VERSION || exit 1 +tar xvf $CWD/$PKGNAME-$VERSION.tgz +cd $PKGNAME-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . -patch < ${CWD}/Makefile.patch || exit 1 +# Fixup CFLAGS usage and add DESTDIR support +patch -p1 < $CWD/Makefile.patch + +make clean # oops :-) +make EXTRA_CFLAGS="$SLKCFLAGS" PREFIX=/usr +make install PREFIX=/usr DESTDIR=$PKG -make || exit 1 -make install PREFIX=/usr SYSCONFDIR=/etc DESTDIR=$PKG || exit 1 +mv $PKG/etc/set_rlimits.conf $PKG/etc/set_rlimits.conf.new ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) -mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION -cp -a AUTHORS COPYING Changelog README $PKG/usr/doc/$PKGNAME-$VERSION -cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$PKGNAME-$VERSION/$PKGNAME.SlackBuild - ( 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 ) -mv $PKG/etc/set_rlimits.conf $PKG/etc/set_rlimits.conf.new +mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION +cp -a AUTHORS COPYING Changelog README $PKG/usr/doc/$PKGNAME-$VERSION +cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$PKGNAME-$VERSION/$PKGNAME.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |