summaryrefslogtreecommitdiff
path: root/source/n/ebtables/ebtables.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/ebtables/ebtables.SlackBuild')
-rwxr-xr-xsource/n/ebtables/ebtables.SlackBuild46
1 files changed, 25 insertions, 21 deletions
diff --git a/source/n/ebtables/ebtables.SlackBuild b/source/n/ebtables/ebtables.SlackBuild
index 738a7862..c5912777 100755
--- a/source/n/ebtables/ebtables.SlackBuild
+++ b/source/n/ebtables/ebtables.SlackBuild
@@ -25,8 +25,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=ebtables
-VERSION=${VERSION:-2.0.10}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-2.0.11}
+BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -44,6 +44,8 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
fi
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -64,9 +66,9 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf $PKGNAM-v$VERSION-4
-tar xvf $CWD/$PKGNAM-v$VERSION-4.tar.xz || exit 1
-cd $PKGNAM-v$VERSION-4 || exit 1
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -74,22 +76,24 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-# Set our CFLAGS and avoid a "warning-as-error" that breaks build
-sed -i \
- -e "s|-fPIC -O3|${SLKCFLAGS}|" \
- -e "s|-Wunused|-Wno-error=unused-but-set-variable|" \
- Makefile
-
-make -j 4 || exit 1
-
-make install \
- DESTDIR=$PKG \
- LIBDIR=/usr/lib${LIBDIRSUFFIX} \
- MANDIR=/usr/man \
- BINDIR=/usr/sbin \
- ETCDIR=/etc \
- INITDIR=/etc/rc.d/init.d \
- SYSCONFIGDIR=/etc/sysconfig || exit 1
+# Configure, build, and install:
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
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