mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-27 11:32:08 +01:00
41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
# 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"
|