summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFancy Zhang2020-06-18 15:32:53 +0800
committerFancy Zhang2020-06-18 15:32:53 +0800
commit3ab1692dc3750399531fb44050b941baaf58ea3f (patch)
tree371b8153b6cf34892aa853c563b076b54e7c6f29
parenta836bc6db4531b38d6300e30268a5cf5c03132a0 (diff)
downloadaur-3ab1692dc3750399531fb44050b941baaf58ea3f.tar.gz
updated
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD31
2 files changed, 27 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index eb7fb1a6a82..9a0b08ca044 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,23 @@
pkgbase = cgproxy
pkgdesc = A transparent proxy program powered by cgroup2 and tproxy
- pkgver = v0.15
+ pkgver = v0.16
pkgrel = 1
url = https://github.com/springzfx/cgproxy
install = cgproxy.install
arch = x86_64
groups =
license = GPL
+ makedepends = llvm
+ makedepends = clang
makedepends = cmake
makedepends = nlohmann-json
- makedepends = bcc
- optdepends = systemd: service manager
- optdepends = bcc: execsnoop for program_proxy/program_noproxy
- optdepends = linux-headers: bcc init
+ makedepends = bpf
+ depends = gcc-libs
+ depends = systemd
provides = cgproxy
conflicts = cgproxy
backup = etc/cgproxy/config.json
- source = cgproxy::git+https://github.com/springzfx/cgproxy#tag=v0.15
+ source = cgproxy::git+https://github.com/springzfx/cgproxy#tag=v0.16
md5sums = SKIP
pkgname = cgproxy
diff --git a/PKGBUILD b/PKGBUILD
index 838949ba9eb..24944160d18 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,14 @@
# Maintainer: Fancy Zhang <springzfx@gmail.com>
pkgname=cgproxy
-pkgver=v0.15
+pkgver=v0.16
pkgrel=1
pkgdesc="A transparent proxy program powered by cgroup2 and tproxy"
arch=('x86_64')
url="https://github.com/springzfx/cgproxy"
license=('GPL')
groups=('')
-makedepends=('cmake' 'nlohmann-json' 'bcc')
-depends=()
-optdepends=('systemd: service manager'
- 'bcc: execsnoop for program_proxy/program_noproxy'
- 'linux-headers: bcc init')
+makedepends=('llvm' 'clang' 'cmake' 'nlohmann-json' 'bpf')
+depends=('gcc-libs' 'systemd')
provides=('cgproxy')
conflicts=('cgproxy')
@@ -22,12 +19,24 @@ backup=('etc/cgproxy/config.json')
install='cgproxy.install'
build(){
- cd "$pkgname"
- mkdir -p build && cd build && cmake .. && make
+ cd ${srcdir}/${pkgname}
+ # init submodule
+ git submodule init
+ git submodule update
+
+ # build libexecsnoop.so
+ cd "${srcdir}/${pkgname}/execsnoop-libbpf"
+ make clean
+ make CFLAGS="-O2 -Wall" libexecsnoop.so
+
+ # build main binary
+ cd "${srcdir}/${pkgname}"
+ mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
}
package_cgproxy(){
- cd "$pkgname"/build
- make DESTDIR=$pkgdir install
+ cd "${srcdir}/$pkgname"/build
+ make DESTDIR=$pkgdir install
+ # cd "${srcdir}/${pkgname}/execsnoop-libbpf"
+ # make DESTDIR=$pkgdir install
}
-