summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTroy Engel2016-01-24 13:42:38 -0600
committerTroy Engel2016-01-24 13:42:38 -0600
commit5abdbbd888859a671d0d3d87b997b7b2be6133b9 (patch)
tree79d4fd6338e4747c84e1bec8dc0d3b5048284baa
parentdb0ad8726be199938e65324ac0ed9ccc68d1b1e3 (diff)
downloadaur-5abdbbd888859a671d0d3d87b997b7b2be6133b9.tar.gz
new rewrites to align with main bcc packages
-rw-r--r--.SRCINFO50
-rw-r--r--PKGBUILD124
2 files changed, 142 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dd41c5f6770..33c667323d5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,53 @@
+# Generated by mksrcinfo v8
+# Sun Jan 24 19:41:28 UTC 2016
pkgbase = bcc-git
- pkgdesc = BPF Compiler Collection
- pkgver = v0.1.6.r134.4d97f7f
+ pkgdesc = BPF Compiler Collection - latest git code
+ pkgver = v0.1.7.r88.f50ca1f
pkgrel = 1
url = https://github.com/iovisor/bcc
arch = x86_64
- arch = x86
license = Apache
- makedepends = git
- makedepends = clang
makedepends = cmake
- makedepends = llvm
+ makedepends = clang>=3.7.0
+ makedepends = llvm>=3.7.0
+ makedepends = flex
+ makedepends = bison
makedepends = python
- depends = python
+ makedepends = python2
provides = bcc
conflicts = bcc
- source = git+https://github.com/iovisor/bcc
- md5sums = SKIP
+ source = bcc-git::git+https://github.com/iovisor/bcc
+ sha256sums = SKIP
pkgname = bcc-git
+ pkgdesc = BPF Compiler Collection - C library and examples
+ optdepends = bcc-tools-git: Python utilites using the BCC library
+ optdepends = python-bcc-git: Python 3 bindings for BCC
+ optdepends = python2-bcc-git: Python 2 bindings for BCC
+ provides = bcc
+ provides = libbcc
+ conflicts = bcc
+ conflicts = libbcc
+
+pkgname = bcc-tools-git
+ pkgdesc = BPF Compiler Collection - Tools
+ depends = bcc-git
+ optdepends = python-bcc-git: Python 3 bindings for BCC
+ optdepends = python2-bcc-git: Python 2 bindings for BCC
+ provides = bcc-tools
+ conflicts = bcc-tools
+
+pkgname = python-bcc-git
+ pkgdesc = BPF Compiler Collection - Python 3 bindings
+ depends = bcc-git
+ depends = python
+ provides = python-bcc
+ conflicts = python-bcc
+
+pkgname = python2-bcc-git
+ pkgdesc = BPF Compiler Collection - Python 2 bindings
+ depends = bcc-git
+ depends = python2
+ provides = python2-bcc
+ conflicts = python2-bcc
diff --git a/PKGBUILD b/PKGBUILD
index 9d7997cf730..f48ce53a786 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,111 @@
-# Maintainer: Manuel Mendez <mmendez534@gmail.com>
-pkgname=bcc-git
-pkgver=v0.1.6.r134.4d97f7f
-pkgrel=2
-pkgdesc="BPF Compiler Collection"
-arch=(x86_64 x86)
+# Maintainer: Troy Engel <troyengel+arch@gmail.com>
+# Contributor: Manuel Mendez <mmendez534@gmail.com>
+
+pkgbase=bcc-git
+pkgname=('bcc-git' 'bcc-tools-git' 'python-bcc-git' 'python2-bcc-git')
+pkgver=v0.1.7.r88.f50ca1f
+pkgrel=1
+pkgdesc="BPF Compiler Collection - latest git code"
+arch=('x86_64')
url="https://github.com/iovisor/bcc"
license=('Apache')
-depends=('python')
-makedepends=('git' 'clang' 'cmake' 'llvm' 'python')
-provides=("${pkgname%-git}")
-conflicts=("${pkgname%-git}")
-source=('git+https://github.com/iovisor/bcc')
-md5sums=('SKIP')
+provides=('bcc')
+conflicts=('bcc')
+makedepends=('cmake' 'clang>=3.7.0' 'llvm>=3.7.0' 'flex' 'bison' 'python'
+ 'python2')
+source=('bcc-git::git+https://github.com/iovisor/bcc')
+sha256sums=('SKIP')
pkgver() {
- cd "$srcdir/${pkgname%-git}"
- printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
-
+ cd "${srcdir}/${pkgbase}"
+ printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
build() {
- [[ -d "$srcdir/${pkgname%-git}/build" ]] && rm -rf "$srcdir/${pkgname%-git}/build"
- mkdir "$srcdir/${pkgname%-git}/build"
- cd "$srcdir/${pkgname%-git}/build"
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib ..
- make
+ # make sure repetitive builds are clean
+ [[ -d "${srcdir}/${pkgbase}/build" ]] && \
+ rm -rf "${srcdir}/${pkgbase}/build"
+ mkdir "${srcdir}/${pkgbase}/build"
+ cd "${srcdir}/${pkgbase}/build"
+
+ # we don't care which python here for the core C library
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib
+ make
+}
+
+package_bcc-git() {
+ pkgdesc="BPF Compiler Collection - C library and examples"
+ makedepends=('cmake' 'clang>=3.7.0' 'llvm>=3.7.0' 'flex' 'bison')
+ provides=('bcc' 'libbcc')
+ conflicts=('bcc' 'libbcc')
+ optdepends=('bcc-tools-git: Python utilites using the BCC library'
+ 'python-bcc-git: Python 3 bindings for BCC'
+ 'python2-bcc-git: Python 2 bindings for BCC')
+
+ # this installs the kitchen sink
+ cd "${srcdir}/${pkgbase}/build"
+ 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-git() {
+ pkgdesc="BPF Compiler Collection - Tools"
+ depends=('bcc-git')
+ provides=('bcc-tools')
+ conflicts=('bcc-tools')
+ optdepends=('python-bcc-git: Python 3 bindings for BCC'
+ 'python2-bcc-git: Python 2 bindings for BCC')
+
+ cd "${srcdir}/${pkgbase}/build/tools"
+ make DESTDIR="${pkgdir}/" install
+
+ cd "${srcdir}/${pkgbase}/build/man"
+ make DESTDIR="${pkgdir}/" install
+
+}
+
+package_python-bcc-git() {
+ pkgdesc="BPF Compiler Collection - Python 3 bindings"
+ makedepends=('cmake')
+ depends=('bcc-git' 'python')
+ provides=('python-bcc')
+ conflicts=('python-bcc')
+
+ # the C lib s already built, force a quick python3 binding build
+ cd "${srcdir}/${pkgbase}/build"
+ cmake .. -DPYTHON_CMD="python" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib
+ make
+
+ # now install just those bindings
+ cd "${srcdir}/${pkgbase}/build/src/python"
+ make DESTDIR="${pkgdir}/" install
}
-package() {
- cd "$srcdir/${pkgname%-git}/build"
- make DESTDIR="$pkgdir/" install
+package_python2-bcc-git() {
+ pkgdesc="BPF Compiler Collection - Python 2 bindings"
+ makedepends=('cmake')
+ depends=('bcc-git' 'python2')
+ provides=('python2-bcc')
+ conflicts=('python2-bcc')
+
+ # the C lib is already built, force a quick python2 binding build
+ cd "${srcdir}/${pkgbase}/build"
+ cmake .. -DPYTHON_CMD="python2" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib
+ make
+
+ # now install just those bindings
+ cd "${srcdir}/${pkgbase}/build/src/python"
+ make DESTDIR="${pkgdir}/" install
}
+