diff options
author | Konstantin Gribov | 2021-05-10 07:34:19 +0300 |
---|---|---|
committer | Konstantin Gribov | 2021-05-10 07:34:19 +0300 |
commit | 02c24774a5c7641551d3b5be571958a833441859 (patch) | |
tree | 30be9474382e5cb8435d9fb1fbc00157870d4e63 | |
parent | d6aa961e4b826fabe89bd7497581ccaabed04818 (diff) | |
download | aur-02c24774a5c7641551d3b5be571958a833441859.tar.gz |
Simplify build
With contribution from [gdamjan](https://aur.archlinux.org/account/gdamjan)
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 30 |
2 files changed, 9 insertions, 23 deletions
@@ -1,7 +1,7 @@ pkgbase = cfssl pkgdesc = CloudFlare PKI and TLS toolkit pkgver = 1.5.0 - pkgrel = 1 + pkgrel = 2 url = https://cfssl.org/ arch = i686 arch = x86_64 @@ -2,7 +2,7 @@ pkgname=cfssl pkgver=1.5.0 -pkgrel=1 +pkgrel=2 pkgdesc="CloudFlare PKI and TLS toolkit" arch=('i686' 'x86_64') url="https://cfssl.org/" @@ -13,38 +13,24 @@ makedepends=('go') source=("${pkgname}-${pkgver}.tar.gz::https://github.com/cloudflare/${pkgname}/archive/v${pkgver}.tar.gz") sha256sums=('5267164b18aa99a844e05adceaf4f62d1b96dcd326a9132098d65c515c180a91') -_prefix=github.com/cloudflare/${pkgname} - _binaries=(cfssl cfssljson cfssl-bundle cfssl-certinfo cfssl-newkey cfssl-scan mkbundle multirootca) -prepare () { - export GOPATH="${srcdir}" - export GOBIN="${GOPATH}/bin" - export PATH="${GOBIN}:${PATH}" - - mkdir -p src/github.com/cloudflare/ - rm -rf src/${_prefix} - mv "${pkgname}-${pkgver}" src/${_prefix} -} - build() { - export GOPATH="${srcdir}" - export GOBIN="${GOPATH}/bin" - - for bin in ${_binaries[@]} ; do - echo "building $bin" - go install ${_prefix}/cmd/${bin} - done + cd "${srcdir}/${pkgname}-${pkgver}" + make VERSION="${pkgver}-${pkgrel}" } package() { + cd "${srcdir}/${pkgname}-${pkgver}" + for bin in ${_binaries[@]} ; do - install -m755 -D -t "${pkgdir}/usr/bin/" ${srcdir}/bin/${bin} + install -m755 -D -t "${pkgdir}/usr/bin/" bin/${bin} done + # special case to avoid clash with `mono` mv ${pkgdir}/usr/bin/mkbundle ${pkgdir}/usr/bin/cfssl-mkbundle - install -m644 -D ${srcdir}/src/${_prefix}/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } # vim: et: sw=2: sts=2: |