summaryrefslogtreecommitdiffstats
path: root/network/policyd/policyd.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/policyd/policyd.SlackBuild')
-rw-r--r--network/policyd/policyd.SlackBuild23
1 files changed, 12 insertions, 11 deletions
diff --git a/network/policyd/policyd.SlackBuild b/network/policyd/policyd.SlackBuild
index 34ebec230a..ffae56e6e3 100644
--- a/network/policyd/policyd.SlackBuild
+++ b/network/policyd/policyd.SlackBuild
@@ -2,15 +2,15 @@
# Slackware Package Build Script for policyd
-# Copyright (c) 2007, Nishant Limbachia (nishant@mnspace.net)
+# Copyright (c) 2008-2009, Nishant Limbachia (nishant@mnspace.net)
# All rights reserved.
-
+#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
-
+#
# 1. Redistributions of script must retain the above copyright notice,
# this list of conditions and the following disclaimer.
-
+#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -24,11 +24,11 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Modified by Robby Workman <rworkman@slackbuilds.org>
-
+
PRGNAM=policyd
VERSION=1.82
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -36,16 +36,20 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+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
rm -fr $TMP/$PRGNAM-$VERSION $PKG
mkdir -p $PKG $TMP $OUTPUT
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $TMP/$PRGNAM-$VERSION
chown root.root .
find . \
@@ -55,10 +59,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 644 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Note - for future policyd versions, check to see if the upstream Makefile
-# has an different CFLAGS defined. We're just pulling what the author put
-# in and appending standard Slackware ones to it. --rworkman
-make CFLAGS="-g -W -Wall -DMAXFDS=4096 $SLKCFLAGS" build || exit 1
+make CFLAGS+="$SLKCFLAGS" build
strip --strip-unneeded cleanup stats policyd 2> /dev/null
mkdir -p $PKG/usr/bin