blob: 10ba39b1a105ffecba9d2bc4a60721abc8a37101 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Justin Berthault <justin.berthault@zaclys.net>
pkgname=micro
pkgver=2.0.11
pkgrel=3
# 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=225927b9a25f0d50ea63ea18bc7bb68e404c0cfd
pkgdesc="A modern and intuitive terminal-based text editor"
url="https://micro-editor.github.io/"
options="!check chmod-clean"
arch="all"
license="MIT"
makedepends="go"
subpackages="$pkgname-doc"
source="micro-$pkgver.tar.gz::https://github.com/zyedidia/micro/archive/v$pkgver.tar.gz"
export GOCACHE="$srcdir/go-cache"
export GOTMPDIR="$srcdir"
export GOMODCACHE="$srcdir/go"
build() {
go generate ./runtime
go build -o micro -ldflags "
-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 micro -t "$pkgdir"/usr/bin
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 \
-t "$pkgdir"/usr/share/icons/hicolor/scalable/apps/
}
sha512sums="
3aa3dd10baaec9fa73b5c673c3d29eb8b4d04b468e36866118bcfc70dd638c50e56d51fc6085dcc7441a2ce0d9bbf742c37fd26a7e2b92d8b20844c8a7b53487 micro-2.0.11.tar.gz
"
|