summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-05-20 10:41:10 +0300
committerDimitris Kiziridis2020-05-20 10:41:10 +0300
commit98d8253e4b7e0f48a1bdb21cbc1149fd6c7ce21c (patch)
tree09a39348b3cc8888471347fa028b163d5c5dc36d /PKGBUILD
parent469c48c05a77a004419118a443e6b1ca5e996884 (diff)
downloadaur-98d8253e4b7e0f48a1bdb21cbc1149fd6c7ce21c.tar.gz
update pkgbuild, go-pie replaced
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD29
1 files changed, 14 insertions, 15 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7f76bf5eec8c..4fda33fced1f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,33 +8,32 @@ arch=('x86_64')
url='http://mylg.io'
license=('MIT')
depends=('libpcap')
-makedepends=('go-pie' 'git' 'dep')
+makedepends=('go' 'git')
source=("git+https://github.com/mehrdadrad/mylg")
sha256sums=('SKIP')
pkgver() {
- cd "${srcdir}/${pkgname%-git}"
+ cd "${srcdir}/mylg"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
- mkdir -p gopath/src/github.com/${pkgname%-git}
- ln -rTsf ${pkgname%-git} gopath/src/github.com/${pkgname%-git}/${pkgname%-git}
- export GOPATH="$srcdir"/gopath
- cd gopath/src/github.com/${pkgname%-git}/${pkgname%-git}
- if [[ ! -f Gopkg.toml ]]; then
- dep init -v
- fi
- dep ensure -v
+ cd "${srcdir}/mylg"
+ mkdir -p build/
}
build() {
- export GOPATH="$srcdir"/gopath
- cd gopath/src/github.com/${pkgname%-git}/${pkgname%-git}
- go install -v .
+ cd "${srcdir}/mylg"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
+ go build -o build ./...
}
package() {
- install -Dm755 "${srcdir}/gopath/bin/${pkgname%-git}" "${pkgdir}/usr/bin/${pkgname%-git}"
- install -Dm644 "${srcdir}/${pkgname%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ cd "${srcdir}/mylg"
+ install -Dm755 build/mylg "${pkgdir}/usr/bin/${pkgname%-git}"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
} \ No newline at end of file