summaryrefslogtreecommitdiffstats
path: root/source/l/libusb-compat
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/libusb-compat')
-rwxr-xr-xsource/l/libusb-compat/libusb-compat.SlackBuild23
-rw-r--r--source/l/libusb-compat/slack-desc10
2 files changed, 22 insertions, 11 deletions
diff --git a/source/l/libusb-compat/libusb-compat.SlackBuild b/source/l/libusb-compat/libusb-compat.SlackBuild
index 743264730..c12791bd0 100755
--- a/source/l/libusb-compat/libusb-compat.SlackBuild
+++ b/source/l/libusb-compat/libusb-compat.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2012, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,10 +20,11 @@
# 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)
PKGNAM=libusb-compat
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -36,6 +37,14 @@ if [ -z "$ARCH" ]; then
export ARCH
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 "}
if [ "$ARCH" = "i386" ]; then
@@ -64,7 +73,6 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -74,7 +82,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
-cd $PKGNAM-$VERSION
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
@@ -91,12 +99,15 @@ CFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--docdir=/usr/doc/libusb-$VERSION \
--disable-static \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
# Build and install:
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/source/l/libusb-compat/slack-desc b/source/l/libusb-compat/slack-desc
index 36982b5a6..ec95d8314 100644
--- a/source/l/libusb-compat/slack-desc
+++ b/source/l/libusb-compat/slack-desc
@@ -1,18 +1,18 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
libusb-compat: libusb-compat (Compatibility library for libusb-0.1 apps)
libusb-compat:
libusb-compat: A compatibility layer allowing applications written for libusb-0.1 to
-libusb-compat: work with libusb-1.0. libusb-compat-0.1 attempts to retain as much
+libusb-compat: work with libusb-1.0. libusb-compat-0.1 attempts to retain as much
libusb-compat: ABI and API compatibility with libusb-0.1 as possible.
libusb-compat:
-libusb-compat: Homepage: http://libusb.info
+libusb-compat: Homepage: http://libusb.info
libusb-compat:
libusb-compat:
libusb-compat: