mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-10 18:31:50 +01:00
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
|
|
# Maintainer:
|
|
pkgname=micro
|
|
pkgver=2.0.4
|
|
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=c5b0c2d41f67048ba859cbf7d7aba6a3b547e1ef
|
|
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/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="5317a46612022513a98f525261e40870264abfb78b1ecb3df5e55c2726f6637969f722a0df1643d6e3a9de04cd7fab23a44dd7415c1e9acc5dbf2552563d8d82 micro-2.0.4.tar.gz"
|