From 9db9d22c508fdc1a15d638d406025755c756f515 Mon Sep 17 00:00:00 2001 From: Duncan Roe Date: Sun, 27 Apr 2014 10:13:35 -0500 Subject: network/libnftnl: Added (pre-requisite for nftables) Signed-off-by: Erik Hanson --- network/libnftnl/README | 8 +++ network/libnftnl/libnftnl.SlackBuild | 97 ++++++++++++++++++++++++++++++++++++ network/libnftnl/libnftnl.info | 10 ++++ network/libnftnl/slack-desc | 19 +++++++ 4 files changed, 134 insertions(+) create mode 100644 network/libnftnl/README create mode 100644 network/libnftnl/libnftnl.SlackBuild create mode 100644 network/libnftnl/libnftnl.info create mode 100644 network/libnftnl/slack-desc (limited to 'network') diff --git a/network/libnftnl/README b/network/libnftnl/README new file mode 100644 index 000000000000..acc52c6eced5 --- /dev/null +++ b/network/libnftnl/README @@ -0,0 +1,8 @@ +libnftnl (pre-requisite for nftables) + +libnftnl is a userspace library providing a low-level netlink interface (API) to +the in-kernel nf_tables subsystem. The library libnftnl has been previously +known as libnftables. This library is currently used by nftables. + +To benefit from libnftnl (but not to build it), you need a kernel that includes +the nf_tables subsystem (initial support >= 3.14). diff --git a/network/libnftnl/libnftnl.SlackBuild b/network/libnftnl/libnftnl.SlackBuild new file mode 100644 index 000000000000..729ff8fdf49a --- /dev/null +++ b/network/libnftnl/libnftnl.SlackBuild @@ -0,0 +1,97 @@ +#!/bin/sh + +# Slackware build script for libnftnl + +# Copyright 2014 Duncan Roe Melbourne, Australia +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=libnftnl +VERSION=${VERSION:-1.0.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +DOCUMENTATION="COPYING" +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +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 + +# libnftnl doesn't have man pages + +DOCSDIR=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $DOCSDIR +cp -l $DOCUMENTATION $DOCSDIR +cat $CWD/$PRGNAM.SlackBuild > $DOCSDIR/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/libnftnl/libnftnl.info b/network/libnftnl/libnftnl.info new file mode 100644 index 000000000000..8b2ea00f697a --- /dev/null +++ b/network/libnftnl/libnftnl.info @@ -0,0 +1,10 @@ +PRGNAM="libnftnl" +VERSION="1.0.1" +HOMEPAGE="http://www.netfilter.org/projects/libnftnl/" +DOWNLOAD="http://www.netfilter.org/projects/libnftnl/files/libnftnl-1.0.1.tar.bz2" +MD5SUM="2897fa44ff77de9144074467d37aaab3" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="%README%" +MAINTAINER="Duncan Roe" +EMAIL="duncan_roe@acslink.net.au" diff --git a/network/libnftnl/slack-desc b/network/libnftnl/slack-desc new file mode 100644 index 000000000000..a398990b9090 --- /dev/null +++ b/network/libnftnl/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# 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 +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +libnftnl: libnftnl (pre-requisite for nftables) +libnftnl: +libnftnl: libnftnl is a userspace library providing a low-level netlink +libnftnl: interface (API) to the in-kernel nf_tables subsystem. The library +libnftnl: libnftnl has been previously known as libnftables. This library is +libnftnl: currently used by nftables. +libnftnl: +libnftnl: To actually use libnftnl needs a kernel that includes the nf_tables +libnftnl: subsystem (initial support >= 3.14). +libnftnl: +libnftnl: Homepage: http://www.netfilter.org/projects/libnftnl/ -- cgit v1.2.3