summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1bb614121a93d2b681cb5e9be3576a36fc5c4ec1 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: YuutaW <i@yuuta.moe>
pkgname=tcptunnel-git
pkgver=v0.8
pkgrel=1
pkgdesc=""
arch=(x86_64)
url="https://github.com/vakuum/tcptunnel"
license=('GPL')
groups=()
depends=()
makedepends=('git')
provides=()
conflicts=()
replaces=()
backup=('etc/tcptunnel/tcptunnel.conf')
options=()
install=
source=("$pkgname::git+https://github.com/vakuum/tcptunnel.git"
    "tcptunnel.service"
    "tcptunnel.conf")
noextract=()
md5sums=('SKIP'
         '9f7f07e2d2c9ee580a469838661bb370'
         '96479f7d6fb3beeec44c9c64342d6626')

pkgver() {
	cd "$srcdir/$pkgname"
	printf "%s" "$(git describe --tags --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

prepare() {
	cd "$srcdir/$pkgname"
}

build() {
	cd "$srcdir/$pkgname"
	./configure --prefix="/usr"
	make
}

package() {
	cd "$srcdir/$pkgname"
    make BINDIR="$pkgdir/usr/bin" install

    mkdir -p $pkgdir/usr/lib/systemd/system
	install -Dm644 $srcdir/tcptunnel.service $pkgdir/usr/lib/systemd/system/tcptunnel.service

    mkdir -p $pkgdir/etc/tcptunnel
	install -Dm644 $srcdir/tcptunnel.conf $pkgdir/etc/tcptunnel/tcptunnel.conf
}