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

Christian Rebischke shibumi at archlinux.org
Sun Dec 22 18:05:50 UTC 2019


    Date: Sunday, December 22, 2019 @ 18:05:50
  Author: shibumi
Revision: 538868

upgpkg: shfmt 3.0.0-1 refactored PKGBUILD

We use go modules for shfmt now

Modified:
  shfmt/trunk/PKGBUILD

----------+
 PKGBUILD |   29 ++++++++++-------------------
 1 file changed, 10 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-12-22 17:36:03 UTC (rev 538867)
+++ PKGBUILD	2019-12-22 18:05:50 UTC (rev 538868)
@@ -2,32 +2,23 @@
 # Contributor: Daniel Martí <mvdan at mvdan.cc>
 
 pkgname=shfmt
-_pkg=sh
-_name="${pkgname}"
-pkgver=2.6.4
-pkgrel=2
+pkgver=3.0.0
+pkgrel=1
 pkgdesc="Format shell programs"
-url="https://github.com/mvdan/${_pkg}"
+url="https://github.com/mvdan/sh"
 license=('BSD')
 arch=('x86_64')
 makedepends=('git' 'go-pie')
-_sh_commit='6ae84988520ab9ea8ad7b2cc327f2261a30e7abf'
-source=("git+${url}#commit=${_sh_commit}")
-sha512sums=('SKIP')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mvdan/sh/archive/v${pkgver}.tar.gz")
+sha512sums=('aa423656346de9df5ea2bf9d6e1ab89e23b36c70902346157d95435799c3f970bdf8d079927286289fed387c0bc553dd5496e4a5e46292e16ac38d753a678ea5')
 
-prepare() {
-	cd "${srcdir}"
-	mkdir -p "src/mvdan.cc"
-	mv "${_pkg}" "src/mvdan.cc/${_pkg}"
-}
-
 build() {
-	cd "${srcdir}/src/mvdan.cc/${_pkg}/cmd/${_name}"
-	GOPATH="${srcdir}" go build -ldflags='-s -w'
+  cd "${srcdir}/sh-${pkgver}/cmd/shfmt/"
+  go build -trimpath -ldflags "-extldflags ${LDFLAGS}" .
 }
 
 package() {
-	cd "${srcdir}/src/mvdan.cc/${_pkg}"
-	install -Dm755 "cmd/${_name}/${_name}" "${pkgdir}/usr/bin/${_name}"
-	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  cd "${srcdir}/sh-${pkgver}/"
+  install -Dm755 "cmd/shfmt/shfmt" "${pkgdir}/usr/bin/shfmt"
+  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }


More information about the arch-commits mailing list