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

Alexander Rødseth arodseth at gemini.archlinux.org
Sat Aug 7 13:00:26 UTC 2021


    Date: Saturday, August 7, 2021 @ 13:00:26
  Author: arodseth
Revision: 994656

upgpkg: micro 2.0.10-1

Modified:
  micro/trunk/PKGBUILD

----------+
 PKGBUILD |   60 +++++++++++++++++++++++++-----------------------------------
 1 file changed, 25 insertions(+), 35 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-08-07 12:53:34 UTC (rev 994655)
+++ PKGBUILD	2021-08-07 13:00:26 UTC (rev 994656)
@@ -1,51 +1,41 @@
 # Maintainer: Morten Linderud <foxboron at archlinux.org>
-# Contributor: Alexander F. Rødseth <xyproto at archlinux.org>
+# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
 # Contributor: Fredy García <frealgagu at gmail dot com>
 # Contributor: Youngbin Han <sukso96100 at gmail.com>
 # Contributor: blainester <theblainestory at gmail.com>
 # Contributor: mar77i <mar77i at protonmail dot ch>
-
 pkgname=micro
-pkgver=2.0.9
-pkgrel=2
+pkgver=2.0.10
+pkgrel=1
 pkgdesc='Modern and intuitive terminal-based text editor'
-arch=("aarch64" "armv6h" "armv7h" "i686" "x86_64")
-url="https://${pkgname}-editor.github.io/"
-license=("MIT")
-makedepends=("git" "go")
-optdepends=("wl-clipboard: Required for copying/pasting text - wayland"
-            "xclip: Required for copying/pasting text - xorg")
-source=("${pkgname}::git+https://github.com/zyedidia/${pkgname}.git#tag=v${pkgver}")
-b2sums=('SKIP')
+arch=(x86_64)
+url='https://micro-editor.github.io/'
+license=(MIT)
+makedepends=(git go)
+optdepends=('wl-clipboard: for copying/pasting text using Wayland'
+            'xclip: for copying/pasting text using X')
+source=("git+https://github.com/zyedidia/micro#commit=b97638566ea8431712f0faafe23661da2db0e8ec") # tag: v2.0.10
+b2sums=(SKIP)
 
 build() {
-  cd "${pkgname}"
-  export CGO_CPPFLAGS="${CPPFLAGS}"
-  export CGO_CFLAGS="${CFLAGS}"
-  export CGO_CXXFLAGS="${CXXFLAGS}"
-  export CGO_LDFLAGS="${LDFLAGS}"
-  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
-  # TODO: Figure out how to pass linker flags directly
-  # probably PR GOFLAGS support upstream.
-  make build
+  cd $pkgname
+  local version=$(go run tools/build-version.go)
+  local hash=$(git rev-parse --short HEAD)
+  local date=$(go run tools/build-date.go)
+  local govars="-Xgithub.com/zyedidia/micro/v2/internal/util.Version='$version' -Xgithub.com/zyedidia/micro/v2/internal/util.CommitHash='$hash' -Xgithub.com/zyedidia/micro/v2/internal/util.CompileDate='$date'"
+  go build -v -buildmode=pie -trimpath -ldflags="-s -w -extldflags \"${govars} ${LDFLAGS}\"" ./cmd/micro
 }
 
 check() {
-  cd "${pkgname}"
-  export CGO_CPPFLAGS="${CPPFLAGS}"
-  export CGO_CFLAGS="${CFLAGS}"
-  export CGO_CXXFLAGS="${CXXFLAGS}"
-  export CGO_LDFLAGS="${LDFLAGS}"
-  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
-  make test
+  make -C $pkgname test
 }
 
 package() {
-  cd "${pkgname}"
-  install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
-  install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-  install -Dm644 "LICENSE-THIRD-PARTY" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-THIRD-PARTY"
-  install -Dm644 "assets/packaging/micro.1" -t "${pkgdir}/usr/share/man/man1"
-  install -Dm644 "assets/packaging/micro.desktop" -t "${pkgdir}/usr/share/applications"
-  install -Dm644 "assets/micro-logo-mark.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
+  cd $pkgname
+  install -Dm755 $pkgname "$pkgdir/usr/bin/$pkgname"
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -Dm644 LICENSE-THIRD-PARTY "$pkgdir/usr/share/licenses/$pkgname/LICENSE-THIRD-PARTY"
+  install -Dm644 assets/packaging/micro.1 -t "$pkgdir/usr/share/man/man1"
+  install -Dm644 assets/packaging/micro.desktop -t "$pkgdir/usr/share/applications"
+  install -Dm644 assets/micro-logo-mark.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"
 }



More information about the arch-commits mailing list