[arch-commits] Commit in go-md2man/trunk (PKGBUILD)

Morten Linderud foxboron at archlinux.org
Sat Mar 28 13:15:08 UTC 2020


    Date: Saturday, March 28, 2020 @ 13:15:07
  Author: foxboron
Revision: 605080

upgpkg: go-md2man 2.0.0-3

Modified:
  go-md2man/trunk/PKGBUILD

----------+
 PKGBUILD |   23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-28 13:11:20 UTC (rev 605079)
+++ PKGBUILD	2020-03-28 13:15:07 UTC (rev 605080)
@@ -3,27 +3,26 @@
 
 pkgname=go-md2man
 pkgver=2.0.0
-pkgrel=2
+pkgrel=3
 pkgdesc='A markdown to manpage generator'
 arch=('x86_64')
 url='https://github.com/cpuguy83/go-md2man'
 license=('MIT')
-makedepends=('go-pie')
+makedepends=('go')
 source=($pkgname-$pkgver.tar.gz::"https://github.com/cpuguy83/go-md2man/archive/v$pkgver.tar.gz")
 sha256sums=('50537880d42fc28b9c2e9aaa36b137349d43cc73d46436a499f8c928cd2fc576')
 
 build() {
-  export GOPATH=$(readlink -f .)
-  local repo=src/github.com/cpuguy83
-  mkdir -p "$repo"
-  ln -sf "../../../go-md2man-$pkgver" "$repo/go-md2man"
-  cd "$repo/go-md2man"
-  go get -v ./...
-  "$srcdir/bin/go-md2man" -in=go-md2man.1.md -out=go-md2man.1
+  cd "$pkgname-$pkgver"
+  export GOFLAGS="-buildmode=pie -mod=vendor -trimpath"
+  export CGO_LDFLAGS="$LDFLAGS"
+  go build -o go-md2man .
+  ./go-md2man -in=go-md2man.1.md -out=go-md2man.1
 }
 
 package() {
-  install -Dm755 "$srcdir/bin/go-md2man" "$pkgdir/usr/bin/go-md2man"
-  install -Dm755 "$srcdir/$pkgname-$pkgver/go-md2man.1" "$pkgdir/usr/share/man/man1/go-md2man.1"
-  install -Dm755 "$srcdir/$pkgname-$pkgver/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  cd "$pkgname-$pkgver"
+  install -Dm755 go-md2man "$pkgdir/usr/bin/go-md2man"
+  install -Dm755 go-md2man.1 "$pkgdir/usr/share/man/man1/go-md2man.1"
+  install -Dm755 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }



More information about the arch-commits mailing list