summaryrefslogtreecommitdiffstats
path: root/system/apparmor/apparmor.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/apparmor/apparmor.SlackBuild')
-rw-r--r--system/apparmor/apparmor.SlackBuild32
1 files changed, 18 insertions, 14 deletions
diff --git a/system/apparmor/apparmor.SlackBuild b/system/apparmor/apparmor.SlackBuild
index cf7e299959..71673a4919 100644
--- a/system/apparmor/apparmor.SlackBuild
+++ b/system/apparmor/apparmor.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for AppArmor
@@ -22,25 +22,33 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=apparmor
-VERSION=${VERSION:-2.13.3}
+VERSION=${VERSION:-3.1.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
+OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
@@ -105,7 +113,6 @@ make
make install DESTDIR=$PKG MANDIR=/usr/man
popd
mv -v ${PKG}/etc/apparmor/parser.conf ${PKG}/etc/apparmor/parser.conf.new
-mv -v ${PKG}/etc/apparmor/subdomain.conf ${PKG}/etc/apparmor/subdomain.conf.new
mv -v ${PKG}/etc/rc.d/rc.apparmor ${PKG}/etc/rc.d/rc.apparmor.new
pushd utils
@@ -128,11 +135,9 @@ make
make install DESTDIR=$PKG
popd
-# Strip binaries and libraries
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# Compress man pages
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
@@ -141,18 +146,17 @@ find $PKG -name perllocal.pod \
-o -name "*.bs" \
| xargs rm -f
-# Copy program documentation into the package
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
LICENSE README.md documentation/ \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-# Copy the slack-desc and a custom doinst.sh into ./install
+rm -f $PKG/usr/lib*/*.la
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
-# Make the package
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE