summaryrefslogtreecommitdiff
blob: aaec6ff02216f7f310a1c0599f7a1f89ab6f6205 (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
46
47
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit vala

DESCRIPTION="Proxy StatusNotifierItems as XEmbedded systemtray-spec icons"
HOMEPAGE="https://git.sr.ht/~steef/snixembed"
SRC_URI="https://git.sr.ht/~steef/snixembed/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="ISC"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc"

DEPEND="dev-libs/glib:2
	dev-libs/libdbusmenu[gtk3]
	x11-libs/gtk+:3"
RDEPEND="${DEPEND}"
BDEPEND="$(vala_depend)
	virtual/pkgconfig
	doc? ( dev-lang/vala[valadoc] )"

src_prepare() {
	default

	use doc && local VALA_USE_DEPEND="valadoc"
	vala_src_prepare

	sed -e "s: .git/HEAD .git/index::" \
		-e "s:\$(shell git describe --always --tags --dirty):${PV}:" \
		-e "s:valac :${VALAC} :" \
		-e "s:valadoc :${VALADOC} :" \
		-i makefile || die
}

src_compile() {
	default
	use doc && emake doc
}

src_install() {
	emake DESTDIR="${D}" PREFIX="${EPREFIX}" BINDIR="/usr/bin" install
	use doc && HTML_DOCS=( doc/. )
	einstalldocs
}