blob: 93878ca49e375e98be630d7bed528fcdca799340 (
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
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module optfeature desktop xdg
DESCRIPTION="Modern and intuitive terminal-based text editor"
HOMEPAGE="https://github.com/micro-editor/micro"
SRC_URI="https://github.com/micro-editor/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://github.com/gentoo-golang-dist/${PN}/releases/download/v${PV}/${P}-vendor.tar.xz"
LICENSE="MIT Apache-2.0 BSD BSD-2 MPL-2.0 ISC"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
PATCHES=(
"${FILESDIR}"/${PN}-2.0.15-no-strip.patch
"${FILESDIR}"/${PN}-2.0.15-remove-git-depend.patch
)
src_compile() {
# We build/install this way for bug #915628 (highlighting)
emake VERSION=${PV} build
}
src_install() {
dodir /usr/bin
emake VERSION=${PV} GOBIN="${ED}"/usr/bin install
doman ./assets/packaging/micro.1
domenu assets/packaging/micro.desktop
einstalldocs
}
pkg_postinst() {
# Update desktop file mime cache
xdg_pkg_postinst
optfeature_header "Clipboard support with display servers:"
optfeature "Xorg" x11-misc/xsel x11-misc/xclip
optfeature "Wayland" gui-apps/wl-clipboard
}
|