Skip to content

Commit

Permalink
testing/bcc: split into subpackages
Browse files Browse the repository at this point in the history
  • Loading branch information
acj authored and maxice8 committed Aug 28, 2019
1 parent 712d8ca commit 34aa41f
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions testing/bcc/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# Maintainer: Adam Jensen <acjensen@gmail.com>
pkgname=bcc
pkgver=0.10.0
pkgrel=0
pkgrel=1
pkgdesc="A toolkit for creating efficient kernel tracing and manipulation programs"
url="https://github.com/iovisor/bcc/"
arch="aarch64 x86 x86_64"
license="Apache-2.0"
# bcc's test suite requires privileged access to run BPF programs
options="!check"
depends="python"
subpackages="$pkgname-dev $pkgname-doc:_doc $pkgname-tools:_tools $pkgname-lua:_lua py-$pkgname:_py"
_llvmver=8
makedepends="tar git llvm${_llvmver}-dev llvm${_llvmver}-static clang-dev clang-static cmake flex-dev
makedepends="tar git llvm$_llvmver-dev llvm$_llvmver-static clang-dev clang-static cmake flex-dev
bison luajit-dev build-base iperf linux-headers elfutils-dev zlib-dev
libbpf-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/iovisor/$pkgname/archive/v$pkgver.tar.gz
source="$pkgname-$pkgver.tar.gz::https://github.com/iovisor/bcc/archive/v$pkgver.tar.gz
10-use-system-libbpf.patch"

prepare() {
Expand All @@ -35,5 +36,38 @@ package() {
make install DESTDIR="$pkgdir"
}

_doc() {
pkgdesc="$pkgdesc (documentation)"

mkdir -p "$subpkgdir"/usr/share/bcc/tools
mv "$pkgdir"/usr/share/bcc/man "$subpkgdir"/usr/share/bcc
mv "$pkgdir"/usr/share/bcc/tools/doc "$subpkgdir"/usr/share/bcc/tools
}

_tools() {
depends="bcc py-bcc"
pkgdesc="$pkgdesc (tools)"

mkdir -p "$subpkgdir"/usr/share/bcc
mv "$pkgdir"/usr/share/bcc/tools "$subpkgdir"/usr/share/bcc
mv "$pkgdir"/usr/share/bcc/introspection "$subpkgdir"/usr/share/bcc
}

_py() {
depends="bcc"
pkgdesc="$pkgdesc (python bindings)"

mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/python2.7 "$subpkgdir"/usr/lib/python2.7
}

_lua() {
depends="bcc"
pkgdesc="$pkgdesc (lua bindings)"

mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/bcc-lua "$subpkgdir"/usr/bin
}

sha512sums="92ba0f57d22af610ac81661526fed8bec80d502bcbc8aa5048ba7c50911247c020832db23afdcf9b555b142cd387c228cf7baa0ddc94067165403e362227f235 bcc-0.10.0.tar.gz
e2f0cc063a13e2d5ad57db364e29c064f2c351b82bbd4013d613614adab3b9f4aa555ac71e06189807d32211fdef5c9520b4bc5df2db5de3db02123503d242a8 10-use-system-libbpf.patch"

0 comments on commit 34aa41f

Please sign in to comment.