diff options
author | Menno E. Duursma <druiloor@zonnet.nl> | 2010-05-11 22:23:49 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 22:23:49 +0200 |
commit | 48e364bc4ad44cd641885d47d0c76454c691a203 (patch) | |
tree | 8a1450759248ca2767648fb6e1f93901aaa083ca /libraries/libcap/libcap.SlackBuild | |
parent | b652cff9c895125da40b60a56c895b85f72d4ed7 (diff) | |
download | slackbuilds-48e364bc4ad44cd641885d47d0c76454c691a203.tar.gz |
libraries/libcap: Updated for version 2.14
Diffstat (limited to 'libraries/libcap/libcap.SlackBuild')
-rw-r--r-- | libraries/libcap/libcap.SlackBuild | 65 |
1 files changed, 39 insertions, 26 deletions
diff --git a/libraries/libcap/libcap.SlackBuild b/libraries/libcap/libcap.SlackBuild index dcf928bda6..d406089837 100644 --- a/libraries/libcap/libcap.SlackBuild +++ b/libraries/libcap/libcap.SlackBuild @@ -1,21 +1,33 @@ #!/bin/sh # Slackware build script for libcap + # Written by Menno Duursma -# Modified by the SlackBuilds.org project + +# This program is free software. It comes without any warranty. +# Granted WTFPL, version 2, as published by Sam Hocevar dec 2004. +# See http://sam.zoy.org/wtfpl/COPYING for more details. PRGNAM=libcap -VERSION=1.97 +VERSION=2.14 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -# Bail out if we have a problem -set -e +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e # Bail out if we have a problem rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -23,46 +35,47 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION - chown -R root:root . find . -type d | xargs chmod 0755 find . -type f | xargs chmod go-w -# Apply a patch to set the CFLAGS -if [ "$ARCH" = "i686" ]; then - patch -p1 < $CWD/$PRGNAM-$VERSION-$ARCH.diff -elif [ "$ARCH" = "i486" ]; then - patch -p1 < $CWD/$PRGNAM-$VERSION-$ARCH.diff -fi +# We use DEBUG for the CFLAGS setting as that works in one take +sed -i.orig "s/^\(DEBUG =\).*/\1$SLKCFLAGS/" Make.Rules -make +make DYNAMIC=yes make install FAKEROOT=$PKG man_prefix=/usr -( 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 +# Add included scripts +( cd contrib || exit 1 + for file in pcaps4convenience pcaps4server pcaps4suid0 ; do + install -m 0755 -D $file $PKG/usr/sbin/$file ; done ) -if [ -d $PKG/usr/man ]; then - gzip -9 $PKG/usr/man/man?/* -fi +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +( cd $PKG/usr/man || exit 1 + find . -type f -exec gzip -9 {} \; + for i in $(find . -type l) ; do + ln -s $(readlink $i).gz $i.gz ; rm $i ; done +) -# Glibc already has the capget/capset manpage +# glibc already has the capget/capset manpage rm -rf $PKG/usr/man/man2 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README CHANGELOG License pgp.keys.asc \ - doc/capability.notes $CWD/capfaq-0.2.txt \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a CHANGELOG README License $CWD/capfaq-0.2.txt \ + pgp.keys.asc doc/capability.notes progs/quicktest.sh \ + $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 -# Dont overwrite the header, as it may have been edited by the user; instead, -# leave the new copy for the admin to consider -mv $PKG/usr/include/sys/capability.h $PKG/usr/include/sys/capability.h.new +# Fix privs, just to make sure +chown -R root:root $PKG/usr/doc +find $PKG/usr/doc -type f -exec chmod 644 {} \; 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.tgz |