aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mtg/APKBUILD
blob: af2201897b6849c6ea6191e7c282a61541940c2e (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
# Contributor: Konstantin Kulikov <k.kulikov2@gmail.com>
# Maintainer: Konstantin Kulikov <k.kulikov2@gmail.com>
pkgname=mtg
pkgver=1.0.2
pkgrel=1
pkgdesc="MTPROTO proxy for Telegram"
url="https://github.com/9seconds/mtg"
arch="x86_64"
license="MIT"
makedepends="go"
options="!check chmod-clean" # No test suite.
subpackages="$pkgname-openrc"
install="mtg.pre-install"
source="go.mod go.sum apk.go mtg.initd mtg.confd"
builddir=$srcdir

export GOPATH=${GOPATH:-$srcdir/go}
export GOCACHE=${GOCACHE:-$srcdir/go-build}
export GOTMPDIR=${GOTMPDIR:-$srcdir}

build() {
	for pkg in $(go list -f '{{ join .Imports " " }}'); do
		go build -mod=readonly -v $pkg
	done
}

package() {
	install -Dm755 $builddir/mtg $pkgdir/usr/sbin/mtg
	install -Dm755 $srcdir/$pkgname.initd $pkgdir/etc/init.d/$pkgname
	install -Dm644 $srcdir/$pkgname.confd $pkgdir/etc/conf.d/$pkgname
}

sha512sums="151440c9ad6cc3dac8aad90d94e2df26dde73e8c0b1c44f207886c1a867e95e4fc53b1002bbddfb43e7491f8a82e79747648ea812c10f4c58fa789452fdf35de  go.mod
8e8b871845ea3c056b08a02c8f18c9a60317b82ca056d7a060a5ed312f773fb95e097ca4be115eafd0990fdc28863f6377e4c989b71a0d1be697f1b8556ac378  go.sum
2b4104c4fd669eadf876fb6858de395083f3b3534bc67fdb931cb22a112d939df2eeb8727dd350d6f40dcf173d0f7e36f7ccf43d074b8fa7efd0c190388acc45  apk.go
39d7bf9eda457435f58ab0415f211d465e1643d357d40d67dc86a609bb0467acd4aef75e50b6b753bb687f6209f29fd426cb283af3743852e9c385b09d4033b4  mtg.initd
2988b98d27ad1ecc954f5c34e3ebd3f40fd42d1429c60eccf82d3b19e326bf0f6c17670e5800f1bdfcf93cc6a9c4ef6d39bf4561d07abdf0bc5c9d091bda20e9  mtg.confd"