diff options
author | Daniel Peukert | 2020-06-06 23:34:27 +0200 |
---|---|---|
committer | Daniel Peukert | 2020-06-06 23:34:27 +0200 |
commit | 75b0b0df93c0a9cb9efd9316480724fcc2612bab (patch) | |
tree | 3b8eb5c38e75f9a4f7c19907117f17e8a5a85dd5 | |
parent | a715c3abd53aae966269e6248ec10dff7e649613 (diff) | |
download | aur-75b0b0df93c0a9cb9efd9316480724fcc2612bab.tar.gz |
Updated certspotter according to the new guidelines
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 37 |
2 files changed, 28 insertions, 19 deletions
@@ -1,7 +1,7 @@ pkgbase = certspotter pkgdesc = Certificate Transparency Log Monitor pkgver = 0.10 - pkgrel = 1 + pkgrel = 2 url = https://github.com/SSLMate/certspotter arch = x86_64 arch = i686 @@ -10,11 +10,9 @@ pkgbase = certspotter arch = armv7h arch = aarch64 license = MPL2 - makedepends = go-pie>=1.5 - makedepends = golang-github-mreiferson-go-httpclient - makedepends = golang-golang-x-net - source = certspotter-0.10-1.tar.gz::https://github.com/SSLMate/certspotter/archive/0.10.tar.gz - source = certspotter-0.10-1-fix-missing-printf.diff::https://github.com/SSLMate/certspotter/commit/6d5e2395a13267cbcc5813091586fe6d6a6c37cf.diff + makedepends = go>=1.5 + source = certspotter-0.10-2.tar.gz::https://github.com/SSLMate/certspotter/archive/0.10.tar.gz + source = certspotter-0.10-2-fix-missing-printf.diff::https://github.com/SSLMate/certspotter/commit/6d5e2395a13267cbcc5813091586fe6d6a6c37cf.diff sha256sums = 8c740cb24ac2a7ae83d395ea930c83e1a699f0c317369deeefb104de61981fdc sha256sums = 7e6334317092f60d102e4ee4b536565f1417871d2070607cd272cf8dd9a39c60 @@ -1,12 +1,12 @@ # Maintainer: Daniel Peukert <dan.peukert@gmail.com> pkgname='certspotter' pkgver='0.10' -pkgrel='1' +pkgrel='2' pkgdesc='Certificate Transparency Log Monitor' arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64') url="https://github.com/SSLMate/$pkgname" license=('MPL2') -makedepends=('go-pie>=1.5' 'golang-github-mreiferson-go-httpclient' 'golang-golang-x-net') +makedepends=('go>=1.5') source=( "$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/$pkgver.tar.gz" "$pkgname-$pkgver-$pkgrel-fix-missing-printf.diff::$url/commit/6d5e2395a13267cbcc5813091586fe6d6a6c37cf.diff" @@ -15,30 +15,41 @@ sha256sums=('8c740cb24ac2a7ae83d395ea930c83e1a699f0c317369deeefb104de61981fdc' '7e6334317092f60d102e4ee4b536565f1417871d2070607cd272cf8dd9a39c60') _sourcedirectory="$pkgname-$pkgver" -_builddir="$pkgname-$pkgver-$pkgrel-build" -_buildpath="src/software.sslmate.com/src/$pkgname" _bindir="$pkgname-$pkgver-$pkgrel-bin" +_gopath="$pkgname-$pkgver-$pkgrel-gopath" prepare() { cd "$srcdir/$_sourcedirectory/" # https://github.com/SSLMate/certspotter/pull/40 patch --forward -p1 < "$srcdir/$pkgname-$pkgver-$pkgrel-fix-missing-printf.diff" - cd "$srcdir/" - mkdir -p "$_builddir/$(echo "$_buildpath" | rev | cut -d '/' -f 2- | rev)/" - mv "$_sourcedirectory/" "$_builddir/$_buildpath/" - - mkdir -p "$_bindir/" + mkdir -p "$srcdir/$_bindir/" + mkdir -p "$srcdir/$_gopath/" } build() { - export GOPATH="$srcdir/$_builddir:/usr/share/gocode" - go build -v -trimpath -ldflags "-extldflags $LDFLAGS" -o "$srcdir/$_bindir/" "$(echo "$_buildpath" | cut -d '/' -f 2-)/..." + cd "$srcdir/$_sourcedirectory/" + export GOPATH="$srcdir/$_gopath" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -modcacherw" + go mod init "software.sslmate.com/src/$pkgname" + go mod tidy + export GOFLAGS="$GOFLAGS -mod=readonly" + go build -v -o "$srcdir/$_bindir/" './...' } check() { - export GOPATH="$srcdir/$_builddir:/usr/share/gocode" - go test -v "$srcdir/$_builddir/$_buildpath/..." + cd "$srcdir/$_sourcedirectory/" + export GOPATH="$srcdir/$_gopath" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + go test -v './...' } package() { |