-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPKGBUILD
47 lines (36 loc) · 1.28 KB
/
PKGBUILD
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
36
37
38
39
40
41
42
43
44
45
46
47
# $Id: PKGBUILD 199999 2013-11-21 01:21:02Z allan $
# Maintainer: Allan McRae <[email protected]>
# Contributor: Andreas Radke <[email protected]>
pkgname=tvpn-git
pkgver=0.r43.g93995e6
pkgrel=1
pkgdesc="Traverse VPN: Peer-to-Peer VPN solution"
arch=('i686' 'x86_64')
url="http://github.com/Pursuit92/tvpn"
license=('GPL2')
depends=('openvpn')
backup=('etc/tvpn.config')
makedepends=('go' 'git')
source=('git://github.com/Pursuit92/tvpn')
pkgver() {
cd tvpn
if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")"
else
echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")"
fi
}
build() {
cd ${srcdir}
mkdir -p Go/src/github.com/Pursuit92/
local GOPATH=${srcdir}/Go
ln -s -f ${srcdir}/tvpn ${srcdir}/Go/src/github.com/Pursuit92/
go get github.com/Pursuit92/tvpn/tvpn
}
package() {
mkdir -p ${pkgdir}/etc ${pkgdir}/usr/bin ${pkgdir}/usr/lib/systemd/system
cp ${srcdir}/Go/bin/tvpn ${pkgdir}/usr/bin/
cp ${srcdir}/Go/src/github.com/Pursuit92/tvpn/tvpn.config ${pkgdir}/etc/
cp ${srcdir}/Go/src/github.com/Pursuit92/tvpn/tvpn.service ${pkgdir}/usr/lib/systemd/system/
}
sha256sums=('SKIP')