mirror of
https://github.com/springzfx/cgproxy.git
synced 2026-01-07 13:07:56 +08:00
add local aur build
This commit is contained in:
40
aur-cgproxy-local/PKGBUILD
Normal file
40
aur-cgproxy-local/PKGBUILD
Normal file
@@ -0,0 +1,40 @@
|
||||
# Maintainer: Fancy Zhang <springzfx@gmail.com>
|
||||
pkgname=cgproxy-git
|
||||
pkgver=v3.8.r1.gc0668fd
|
||||
pkgrel=1
|
||||
pkgdesc="A transparent proxy program with cgroup2, like proxychains"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/springzfx/cgproxy"
|
||||
license=('')
|
||||
groups=('')
|
||||
makedepends=('cmake')
|
||||
depends=('systemd')
|
||||
provides=('cgproxy')
|
||||
conflicts=('cgproxy')
|
||||
|
||||
curr_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
source=("${pkgname}::git+file://${curr_dir}/../.git")
|
||||
# source=("${pkgname}::git+file:///home/fancy/workspace/cgproxy/.git")
|
||||
md5sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname"
|
||||
( set -o pipefail
|
||||
git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
)
|
||||
}
|
||||
|
||||
backup=('etc/cgproxy.conf')
|
||||
install="cgproxy.install"
|
||||
|
||||
build(){
|
||||
cd "$pkgname"
|
||||
mkdir -p build && cd build && cmake .. && make
|
||||
}
|
||||
|
||||
package_cgproxy-git(){
|
||||
cd "$pkgname"/build
|
||||
make DESTDIR=$pkgdir install
|
||||
}
|
||||
|
||||
8
aur-cgproxy-local/cgproxy.install
Normal file
8
aur-cgproxy-local/cgproxy.install
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
post_install(){
|
||||
cat <<'DOC'
|
||||
to start service:
|
||||
systemctl enable --now cgproxy.service
|
||||
DOC
|
||||
}
|
||||
Reference in New Issue
Block a user