summaryrefslogtreecommitdiff
path: root/app-admin/ego/ego-9999.ebuild
blob: 1ba549fcf12aea865d35777753c82bc597da3f5b (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
48
49
50
51
52
53
54
55
56
# Copyright 2020 LiGurOs Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7

DESCRIPTION="Golang rewrite of ego"
HOMEPAGE="https://gitlab.com/liguros/ego"

if [[ "${PV}" != 9999 ]] ; then
	SRC_URI="https://gitlab.com/liguros/ego/-/archive/develop/ego-develop.tar.gz"
else
	EGIT_REPO_URI="https://gitlab.com/liguros/ego.git"
	EGIT_BRANCH="develop"
	inherit autotools git-r3
fi

inherit golang-base

LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
SLOT="0"
KEYWORDS=""

BDEPEND="dev-lang/go"

DOCS=( README.md )
PROG_VERS=${PV}

program_make() {
	local my_tags=(
		prod
	)
	local my_makeopt=(
		TAGS="${my_tags[@]}"
		LDFLAGS="-extldflags \"${LDFLAGS}\""
	)
	export MDATE=`date -u +%Y%m%d.%H%M%S`
	export PROG_VERS="${PROG_VERS}"
	emake "${my_makeopt[@]}" "$@"
}

src_compile() {
	program_make build
}

src_install() {
	# Install binary
	dobin ${PN}

	# Install docs
	einstalldocs

	# Install config file and default sytem configs
	insinto /etc/${PN}
	doins etc/${PN}.yml
	doins etc/liguros.conf.example
	doins etc/parent.example
}