summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dbd49f7631192688b4b4b43404542fb8b0f6599f (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
# Maintainer: Fancy Zhang <springzfx@gmail.com>
pkgname=cgproxy
pkgver=0.17.1
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=('llvm' 'clang' 'cmake' 'nlohmann-json' 'libbpf')
depends=('gcc-libs' 'systemd' 'which' 'iproute2' 'libbpf')
provides=('cgproxy')
conflicts=('cgproxy')

source=("${pkgname}::git+https://github.com/springzfx/cgproxy#tag=v${pkgver}")
md5sums=('SKIP')

backup=('etc/cgproxy/config.json')
install='cgproxy.install'

build(){
    mkdir -p "${srcdir}/${pkgname}/build"
    cd "${srcdir}/${pkgname}/build"
    cmake -DCMAKE_BUILD_TYPE=Release \
          -DCMAKE_INSTALL_PREFIX=/usr \
          -Dbuild_execsnoop_dl=ON \
          -Dbuild_static=OFF \
          .. 
    make
}

package_cgproxy(){
    cd "${srcdir}/$pkgname"/build
    make DESTDIR=$pkgdir install
}