aboutsummaryrefslogtreecommitdiffstats
path: root/testing/micro/APKBUILD
blob: 3f5789bf1f2ee1e76115d8d0fb6902559e681f9c (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=micro
pkgver=1.4.1
pkgrel=0
# 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=1856891622af0e4616288df6207451553622d465
pkgdesc="A modern and intuitive terminal-based text editor"
url="https://micro-editor.github.io/"
arch="all"
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 main.Version=$pkgver -X main.CommitHash=$_commithash" \
		./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/logo.svg "$pkgdir"/usr/share/pixmaps/micro.svg
	install -Dm644 "$builddir"/assets/logo.png "$pkgdir"/usr/share/pixmaps/micro.png
}

sha512sums="771e1c2dfd675efa84019ac9b3535d01d82afb31f55323316908ee9b4f7836bf60c8a97583f46009a48d252b99e62df5cd02d68cbb601004fe2b56512bed8a4c  micro-1.4.1.tar.gz"