[arch-commits] Commit in bcc/repos (2 files)
Anatol Pomozov
anatolik at archlinux.org
Sun May 9 04:01:06 UTC 2021
Date: Sunday, May 9, 2021 @ 04:01:06
Author: anatolik
Revision: 928949
archrelease: copy trunk to community-testing-x86_64
Added:
bcc/repos/community-testing-x86_64/
bcc/repos/community-testing-x86_64/PKGBUILD
(from rev 928948, bcc/trunk/PKGBUILD)
----------+
PKGBUILD | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)
Copied: bcc/repos/community-testing-x86_64/PKGBUILD (from rev 928948, bcc/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2021-05-09 04:01:06 UTC (rev 928949)
@@ -0,0 +1,86 @@
+# Maintainer: Anatol Pomozov <anatol.pomozov at gmail.com>
+# Contributor: Gordian Edenhofer <gordian.edenhofer at gmail.com>
+# Contributor: Troy Engel <troyengel+arch at gmail.com>
+
+pkgbase=bcc
+pkgname=('bcc' 'bcc-tools' 'python-bcc')
+pkgver=0.20.0
+pkgrel=1
+pkgdesc='BPF Compiler Collection'
+arch=('x86_64')
+url='https://github.com/iovisor/bcc'
+license=('Apache')
+makedepends=('cmake' 'clang' 'llvm' 'flex' 'bison' 'python')
+checkdepends=('netperf' 'iperf')
+source=("bcc-$pkgver.tar.gz"::"https://github.com/iovisor/bcc/releases/download/v$pkgver/bcc-src-with-submodule.tar.gz")
+sha512sums=('60ab3e7e11015878895d009afb2290d1e677e3c7bc04f493eb586136af190d7c0930757b34e721822eaf6700ecc17edeb30a4b04ea29c4a26cb885164060030a')
+
+build() {
+ mkdir -p bcc/build
+ cd bcc/build
+
+ # The python version is irrelevant at this stage
+ cmake -DREVISION=$pkgver \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib ..
+
+ make
+}
+
+package_bcc() {
+ pkgdesc='BPF Compiler Collection - C library and examples'
+ depends=('clang' 'libelf')
+ optdepends=('linux-headers: build modules against the Arch kernel'
+ 'linux-lts-headers: build modules against the LTS kernel'
+ 'linux-zen-headers: build modules against the ZEN kernel'
+ 'linux-hardened-headers: build modules against the HARDENED kernel'
+ 'bcc-tools: Python utilites using the BCC library'
+ 'python-bcc: Python 3 bindings for BCC')
+ provides=('bcc' 'libbcc')
+
+ cd bcc/build
+
+ # Install the kitchen sink
+ make DESTDIR="$pkgdir" install
+
+ # These go in a split package python*-bcc
+ rm -rf "$pkgdir"/usr/lib/python*
+
+ # These go in a split package bcc-tools
+ rm -rf "$pkgdir"/usr/share/bcc/{tools,man}
+}
+
+package_bcc-tools() {
+ pkgdesc='BPF Compiler Collection - Tools'
+ depends=('bcc' 'libedit' 'ethtool')
+ optdepends=(
+ 'python-bcc: Python 3 bindings for BCC'
+ 'luajit: Lua bindings for BCC'
+ )
+
+ cd bcc/build
+
+ make -C tools DESTDIR="$pkgdir" install
+ make -C man DESTDIR="$pkgdir" install
+}
+
+package_python-bcc() {
+ pkgdesc='BPF Compiler Collection - Python 3 bindings'
+ depends=('bcc' 'python')
+ optdepends=(
+ 'python-netaddr: Network address representation and manipulation'
+ 'python-pyroute2: Netlink and Linux network configuration'
+ )
+
+ cd bcc/build
+
+ # Force a quick python3 binding build (C library is already built)
+ cmake -DREVISION=$pkgver \
+ -DPYTHON_CMD="python" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib ..
+ make -C "src/python"
+
+ # Install just those bindings
+ make -C "src/python" DESTDIR="$pkgdir" install
+}
More information about the arch-commits
mailing list