diff options
author | Dimitris Kiziridis | 2020-05-20 11:37:31 +0300 |
---|---|---|
committer | Dimitris Kiziridis | 2020-05-20 11:37:31 +0300 |
commit | d5cfa2485beffd0fc8e69e3c59ead499899753ae (patch) | |
tree | 262f61ffc2471cdd579ae9284b2d72a1e459a34e /PKGBUILD | |
parent | cd850fef5a1aef8ebacba095ad2089f78cdcd46d (diff) | |
download | aur-d5cfa2485beffd0fc8e69e3c59ead499899753ae.tar.gz |
update pkgbuild, go-pie replaced
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -9,7 +9,7 @@ url='https://github.com/snwfdhmp/simplehttp' license=('Apache') provides=('simplehttp') depends=('glibc') -makedepends=('go-pie' 'git') +makedepends=('go' 'git') source=("git+${url}") sha256sums=('SKIP') @@ -20,21 +20,21 @@ pkgver() { prepare() { cd "${srcdir}/simplehttp" - mkdir -p $srcdir/go - export GOPATH="${srcdir}"/go - export PATH=$PATH:$GOPATH/bin - go get -d -v ./... + mkdir -p build/ } build() { - export GOPATH="${srcdir}"/go - export PATH=$PATH:$GOPATH/bin cd "${srcdir}/simplehttp" - go build -v -o "${srcdir}/simplehttp-bin" + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -modcacherw" + go get -d -v ./... + go build -o build ./... } package() { cd "${srcdir}/simplehttp" - install -Dm755 "${srcdir}"/simplehttp-bin "${pkgdir}/usr/bin/simplehttp" - go clean -modcache #Remove go libraries + install -Dm755 build/simplehttp "${pkgdir}/usr/bin/simplehttp" }
\ No newline at end of file |