diff options
author | Lin Ruoshui | 2019-01-27 20:03:11 +0800 |
---|---|---|
committer | Lin Ruoshui | 2019-01-27 20:03:11 +0800 |
commit | 74e2bfc1140d8b41beefd6792a0361d07e76d7df (patch) | |
tree | 5f8be0b8ea2c770195dbc2154f7f3a87eaf77def | |
parent | 9607ab05fdabcb85f58732bfc69ff021f9da803b (diff) | |
download | aur-74e2bfc1140d8b41beefd6792a0361d07e76d7df.tar.gz |
compile from source instead of using binary code
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 30 |
2 files changed, 25 insertions, 13 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Fri Jan 18 10:21:24 UTC 2019 +# Sun Jan 27 12:02:15 UTC 2019 pkgbase = v2ray-plugin pkgdesc = Yet another SIP003 plugin for shadowsocks, based on v2ray pkgver = 1.0 @@ -7,10 +7,12 @@ pkgbase = v2ray-plugin url = https://github.com/shadowsocks/v2ray-plugin arch = x86_64 license = MIT + makedepends = go conflicts = v2ray-plugin-git - source = https://github.com/shadowsocks/v2ray-plugin/releases/download/v1.0/v2ray-plugin-linux-amd64-8cea1a3.tar.gz + conflicts = v2ray-plugin-bin + source = v2ray-plugin::git+https://github.com/shadowsocks/v2ray-plugin.git#tag=v1.0 source = https://raw.githubusercontent.com/shadowsocks/v2ray-plugin/master/LICENSE - sha256sums = 03085f4b20437c289e1c901fe394891ad329e3bfada5465abbda2ec58ffc70ef + sha256sums = SKIP sha256sums = d903af2e15f43ddc5782ec20a0f1bdd090974ebea01ab02e0b015b76283ea666 pkgname = v2ray-plugin @@ -1,22 +1,32 @@ -# Contributor: +# Maintainer: LIN Ruohshoei <lin dot ruohshoei plus archlinux at gmail dot com> pkgname=v2ray-plugin pkgver=1.0 pkgrel=1 -_commit_ver=8cea1a3 pkgdesc='Yet another SIP003 plugin for shadowsocks, based on v2ray' arch=('x86_64') url='https://github.com/shadowsocks/v2ray-plugin' license=('MIT') -#depends=('' '') -#makedepends=('go') -conflicts=('v2ray-plugin-git') -source=("https://github.com/shadowsocks/v2ray-plugin/releases/download/v$pkgver/v2ray-plugin-linux-amd64-$_commit_ver.tar.gz" - "https://raw.githubusercontent.com/shadowsocks/v2ray-plugin/master/LICENSE") -sha256sums=('03085f4b20437c289e1c901fe394891ad329e3bfada5465abbda2ec58ffc70ef' +makedepends=('go') +conflicts=("${pkgname}-git" "${pkgname}-bin") +source=($pkgname::"git+https://github.com/shadowsocks/$pkgname.git#tag=v$pkgver" + "https://raw.githubusercontent.com/shadowsocks/$pkgname/master/LICENSE") +sha256sums=('SKIP' 'd903af2e15f43ddc5782ec20a0f1bdd090974ebea01ab02e0b015b76283ea666') + +build() { + export GOPATH="$srcdir"/gopath + cd $srcdir/$pkgname + go get -u -v github.com/shadowsocks/$pkgname + go build -v \ + -gcflags "all=-trimpath=$PWD" \ + -asmflags "all=-trimpath=$PWD" \ + -ldflags "-extldflags $LDFLAGS" \ + -o $pkgname . +} package() { - install -Dm755 v2ray-plugin_linux_amd64 ${pkgdir}/usr/bin/v2ray-plugin - install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/v2ray-plugin/LICENSE + cd $srcdir/$pkgname + install -Dm755 $pkgname ${pkgdir}/usr/bin/$pkgname + install -Dm644 LICENSE -t ${pkgdir}/usr/share/licenses/$pkgname/ echo "README FILE: https://github.com/shadowsocks/v2ray-plugin/blob/master/README.md" } |