diff options
author | Lockywolf <for_sbo.libbpf_2023-05-10@lockywolf.net> | 2023-05-13 11:12:25 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-05-13 19:27:17 +0700 |
commit | ef1e8b3a005c30c60c75b20616cbab4d83bcefbe (patch) | |
tree | 7cd1992b54076d40caa2badbfe3d3fec99515e81 /libraries/dpdk | |
parent | 43e76e28a6166432b37eb928b293ec9ac4f04b5a (diff) |
libraries/dpdk: Added (libs and drivers for fast packet processing)
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/dpdk')
-rw-r--r-- | libraries/dpdk/README | 16 | ||||
-rw-r--r-- | libraries/dpdk/dpdk.SlackBuild | 100 | ||||
-rw-r--r-- | libraries/dpdk/dpdk.info | 10 | ||||
-rw-r--r-- | libraries/dpdk/slack-desc | 19 |
4 files changed, 145 insertions, 0 deletions
diff --git a/libraries/dpdk/README b/libraries/dpdk/README new file mode 100644 index 0000000000000..debc64c3dc26e --- /dev/null +++ b/libraries/dpdk/README @@ -0,0 +1,16 @@ +DPDK is a set of libraries and drivers for fast packet processing. +It supports many processor architectures and both FreeBSD and Linux. + +The DPDK uses the Open Source BSD-3-Clause license for the core +libraries +and drivers. The kernel components are GPL-2.0 licensed. + +Please check the doc directory for release notes, +API documentation, and sample application information. + +For questions and usage discussions, subscribe to: users@dpdk.org +Report bugs and issues to the development mailing list: dev@dpdk.org + +Dependencies which are not on SBo, but can be added are: libmlx5, +libmusdk, libxdp, mlx4,libwd, libisal, and cudatoolkit newer that the +one on SBo diff --git a/libraries/dpdk/dpdk.SlackBuild b/libraries/dpdk/dpdk.SlackBuild new file mode 100644 index 0000000000000..3cec0dbc98071 --- /dev/null +++ b/libraries/dpdk/dpdk.SlackBuild @@ -0,0 +1,100 @@ +#!/bin/bash +# Slackware build script for dpdk +# Copyright 2023 Lockywolf Earth +# 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. +cd $(dirname $0) ; CWD=$(pwd) +PRGNAM=dpdk +VERSION=${VERSION:-22.11.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -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 dpdk-stable-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +cd dpdk-stable-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +mkdir build +cd build + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + meson .. \ + --buildtype=release \ + --infodir=/usr/info \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --localstatedir=/var \ + --mandir=/usr/man \ + --prefix=/usr \ + --sysconfdir=/etc \ + -Dstrip=true -Dtests=false + "${NINJA:=ninja}" + DESTDIR=$PKG $NINJA install +cd .. + +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 +find $PKG -type f -name '*.a' -print -delete +rm -rf "$PKG/usr/share/doc" + + + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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 diff --git a/libraries/dpdk/dpdk.info b/libraries/dpdk/dpdk.info new file mode 100644 index 0000000000000..ff79f99b257f4 --- /dev/null +++ b/libraries/dpdk/dpdk.info @@ -0,0 +1,10 @@ +PRGNAM="dpdk" +VERSION="22.11.1" +HOMEPAGE="https://fast.dpdk.org/rel/" +DOWNLOAD="https://fast.dpdk.org/rel/dpdk-22.11.1.tar.xz" +MD5SUM="0594708fe42ce186a55b0235c6e20cfe" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="device-tree-compiler libbsd libbpf pyelftools" +MAINTAINER="Lockywolf" +EMAIL="for_sbo.libbpf_2023-05-10@lockywolf.net" diff --git a/libraries/dpdk/slack-desc b/libraries/dpdk/slack-desc new file mode 100644 index 0000000000000..2d0cdea8b2bb5 --- /dev/null +++ b/libraries/dpdk/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +dpdk: dpdk (a set of libraries and drivers for fast packet processing) +dpdk: +dpdk: DPDK is a set of libraries and drivers for fast packet processing. +dpdk: It supports many processor architectures and both FreeBSD and Linux. +dpdk: +dpdk: +dpdk: +dpdk: +dpdk: +dpdk: +dpdk: |