Date: Tuesday, June 2, 2020 @ 23:31:01 Author: svenstaro Revision: 638128
upgpkg: go-bindata 3.5.2-2: Move from go-pie to go in accordance with go guidelines Modified: go-bindata/trunk/PKGBUILD ----------+ PKGBUILD | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-06-02 23:14:22 UTC (rev 638127) +++ PKGBUILD 2020-06-02 23:31:01 UTC (rev 638128) @@ -1,30 +1,33 @@ -# Maintainer: Sven-Hendrik Haase <s...@lutzhaase.com> +# Maintainer: Sven-Hendrik Haase <svenst...@gmail.com> # Contributor: Lubomir 'Kuci' Kucera <kuci24-at-gmail-dot-com> pkgname=go-bindata pkgver=3.5.2 -pkgrel=1 +pkgrel=2 pkgdesc="A small utility which generates Go code from any file" arch=('x86_64') url='https://github.com/shuLhan/go-bindata' -license=('CC0 1.0') +license=('custom:CC0') depends=('glibc') -makedepends=('go-pie') -source=("https://github.com/shuLhan/go-bindata/archive/v${pkgver}.tar.gz") +makedepends=('go') +source=("$pkgname-$pkgver.tar.gz::https://github.com/shuLhan/go-bindata/archive/v${pkgver}.tar.gz") sha512sums=('2e9a807445ed6ddfd681f6886503c116c8ceba6572f5a8b2cdbf78c585a476b5dfb0dc967b62f1510caef8e1e09db39043362e252da773272a79a7b257c9d275') -prepare() { - mkdir -p "${srcdir}/src/github.com/shuLhan/" - mv "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/src/github.com/shuLhan/go-bindata" -} +build() { + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" -build() { - cd "${srcdir}/src/github.com/shuLhan/go-bindata/cmd/go-bindata" - GOPATH="${srcdir}" go build + cd $pkgname-$pkgver + + go build ./cmd/... } package() { - cd "${srcdir}/src/github.com/shuLhan/go-bindata/cmd/go-bindata" - install -Dm755 "go-bindata" "${pkgdir}/usr/bin/go-bindata" - install -Dm644 ../../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + cd $pkgname-$pkgver + + install -Dm755 "go-bindata" "${pkgdir}/usr/bin/go-bindata" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }