summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-05-20 07:43:02 +0300
committerDimitris Kiziridis2020-05-20 07:43:02 +0300
commit76cc8db2b9c9b7a4fb5152d7bf849935c1cc70a1 (patch)
tree5fcca18d04627d4d4ccbaedab127531f290ef27f /PKGBUILD
parent8f9b77f572d3242f540e44027f8c61c6e7d80a13 (diff)
downloadaur-76cc8db2b9c9b7a4fb5152d7bf849935c1cc70a1.tar.gz
update pkgbuild, go-pie replaced
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD19
1 files changed, 9 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9fb1abe9613..f56c5ee0b24 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,28 +8,27 @@ arch=('x86_64')
url='https://github.com/elliotchance/c2go'
license=('MIT')
depends=('glibc')
-makedepends=('go-pie')
+makedepends=('go')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('d0032a06be4cce8e1709ad034090bb5d8856c06302b978868f677c4acf356fa7')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
- mkdir -p $srcdir/go
- export GOPATH="${srcdir}"/go
- export PATH=$PATH:$GOPATH/bin
- go get -d -v ./...
+ mkdir -p build/
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- export GOPATH="${srcdir}"/go
- export PATH=$PATH:$GOPATH/bin
- go build -v -o "../c2go-bin"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go build -o build ./...
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
- install -Dm755 ../c2go-bin "${pkgdir}/usr/bin/c2go"
+ install -Dm755 build/c2go "${pkgdir}/usr/bin/c2go"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/c2go/LICENSE"
- go clean -modcache #Remove go libraries
} \ No newline at end of file