Commit bcf7145a authored by Konstantin Kulikov's avatar Konstantin Kulikov Committed by Leo
Browse files

testing/mtg: upgrade to 2.0.0

parent 4667c613
# Contributor: Konstantin Kulikov <k.kulikov2@gmail.com>
# Maintainer: Konstantin Kulikov <k.kulikov2@gmail.com>
pkgname=mtg
pkgver=1.0.9
pkgver=2.0.0
pkgrel=0
pkgdesc="MTPROTO proxy for Telegram"
url="https://github.com/9seconds/mtg"
license="MIT"
arch="all"
arch="all !x86 !armhf !armv7" # 32bit archs seem broken
makedepends="go"
options="!check chmod-clean net" # No test suite.
options="net"
subpackages="$pkgname-openrc"
install="mtg.pre-install"
source="go.mod go.sum apk.go mtg.initd mtg.confd"
source="go.mod go.sum apk.go mtg.initd mtg.confd mtg.conf"
builddir=$srcdir
export GOPATH=${GOPATH:-$srcdir/go}
export GOCACHE=${GOCACHE:-$srcdir/go-build}
export GOTMPDIR=${GOTMPDIR:-$srcdir}
export GOPATH=$srcdir/go
export GOCACHE=$srcdir/go-build
export GOTMPDIR=$srcdir
build() {
for pkg in $(go list -f '{{ join .Imports " " }}'); do
go build -mod=readonly -v $pkg
done
go build -modcacherw -v github.com/9seconds/mtg/v2
}
check() {
go test -modcacherw github.com/9seconds/mtg/v2/...
}
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
install -Dm644 $srcdir/$pkgname.conf $pkgdir/etc/$pkgname.conf
}
sha512sums="f49095f7611a34f5fda6cee4520d9b946cd5635cf95557c79b4366921b6b2cdadf9c4ef6253166e95e065e9c38461bbb381560e040090a20fe32cd68ae0dc6c3 go.mod
f7d82c6f089a58ec052f2cced640c19c32ee88ad486bb2c6634080fbc9502fb243367f7c3a830166ce138478b21b3cb0792a6de88da88eb35d5699b6c362edeb go.sum
2b4104c4fd669eadf876fb6858de395083f3b3534bc67fdb931cb22a112d939df2eeb8727dd350d6f40dcf173d0f7e36f7ccf43d074b8fa7efd0c190388acc45 apk.go
39d7bf9eda457435f58ab0415f211d465e1643d357d40d67dc86a609bb0467acd4aef75e50b6b753bb687f6209f29fd426cb283af3743852e9c385b09d4033b4 mtg.initd
2988b98d27ad1ecc954f5c34e3ebd3f40fd42d1429c60eccf82d3b19e326bf0f6c17670e5800f1bdfcf93cc6a9c4ef6d39bf4561d07abdf0bc5c9d091bda20e9 mtg.confd"
sha512sums="43f492d8fe082d618e76b938b6dbe6435e63fafb728eea48b47ab64fcb60e3c088cdec408b3fe42553b0837cd69ad7db066f86f09c0beb09ece663a620082f5d go.mod
0ea18d336e737f2cf2d344097d42836419f0a977deb94b1b512ddc13558f7cfa4a4e5e174c63217da98bef0d0a483d582d366510fc0f404ea48a73d3d58f7321 go.sum
fcb3e40714aba2605aa58298b88eaabaf03e1c2bad71bc0b064573a1cd91a85a0d8892b0e080eefdc921879ebf9364283bb98fad084ad75d68cf8434a6fe31cb apk.go
6ce0b34b2224ea86d56f1c6911302c42a6b4aa9d13046fd0016d9adc267121fd1365829e26559875b836d0b94f9e784954949094489b7e16975d82332d241273 mtg.initd
41c3edc721fae9569596776e38fe6cebfe213cbb62b9a187fbb893eab9421d64ec5a683a54af5f1444a3e28af89402ab4d55abf9f653a64a040c0a4b684f5ece mtg.confd
340651372d8fa861bf40ead66af7fc52ee917aa62eb21bbf562bd5775ffd13ed688fe516a278aa96a8fe55ea48225ca1d9048a7bca7eaf6a5fedd563b27f21b4 mtg.conf"
package apk
import (
_ "github.com/9seconds/mtg"
_ "github.com/9seconds/mtg/v2"
)
......@@ -2,4 +2,4 @@ module apk
go 1.12
require github.com/9seconds/mtg v1.0.9
require github.com/9seconds/mtg/v2 v2.0.0
This diff is collapsed.
# /usr/sbin/mtg generate-secret --help
secret = ""
bind-to = "0.0.0.0:3128"
# Replace SECRET with actual secret. To generate one see:
# /usr/sbin/mtg generate-secret --help
MTG_OPTS="-b 0.0.0.0:3128 SECRET"
# Path to config file
MTG_CONFIG="/etc/mtg.conf"
# Uncomment both lines if you want mtg to send logs to syslog.
#error_logger="logger -t $RC_SVCNAME"
......
#!/sbin/openrc-run
command="/usr/sbin/mtg"
command_args="run $MTG_OPTS"
command_args="run $MTG_CONFIG"
command_background=yes
command_user=mtg:mtg
pidfile="/run/$RC_SVCNAME.pid"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment