system/set_rlimits: Updated for version 1.3.0

This commit is contained in:
Paul Wisehart 2010-05-13 00:41:46 +02:00 committed by Michiel van Wessem
parent 6623346a8a
commit e550883348
3 changed files with 64 additions and 36 deletions

View file

@ -1,29 +1,45 @@
--- Makefile 2007-04-22 14:18:21.000000000 -0400 diff -Nur set_rlimits-1.3.0.orig/Makefile set_rlimits-1.3.0/Makefile
+++ Makefile.new 2007-04-22 14:31:49.000000000 -0400 --- set_rlimits-1.3.0.orig/Makefile 2008-05-15 05:44:21.000000000 -0500
@@ -12,16 +12,16 @@ +++ set_rlimits-1.3.0/Makefile 2009-07-14 01:43:10.829342025 -0500
gcc -Wall -g -o set_rlimits set_rlimits.c @@ -4,6 +4,10 @@
# C compiler to use
CC=gcc
+# CFLAGS to use
+CFLAGS = -Wall -g
+EXTRA_CFLAGS =
+
# Installation locations. If SYSCONFDIR is changed, the CONFIG_FILE define
# in set_rtlimits.c will need changing to match.
PREFIX=/usr/local
@@ -12,19 +16,19 @@
all: set_rlimits
set_rlimits: set_rlimits.c
- $(CC) -Wall -g -o set_rlimits set_rlimits.c
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o set_rlimits set_rlimits.c
install: set_rlimits install: set_rlimits
- test -d $(PREFIX)/bin || mkdir -p $(PREFIX)/bin - test -d $(PREFIX)/bin || mkdir -p $(PREFIX)/bin
- test -d $(PREFIX)/man/man8 || mkdir -p $(PREFIX)/man/man8 - test -d $(PREFIX)/man/man8 || mkdir -p $(PREFIX)/man/man8
- test -d $(SYSCONFDIR) || mkdir -p $(SYSCONFDIR) - test -d $(SYSCONFDIR) || mkdir -p $(SYSCONFDIR)
- cp -p set_rlimits $(PREFIX)/bin/ - cp -p set_rlimits $(PREFIX)/bin/
- chown root.root $(PREFIX)/bin/set_rlimits - chown 0.0 $(PREFIX)/bin/set_rlimits
- chmod u+s $(PREFIX)/bin/set_rlimits - chmod u+s $(PREFIX)/bin/set_rlimits
- test -e $(SYSCONFDIR)/set_rlimits.conf || cp set_rlimits.conf $(SYSCONFDIR)/ - test -e $(SYSCONFDIR)/set_rlimits.conf || cp set_rlimits.conf $(SYSCONFDIR)/
- chown root.root $(SYSCONFDIR)/set_rlimits.conf - chown 0.0 $(SYSCONFDIR)/set_rlimits.conf
- cp -p set_rlimits.8 $(PREFIX)/man/man8/ - cp -p set_rlimits.8 $(PREFIX)/man/man8/
- chown root.root $(PREFIX)/man/man8/set_rlimits.8 - chown 0.0 $(PREFIX)/man/man8/set_rlimits.8
+ test -d $(DESTDIR)$(PREFIX)/bin || mkdir -p $(DESTDIR)$(PREFIX)/bin + test -d $(DESTDIR)/$(PREFIX)/bin || mkdir -p $(DESTDIR)/$(PREFIX)/bin
+ test -d $(DESTDIR)$(PREFIX)/man/man8 || mkdir -p $(DESTDIR)$(PREFIX)/man/man8 + test -d $(DESTDIR)/$(PREFIX)/man/man8 || mkdir -p $(DESTDIR)/$(PREFIX)/man/man8
+ test -d $(DESTDIR)$(SYSCONFDIR) || mkdir -p $(DESTDIR)$(SYSCONFDIR) + test -d $(DESTDIR)/$(SYSCONFDIR) || mkdir -p $(DESTDIR)/$(SYSCONFDIR)
+ cp -p set_rlimits $(DESTDIR)$(PREFIX)/bin/ + cp -p set_rlimits $(DESTDIR)/$(PREFIX)/bin/
+ chown root.root $(DESTDIR)$(PREFIX)/bin/set_rlimits + chown 0.0 $(DESTDIR)/$(PREFIX)/bin/set_rlimits
+ chmod u+s $(DESTDIR)$(PREFIX)/bin/set_rlimits + chmod u+s $(DESTDIR)/$(PREFIX)/bin/set_rlimits
+ test -e $(DESTDIR)$(SYSCONFDIR)/set_rlimits.conf || cp set_rlimits.conf $(DESTDIR)$(SYSCONFDIR)/ + test -e $(DESTDIR)/$(SYSCONFDIR)/set_rlimits.conf || cp set_rlimits.conf $(DESTDIR)/$(SYSCONFDIR)/
+ chown root.root $(DESTDIR)$(SYSCONFDIR)/set_rlimits.conf + chown 0.0 $(DESTDIR)/$(SYSCONFDIR)/set_rlimits.conf
+ cp -p set_rlimits.8 $(DESTDIR)$(PREFIX)/man/man8/ + cp -p set_rlimits.8 $(DESTDIR)/$(PREFIX)/man/man8/
+ chown root.root $(DESTDIR)$(PREFIX)/man/man8/set_rlimits.8 + chown 0.0 $(DESTDIR)/$(PREFIX)/man/man8/set_rlimits.8
.PHONY: clean tidy .PHONY: clean tidy

View file

@ -5,13 +5,12 @@
# Modified by the SlackBuilds Project # Modified by the SlackBuilds Project
set -e
PKGNAME=set_rlimits PKGNAME=set_rlimits
VERSION=1.2.0 VERSION=1.3.0
ARCH=${ARCH:-i486} ARCH=${ARCH:-i486}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
CWD=$(pwd) CWD=$(pwd)
TMP=${TMP:-/tmp/SBo} TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PKGNAME PKG=$TMP/package-$PKGNAME
@ -19,41 +18,52 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686" SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
fi fi
set -e
rm -rf $PKG rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $PKGNAME-$VERSION rm -rf $PKGNAME-$VERSION
tar xvzf $CWD/$PKGNAME-$VERSION.tgz || exit 1 tar xvf $CWD/$PKGNAME-$VERSION.tgz
cd $PKGNAME-$VERSION || exit 1 cd $PKGNAME-$VERSION
chown -R root:root . chown -R root:root .
chmod -R u+w,go+r-w,a-s . 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 || exit 1 make clean # oops :-)
make install PREFIX=/usr SYSCONFDIR=/etc DESTDIR=$PKG || exit 1 make EXTRA_CFLAGS="$SLKCFLAGS" PREFIX=/usr
make install PREFIX=/usr DESTDIR=$PKG
mv $PKG/etc/set_rlimits.conf $PKG/etc/set_rlimits.conf.new
( cd $PKG ( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null 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 ( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \; find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) 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 mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG 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}

View file

@ -1,8 +1,10 @@
PRGNAM="set_rlimits" PRGNAM="set_rlimits"
VERSION="1.2.0" VERSION="1.3.0"
HOMEPAGE="http://www.physics.adelaide.edu.au/~jwoithe/" HOMEPAGE="http://www.physics.adelaide.edu.au/~jwoithe/"
DOWNLOAD="http://www.physics.adelaide.edu.au/~jwoithe/set_rlimits-1.2.0.tgz" DOWNLOAD="http://www.physics.adelaide.edu.au/~jwoithe/set_rlimits-1.3.0.tgz"
MD5SUM="b7385886aecbfb1c3a1631c93c7311d2" MD5SUM="4d7c2f66b8351d8c2627cfd18ec56b7f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="paul wisehart" MAINTAINER="paul wisehart"
EMAIL="wise@lupulin.net" EMAIL="wise@lupulin.net"
APPROVED="BP{k}" APPROVED="BP{k}"