[arch-commits] Commit in xdp-tools/trunk (PKGBUILD)

Morten Linderud foxboron at gemini.archlinux.org
Sat Apr 30 12:31:09 UTC 2022


    Date: Saturday, April 30, 2022 @ 12:31:09
  Author: foxboron
Revision: 1191925

upgpkg: xdp-tools 1.2.3-6: addpkg: xdp-tools 1.2.3-6

Added:
  xdp-tools/trunk/PKGBUILD

----------+
 PKGBUILD |   61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

Added: PKGBUILD
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-04-30 12:31:09 UTC (rev 1191925)
@@ -0,0 +1,61 @@
+# Maintainer: Morten Linderud <foxboron at archlinux.org>
+# Contributor:  Emanuel Schmidt <emanuel.schmidt at gmail.com>
+
+pkgbase=xdp-tools
+pkgname=(xdp-tools libxdp)
+pkgver=1.2.3
+pkgrel=6
+pkgdesc='Utilities and example programs for use with XDP'
+url='https://github.com/xdp-project/xdp-tools'
+license=('GPL' 'LGPL' 'BSD2')
+arch=('x86_64')
+depends=('libelf' 'linux-api-headers' 'libbpf' 'libpcap.so')
+makedepends=('clang' 'llvm' 'gcc' 'make' 'm4' 'pkgconfig' 'libpcap' 'zlib')
+options=(!lto debug)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/xdp-project/xdp-tools/archive/refs/tags/v${pkgver}.tar.gz")
+sha512sums=('588cda7010592f34ac600993ea528b76be4a8786c1b4e4599c92c5683a80848a11ae90db825f56b67adec60bd8c684bb4ced21dc1bc1b750cbd5d0704d67390d')
+b2sums=('26c1bfd5b6c3457794801db64d020b8d6eb254661a0a44fa89dde6a1ff7c04dec1207d38a755029c8caaa955cabec70f196e37257f337cf484b8e3525261119e')
+
+
+build() {
+  cd "${pkgname}-${pkgver}"
+  export PRODUCTION=1
+  export DYNAMIC_LIBXDP=1
+  export FORCE_SYSTEM_LIBBPF=1
+  export PREFIX="/usr"
+  ./configure
+  make V=1
+}
+
+package_xdp-tools() {
+  cd "${pkgname}-${pkgver}"
+  pkgdesc="Utilities and example programs for use with XDP"
+  depends=("libxdp")
+  export DESTDIR="${pkgdir}"
+  export SBINDIR="/usr/bin"
+  export PREFIX="/usr"
+  make install V=1
+
+  install -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 LICENSES/* -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  rm -rf "${pkgdir}/usr/share/xdp-tools" \
+         "${pkgdir}"/usr/share/man/*/libxdp* \
+         "${pkgdir}"/usr/lib/bpf/xdp-dispatcher.o \
+         "${pkgdir}"/usr/lib/libxdp* \
+         "${pkgdir}"/usr/lib/pkgconfig/libxdp.pc \
+         "${pkgdir}"/usr/include
+}
+
+package_libxdp() {
+  cd "${pkgbase}-${pkgver}"
+  pkgdesc="The libxdp package contains the libxdp library for managing XDP programs"
+  provides=('libxdp.so')
+  export DESTDIR="${pkgdir}"
+  export SBINDIR="/usr/bin"
+  export PREFIX="/usr"
+  make -C lib/libxdp install V=1
+  rm -rf "${pkgdir}/usr/share/xdp-tools" \
+         "${pkgdir}"/usr/lib/bpf/xsk_* \
+         "${pkgdir}"/usr/include
+}



More information about the arch-commits mailing list