diff options
Diffstat (limited to 'source/n/ipset')
-rwxr-xr-x | source/n/ipset/ipset.SlackBuild | 28 | ||||
-rw-r--r-- | source/n/ipset/slack-desc | 6 |
2 files changed, 23 insertions, 11 deletions
diff --git a/source/n/ipset/ipset.SlackBuild b/source/n/ipset/ipset.SlackBuild index 438ebe5c..3cad37b5 100755 --- a/source/n/ipset/ipset.SlackBuild +++ b/source/n/ipset/ipset.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for ipset -# 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,8 +23,10 @@ # 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=ipset -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:-" -j7 "} @@ -32,15 +34,23 @@ 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 @@ -62,7 +71,7 @@ mkdir -p $TMP $PKG cd $TMP rm -rf $PKGNAM-$VERSION -tar xf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1 +tar xf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 cd $PKGNAM-$VERSION || exit 1 chown -R root:root . @@ -87,6 +96,9 @@ CXXFLAGS="$SLKCFLAGS" \ 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 diff --git a/source/n/ipset/slack-desc b/source/n/ipset/slack-desc index 8a9e83fc..64924869 100644 --- a/source/n/ipset/slack-desc +++ b/source/n/ipset/slack-desc @@ -2,17 +2,17 @@ # 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------------------------------------------------------| ipset: ipset (administration tool for kernel IP sets) ipset: ipset: IP sets are a Linux kernel framework administered by the ipset -ipset: utility. Depending on the type, currently an IP set may store IP +ipset: utility. Depending on the type, currently an IP set may store IP ipset: addresses, (TCP/UDP) port numbers, or IP addresses with MAC addresses ipset: in a way which ensures lightning speed when matching an entry against -ipset: a set. +ipset: a set. ipset: ipset: Homepage: http://ipset.netfilter.org/ ipset: |