Сравнение portage-exporter-0.1.0 с portage-exporter-0_p20230307

/usr/portage/app-metrics/portage-exporter/portage-exporter-0_p20230307.ebuild 2023-10-09 14:52:28.780368332 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=8
5

  
6
inherit cmake systemd
4
EAPI=7
5
inherit go-module
6
# uncomment the first setting of MY_PV for a normal release
7
# MY_PV="v${PV/_rc/-rc.}"
8
# set MY_PV to the full commit hash for a snapshot release
9
MY_PV_HASH=ae39c6be10364896683ab1af0512ee8453bc153e
10
HOMEPAGE="https://github.com/projg2/portage-exporter"
11
if [[ -n "${MY_PV_HASH}" ]]; then
12
	MY_PV=${MY_PV_HASH}
13
	EXPORTER_COMMIT=${MY_PV_HASH:0:8}
14
	SRC_URI_UPSTREAM="${HOMEPAGE}/archive/${MY_PV}.tar.gz"
15
else
16
	MY_PV=${PV}
17
	EXPORTER_COMMIT=
18
	SRC_URI_UPSTREAM="${HOMEPAGE}/archive/refs/tags/v${PV}.tar.gz"
19
fi
20
MY_P=${PN}-${MY_PV}
21
SRC_URI_VENDOR="https://dev.gentoo.org/~robbat2/distfiles/${MY_P}-vendor.tar.xz"
22
#SRC_URI_VENDOR="https://dev.gentoo.org/~robbat2/distfiles/${MY_P}-go-mod.tar.xz"
7 23

  
8 24
DESCRIPTION="Prometheus exporter for Gentoo Portage"
9
HOMEPAGE="https://github.com/projg2/portage-exporter"
10
SRC_URI="https://github.com/projg2/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
25
SRC_URI="
26
	${SRC_URI_UPSTREAM} -> ${P}.tar.gz
27
	${SRC_URI_VENDOR}
28
	"
11 29

  
12
LICENSE="GPL-3"
30
LICENSE="Apache-2.0 BSD MIT GPL-3"
13 31
SLOT="0"
14 32
KEYWORDS="~amd64 ~x86"
15

  
16
RDEPEND="dev-cpp/prometheus-cpp"
33
IUSE=""
34
BDEPEND=""
35
DEPEND=""
36
RDEPEND=""
37
S="${WORKDIR}/${PN}-${MY_PV}"
38

  
39
PATCHES=( )
40

  
41
src_compile() {
42
	#cd ./cmd/portage-exporter/
43
	#ego build
44
	ego build -o "${PN}" ./cmd/portage-exporter/
45
}
17 46

  
18 47
src_install() {
19
	cmake_src_install
48
	dobin ${PN}
20 49

  
21
	systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service
22 50
	newinitd "${FILESDIR}"/${PN}.initd ${PN}
23 51
	newconfd "${FILESDIR}"/${PN}.confd ${PN}
24 52
}
Спасибо!