1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: w0rty <mawo97 at gmail.com>
7 pkgdesc='Generate WireGuard profile from Cloudflare Warp account'
9 url="https://github.com/ViRb3/wgcf"
13 source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
14 sha256sums=('f990bf8f08bab1390f2357324a79724aee40970845bef16b2281a5ca6b0c3b88')
22 export GOPATH="$srcdir"/gopath
24 # Buildflags according to https://wiki.archlinux.org/index.php/Go_package_guidelines#Flags_and_build_options
25 export CGO_CPPFLAGS="${CPPFLAGS}"
26 export CGO_CFLAGS="${CFLAGS}"
27 export CGO_CXXFLAGS="${CXXFLAGS}"
28 export CGO_LDFLAGS="${LDFLAGS}"
29 go build -o build -trimpath -buildmode=pie -ldflags "-linkmode=external -extldflags \"${LDFLAGS}\" -s -w" -modcacherw
34 install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
35 install -Dm644 $srcdir/$pkgname-$pkgver/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"