blob: 544bed050a92840173508e8782ad268ec02647c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Maintainer: Tom Locke <xx@nns.ee>
pkgname=opensnitch-ebpf-module-stable
_pkgname=opensnitch
pkgver=1.5.2
pkgrel=8
_kver=6.0.13
pkgdesc="eBPF process monitor module for opensnitch"
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/evilsocket/opensnitch"
license=('GPL3')
makedepends=('clang' 'llvm' 'libelf' 'flex'
'binutils' 'bc' 'rsync')
depends=('opensnitch')
provides=("${pkgname%-stable}")
conflicts=("${pkgname%-stable}" "${pkgname%-stable}-git")
source=("${url}/archive/v${pkgver}.tar.gz"
"https://cdn.kernel.org/pub/linux/kernel/v${_kver%%.*}.x/linux-${_kver}.tar.xz")
sha256sums=('8aa9cb07dfed2881240c5d3a359668cc3d19060fe8f2819c73cd265abd62b2c6'
'08d3118d6b755769f166de6babed54964393a7c0928029bef11bf55559a72da4')
options=('!strip') # we're stripping with llvm-strip
prepare() {
cd ${srcdir}/linux-${_kver}
patch tools/lib/bpf/bpf_helpers.h < ${srcdir}/${_pkgname}-${pkgver}/ebpf_prog/file.patch
cp ${srcdir}/${_pkgname}-${pkgver}/ebpf_prog/opensnitch*.c \
${srcdir}/${_pkgname}-${pkgver}/ebpf_prog/Makefile samples/bpf
yes "" | make oldconfig
make prepare
}
build() {
cd ${srcdir}/linux-${_kver}
make headers_install
cd samples/bpf
make
llvm-strip -g opensnitch*.o
}
package() {
install -Dm644 "${srcdir}/linux-${_kver}/samples/bpf/opensnitch"*".o" -t \
"$pkgdir/etc/opensnitchd"
}
|