summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-05-20 09:13:32 +0300
committerDimitris Kiziridis2020-05-20 09:13:32 +0300
commit5ab1648961ecd557fe532d0de79fb699c7e5d22c (patch)
tree15e82a7eaed49900abf40ac2b205457ec5a03236
parent3e4f3c355996b65924b30ddd21c1ddd71d2d4494 (diff)
downloadaur-5ab1648961ecd557fe532d0de79fb699c7e5d22c.tar.gz
update pkgbuild, go-pie replaced
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD27
2 files changed, 14 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cf45c6947a35..2ceb66e58c63 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,7 +6,7 @@ pkgbase = f4go-git
arch = x86_64
license = MIT
makedepends = git
- makedepends = go-pie
+ makedepends = go
depends = glibc
provides = f4go
source = git+https://github.com/Konstantin8105/f4go
diff --git a/PKGBUILD b/PKGBUILD
index bd29874e7a9e..2d2fb912c949 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,12 +10,12 @@ url='https://github.com/Konstantin8105/f4go'
license=('MIT')
provides=('f4go')
depends=('glibc')
-makedepends=('git' 'go-pie')
+makedepends=('git' 'go')
source=("git+${url}")
sha256sums=('SKIP')
pkgver() {
- cd "${srcdir}/${_pkgname}"
+ cd "${srcdir}/f4go"
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
@@ -23,23 +23,22 @@ pkgver() {
}
prepare() {
- cd "${srcdir}/${_pkgname}"
- mkdir -p $srcdir/go
- export GOPATH="${srcdir}"/go
- export PATH=$PATH:$GOPATH/bin
- go get -d -v ./...
+ cd "${srcdir}/f4go"
+ mkdir -p build/
}
build() {
- cd "${srcdir}/${_pkgname}"
- export GOPATH="${srcdir}"/go
- export PATH=$PATH:$GOPATH/bin
- go build -v -o "../${_pkgname}-bin"
+ cd "${srcdir}/f4go"
+ 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}"
- install -Dm755 ../${_pkgname}-bin "${pkgdir}/usr/bin/${_pkgname}"
+ cd "${srcdir}/f4go"
+ install -Dm755 build/f4go "${pkgdir}/usr/bin/${_pkgname}"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- go clean -modcache #Remove go libraries
} \ No newline at end of file