summaryrefslogtreecommitdiff
path: root/source/n/ModemManager/ModemManager.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/ModemManager/ModemManager.SlackBuild')
-rwxr-xr-xsource/n/ModemManager/ModemManager.SlackBuild20
1 files changed, 16 insertions, 4 deletions
diff --git a/source/n/ModemManager/ModemManager.SlackBuild b/source/n/ModemManager/ModemManager.SlackBuild
index 090fdfaf..6740f03b 100755
--- a/source/n/ModemManager/ModemManager.SlackBuild
+++ b/source/n/ModemManager/ModemManager.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ModemManager
@@ -24,9 +24,11 @@
# Modified by Eric Hameleers, Eindhoven, NL
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=ModemManager
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d- | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,9 +38,16 @@ if [ -z "$ARCH" ]; then
esac
fi
+# 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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -72,7 +81,7 @@ find . \
zcat $CWD/WeDoNotHaveSystemD.patch.gz | patch -p1 --verbose || exit 1
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS -Wno-incompatible-pointer-types" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -88,6 +97,9 @@ CXXFLAGS="$SLKCFLAGS" \
make $NUMJOBS || exit 1
make install DESTDIR=$PKG || exit 1
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true