diff options
author | Samuel Walladge | 2020-04-17 11:51:12 +0930 |
---|---|---|
committer | Samuel Walladge | 2020-04-17 11:51:12 +0930 |
commit | 17f028e5a528e71558dc57f0f05b87d2ecd2019c (patch) | |
tree | 2f7815270f5b8b1f98f9044d90fdae458d18b6c7 | |
parent | 46a91c5fe6bf3677e93fbb49258b3c711bb54be9 (diff) | |
download | aur-17f028e5a528e71558dc57f0f05b87d2ecd2019c.tar.gz |
Fix build
Now builds correctly with go and gcc-go, and uses GO111MODULE as
upstream does.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 23 |
2 files changed, 11 insertions, 14 deletions
@@ -1,7 +1,7 @@ pkgbase = peco pkgdesc = Simplistic interactive filtering tool pkgver = 0.5.7 - pkgrel = 1 + pkgrel = 2 url = https://github.com/peco/peco arch = i686 arch = x86_64 @@ -1,8 +1,8 @@ -# Maintainer: Samuel Walladge <samuel at swalladge dot id dot au> +# Maintainer: Samuel Walladge <aur at swalladge dot net> pkgname=peco pkgver=0.5.7 -pkgrel=1 +pkgrel=2 pkgdesc='Simplistic interactive filtering tool' arch=('i686' 'x86_64') url='https://github.com/peco/peco' @@ -11,21 +11,18 @@ makedepends=('go' 'wget') source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/${pkgname}/${pkgname}/archive/v${pkgver}.tar.gz") sha256sums=('9bf4f10b3587270834380e1ea939625bd47eaa166bfabd050e66fad3ffd8f9b0') - -prepare() { - install -d "${srcdir}/src/github.com/${pkgname}" - cp -r "${pkgname}-${pkgver}/" "${srcdir}/src/github.com/${pkgname}/${pkgname}" -} - build() { - export GOPATH="${srcdir}" GOROOT_FINAL="/usr/bin" - cd "${srcdir}/src/github.com/${pkgname}/${pkgname}" - make deps - go build cmd/${pkgname}/${pkgname}.go + cd "${srcdir}/${pkgname}-${pkgver}/" + export GOPATH="${srcdir}" GOROOT_FINAL="/usr/bin" GO111MODULE=on + mkdir -p out + go mod download + go build -o "out/${pkgname}" "cmd/${pkgname}/${pkgname}.go" } package() { - install -Dm755 "${srcdir}/src/github.com/${pkgname}/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + cd "${srcdir}/${pkgname}-${pkgver}/" + install -Dm755 "out/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/peco/LICENSE" } # vim:set ts=2 sw=2 et: |