diff options
author | Dimitris Kiziridis | 2020-05-20 10:04:38 +0300 |
---|---|---|
committer | Dimitris Kiziridis | 2020-05-20 10:04:38 +0300 |
commit | 2f9a0becbbe7caeb478fd20dc5503bc3d569afaf (patch) | |
tree | 923dcd500e85609d1525bdf6b2f9fed977765348 | |
parent | 827384f8819112d3ce277676b2038719dc6fe382 (diff) | |
download | aur-2f9a0becbbe7caeb478fd20dc5503bc3d569afaf.tar.gz |
update pkgbuild, go-pie replaced
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 29 |
2 files changed, 16 insertions, 16 deletions
@@ -5,8 +5,7 @@ pkgbase = mimemagic url = https://github.com/zRedShift/mimemagic arch = x86_64 license = MIT - makedepends = dep - makedepends = go-pie + makedepends = go depends = glibc source = mimemagic-1.1.0.tar.gz::https://github.com/zRedShift/mimemagic/archive/v1.1.0.tar.gz sha256sums = 3f20e5a7e28080c3dd23721d40d9d419509f26e38c69f11b2c9838c8b41a1927 @@ -8,28 +8,29 @@ arch=('x86_64') url='https://github.com/zRedShift/mimemagic' license=('MIT') depends=('glibc') -makedepends=('dep' 'go-pie') +makedepends=('go') source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") sha256sums=('3f20e5a7e28080c3dd23721d40d9d419509f26e38c69f11b2c9838c8b41a1927') prepare() { - mkdir -p gopath/src/github.com/${pkgname} - ln -rTsf ${pkgname}-${pkgver} gopath/src/github.com/${pkgname}/${pkgname} - export GOPATH="$srcdir"/gopath - cd gopath/src/github.com/${pkgname}/${pkgname} - if [[ ! -f Gopkg.toml ]]; then - dep init -v - fi - dep ensure -v + cd "${srcdir}/${pkgname}-${pkgver}" + mkdir -p build/ } build() { - export GOPATH="$srcdir"/gopath - cd gopath/src/github.com/${pkgname}/${pkgname}/cmd/${pkgname} - go install -v . + cd "${srcdir}/${pkgname}-${pkgver}" + 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 get -d -v ./cmd/... + go build -o build ./cmd/... } package() { - install -Dm755 "${srcdir}/gopath/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" - install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + cd "${srcdir}/${pkgname}-${pkgver}" + install -Dm755 build/mimemagic "${pkgdir}/usr/bin/mimemagic" + install -Dm755 build/parser "${pkgdir}/usr/bin/parser" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }
\ No newline at end of file |