# Contributor: Konstantin Kulikov # Maintainer: Konstantin Kulikov pkgname=mtg pkgver=1.0.5 pkgrel=0 pkgdesc="MTPROTO proxy for Telegram" url="https://github.com/9seconds/mtg" arch="all" license="MIT" makedepends="go" options="!check chmod-clean net" # 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="462e5c3c5ccff384827bf84d0bd3b0eee64ba261546c9a27de8704503019969bfff825e017f64980d646daff040df120ed97242ed535e31109b69a6595eae1e1 go.mod 54ffc5225341914dc556bd321ca2bd8abddbf3e803e306461ce47201715c5c28caaa0762505eb2b981786c8423eb3c5ad67ed0b73ab85008227777fb65a11347 go.sum 2b4104c4fd669eadf876fb6858de395083f3b3534bc67fdb931cb22a112d939df2eeb8727dd350d6f40dcf173d0f7e36f7ccf43d074b8fa7efd0c190388acc45 apk.go 39d7bf9eda457435f58ab0415f211d465e1643d357d40d67dc86a609bb0467acd4aef75e50b6b753bb687f6209f29fd426cb283af3743852e9c385b09d4033b4 mtg.initd 2988b98d27ad1ecc954f5c34e3ebd3f40fd42d1429c60eccf82d3b19e326bf0f6c17670e5800f1bdfcf93cc6a9c4ef6d39bf4561d07abdf0bc5c9d091bda20e9 mtg.confd"