diff options
Diffstat (limited to 'source/n/libmnl')
-rwxr-xr-x | source/n/libmnl/libmnl.SlackBuild | 33 | ||||
-rw-r--r-- | source/n/libmnl/slack-desc | 6 |
2 files changed, 29 insertions, 10 deletions
diff --git a/source/n/libmnl/libmnl.SlackBuild b/source/n/libmnl/libmnl.SlackBuild index d693bb371..e38a471e7 100755 --- a/source/n/libmnl/libmnl.SlackBuild +++ b/source/n/libmnl/libmnl.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for libmnl -# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2013, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA # Copyright 2013 Robby Workman, Northport, Alabama, USA # All rights reserved. # @@ -23,24 +23,34 @@ # 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=libmnl VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-3} NUMJOBS=${NUMJOBS:-" -j7 "} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; esac fi -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +# 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 + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" @@ -53,7 +63,6 @@ else LIBDIRSUFFIX="" fi -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-$PKGNAM @@ -89,6 +98,16 @@ make install DESTDIR=$PKG || exit 1 rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la +# Move the shared library to $PKG/lib${LIBDIRSUFFIX}: +mkdir -p $PKG/lib${LIBDIRSUFFIX} +( cd $PKG/usr/lib${LIBDIRSUFFIX} + for file in lib*.so.?.* ; do + mv $file ../../lib${LIBDIRSUFFIX} + ln -sf ../../lib${LIBDIRSUFFIX}/$file . + done + cp -a lib*.so.? ../../lib${LIBDIRSUFFIX} +) + 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 diff --git a/source/n/libmnl/slack-desc b/source/n/libmnl/slack-desc index 8a96e06b7..b4d585a5f 100644 --- a/source/n/libmnl/slack-desc +++ b/source/n/libmnl/slack-desc @@ -2,16 +2,16 @@ # 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 +# You must make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| libmnl: libmnl (user-space library oriented to Netlink developers) libmnl: libmnl: libmnl is a minimalistic user-space library oriented to Netlink -libmnl: developers. There are a lot of common tasks in parsing, validating, +libmnl: developers. There are a lot of common tasks in parsing, validating, libmnl: constructing of both the Netlink header and TLVs that are repetitive -libmnl: and easy to get wrong. This library aims to provide simple helpers +libmnl: and easy to get wrong. This library aims to provide simple helpers libmnl: that allows you to re-use code and to avoid re-inventing the wheel. libmnl: libmnl: Homepage: http://www.netfilter.org/projects/libmnl/ |