[arch-commits] Commit in micro/repos/community-x86_64 (PKGBUILD PKGBUILD)

Alexander Rødseth arodseth at gemini.archlinux.org
Tue Aug 9 14:41:32 UTC 2022


    Date: Tuesday, August 9, 2022 @ 14:41:31
  Author: arodseth
Revision: 1263575

archrelease: copy trunk to community-x86_64

Added:
  micro/repos/community-x86_64/PKGBUILD
    (from rev 1263574, micro/trunk/PKGBUILD)
Deleted:
  micro/repos/community-x86_64/PKGBUILD

----------+
 PKGBUILD |   91 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 47 insertions(+), 44 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-09 14:41:26 UTC (rev 1263574)
+++ PKGBUILD	2022-08-09 14:41:31 UTC (rev 1263575)
@@ -1,44 +0,0 @@
-# Maintainer: Morten Linderud <foxboron at archlinux.org>
-# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
-# Contributor: loqs
-# 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.11
-pkgrel=3
-# manually set date instead of "go run tools/build-date.go", for reproducible builds
-_build_date='August 05, 2022'
-pkgdesc='Modern and intuitive terminal-based text editor'
-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=225927b9a25f0d50ea63ea18bc7bb68e404c0cfd") # tag: v2.0.11
-b2sums=('SKIP')
-
-build() {
-  cd $pkgname
-  local version=$(go run tools/build-version.go)
-  local hash=$(git rev-parse --short HEAD)
-  local govars="-X github.com/zyedidia/micro/v2/internal/util.Version=$version -X github.com/zyedidia/micro/v2/internal/util.CommitHash=$hash -X 'github.com/zyedidia/micro/v2/internal/util.CompileDate=$_build_date'"
-  go build -v -buildmode=pie -trimpath -ldflags="-s -w ${govars} -linkmode=external -extldflags \"${LDFLAGS}\"" ./cmd/micro
-}
-
-check() {
-  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"
-}

Copied: micro/repos/community-x86_64/PKGBUILD (from rev 1263574, micro/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-08-09 14:41:31 UTC (rev 1263575)
@@ -0,0 +1,47 @@
+# Maintainer: Morten Linderud <foxboron at archlinux.org>
+# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
+# Contributor: loqs
+# 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.11
+pkgrel=4
+# manually set date instead of "go run tools/build-date.go", for reproducible builds
+_build_date='August 09, 2022'
+pkgdesc='Modern and intuitive terminal-based text editor'
+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=225927b9a25f0d50ea63ea18bc7bb68e404c0cfd") # tag: v2.0.11
+b2sums=('SKIP')
+
+prepare() {
+  cd $pkgname
+  # Let tools/build-date.go always return the same date, to make the package reproducible
+  echo -e '//+build ignore\npackage main\nimport "fmt"\nfunc main() { fmt.Println("'$_build_date'") }' > tools/build-date.go
+  # Modify the Go build flags
+  sed -i 's/-trimpath/-buildmode=pie -trimpath/g;s/GS)/GS) -linkmode=external -extldflags \\"$(LDFLAGS)\\"/g' Makefile
+}
+
+build() {
+  make -C $pkgname
+}
+
+check() {
+  make -C $pkgname test
+}
+
+package() {
+  cd $pkgname
+  install -Dm755 $pkgname "$pkgdir/usr/bin/$pkgname"
+  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"
+  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE LICENSE-THIRD-PARTY
+}



More information about the arch-commits mailing list