Skip to content

Commit

Permalink
add local aur build
Browse files Browse the repository at this point in the history
  • Loading branch information
springzfx committed May 14, 2020
1 parent c0668fd commit 749fe38
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
40 changes: 40 additions & 0 deletions aur-cgproxy-local/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Maintainer: Fancy Zhang <[email protected]>
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 changes: 8 additions & 0 deletions aur-cgproxy-local/cgproxy.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

post_install(){
cat <<'DOC'
to start service:
systemctl enable --now cgproxy.service
DOC
}

0 comments on commit 749fe38

Please sign in to comment.