[arch-commits] Commit in micro/trunk (PKGBUILD)
Morten Linderud
foxboron at archlinux.org
Sun Feb 14 18:56:26 UTC 2021
Date: Sunday, February 14, 2021 @ 18:56:26
Author: foxboron
Revision: 860027
upgpkg: micro 2.0.8-3
Added:
micro/trunk/PKGBUILD
----------+
PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
Added: PKGBUILD
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-02-14 18:56:26 UTC (rev 860027)
@@ -0,0 +1,50 @@
+# Maintainer: Morten Linderud <foxboron 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.8
+pkgrel=3
+pkgdesc="A modern and intuitive terminal-based text editor"
+arch=("aarch64" "armv6h" "armv7h" "i686" "x86_64")
+url="https://${pkgname}-editor.github.io/"
+license=("MIT")
+depends=("glibc")
+makedepends=("git" "go")
+optdepends=("xclip: Required for copying/pasting text - xorg"
+ "wl-clipboard: Required for copying/pasting text - wayland")
+source=("${pkgname}::git+https://github.com/zyedidia/${pkgname}.git#tag=v${pkgver}")
+sha256sums=('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
+}
+
+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
+}
+
+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 -Dm544 "assets/packaging/micro.desktop" -t "${pkgdir}/usr/share/applications"
+}
More information about the arch-commits
mailing list