mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-01 14:02:24 +01:00
49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
|
|
# Maintainer: Justin Berthault <justin.berthault@zaclys.net>
|
|
pkgname=micro
|
|
pkgver=2.0.9
|
|
pkgrel=1
|
|
# This will need to be updated along with version as it cannot currently be
|
|
# obtained from the tarball, and is necessary if the user is to make error
|
|
# reports upsteam.
|
|
_commithash=6bc498e625e66e3d0c947639dbffb09d986318d0
|
|
pkgdesc="A modern and intuitive terminal-based text editor"
|
|
url="https://micro-editor.github.io/"
|
|
options="!check chmod-clean"
|
|
# riscv64: https://github.com/zyedidia/micro/issues/2138
|
|
arch="all !riscv64"
|
|
license="MIT"
|
|
makedepends="go"
|
|
subpackages="$pkgname-doc"
|
|
source="micro-$pkgver.tar.gz::https://github.com/zyedidia/micro/archive/v$pkgver.tar.gz"
|
|
builddir="$srcdir/src/github.com/zyedidia/$pkgname"
|
|
|
|
prepare() {
|
|
mkdir -p ${builddir%/*}
|
|
mv "$srcdir"/$pkgname-$pkgver "$builddir"/
|
|
default_prepare
|
|
}
|
|
|
|
build() {
|
|
export GOPATH="$srcdir"
|
|
go get -v -ldflags "
|
|
-s -w
|
|
-X github.com/zyedidia/micro/v2/internal/util.Version=$pkgver-$pkgrel
|
|
-X github.com/zyedidia/micro/v2/internal/util.CommitHash=$_commithash
|
|
-X github.com/zyedidia/micro/v2/internal/util.CompileDate=$SOURCE_DATE_EPOCH
|
|
" \
|
|
./cmd/micro
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 "$srcdir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
|
|
install -Dm644 "$builddir"/assets/packaging/micro.1 -t "$pkgdir"/usr/share/man/man1
|
|
install -Dm644 "$builddir"/assets/packaging/micro.desktop -t "$pkgdir"/usr/share/applications
|
|
install -Dm644 "$builddir"/assets/micro-logo.svg "$pkgdir"/usr/share/pixmaps/micro.svg
|
|
install -Dm644 "$builddir"/assets/micro-solarized.png "$pkgdir"/usr/share/pixmaps/micro.png
|
|
}
|
|
|
|
sha512sums="
|
|
5dbf81deb734618ec0a8ccaffc65f972d8da1d28b761c31bf3f5433c02ad6daa2360b1ea825c0a2cfce2f8d31d6481d468bbe29b42e1c96083c7a941fe42bc3a micro-2.0.9.tar.gz
|
|
"
|