summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD23
2 files changed, 19 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 93873a033e5..67211a5fa34 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = cgproxy
pkgdesc = A transparent proxy program with cgroup2, like proxychains
- pkgver = 3.6
+ pkgver = v3.6.r5.gd3b2dc0
pkgrel = 1
url = https://github.com/springzfx/cgproxy
arch = x86_64
@@ -11,8 +11,8 @@ pkgbase = cgproxy
options = !strip
options = !emptydirs
backup = etc/cgproxy.conf
- source_x86_64 = https://github.com/springzfx/cgproxy/archive/v3.6.tar.gz
- md5sums_x86_64 = 8273824196e5711839991a17cac1cf87
+ source = cgproxy-git::git+https://github.com/springzfx/cgproxy#branch=master
+ md5sums = SKIP
-pkgname = cgproxy
+pkgname = cgproxy-git
diff --git a/PKGBUILD b/PKGBUILD
index 10d7ecbb982..d9d3b99d486 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Fancy Zhang <springzfx@gmail.com>
pkgbase=cgproxy
-pkgname=cgproxy
-pkgver=3.6
+pkgname=cgproxy-git
+pkgver=v3.6.r5.gd3b2dc0
pkgrel=1
pkgdesc="A transparent proxy program with cgroup2, like proxychains"
arch=('x86_64')
@@ -11,18 +11,25 @@ groups=('')
makedepends=('cmake')
depends=('systemd')
options=('!strip' '!emptydirs')
-# source_x86_64=("cgproxy.tar.gz")
-source_x86_64=("https://github.com/springzfx/cgproxy/archive/v$pkgver.tar.gz")
-md5sums_x86_64=('8273824196e5711839991a17cac1cf87')
+source=("${pkgname}::git+https://github.com/springzfx/cgproxy#branch=master")
+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')
build(){
- cd ${srcdir}/$pkgname-$pkgver
+ cd "$pkgname"
mkdir -p build && cd build && cmake .. && make
}
-package_cgproxy(){
- cd ${srcdir}/$pkgname-$pkgver/build
+package_cgproxy-git(){
+ cd "$pkgname"/build
make DESTDIR=$pkgdir install
}