aboutsummaryrefslogtreecommitdiffstats
path: root/testing/micro/APKBUILD
blob: 45c4748510c0d13cc58e7ecec12511a025bd9365 (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
43
44
45
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=micro
pkgver=2.0.2
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=c51f84955e5fe924c34b4f7e06d17cd8731022cf
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"
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/internal/util.Version=$pkgver-alpine$pkgrel
		-X github.com/zyedidia/micro/internal/util.CommitHash=$_commithash
		-X github.com/zyedidia/micro/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="e269c1748ce090a29828577161e3efe5d49681f44eadd4defd47ccd47cc89269319a74198d1c4ab7d057e599972093f808468ac4a81e0d53ec55c2303cc0287d  micro-2.0.2.tar.gz"