forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: William Hubbs <[email protected]>
- Loading branch information
1 parent
584ec0f
commit fa8574e
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright 2019 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
MY_PN=${PN%-bin} | ||
|
||
inherit user | ||
|
||
DESCRIPTION="Alerts dashboard for Prometheus Alertmanager" | ||
HOMEPAGE="https://github.com/prymitive/karma" | ||
SRC_URI="https://github.com/prymitive/${MY_PN}/releases/download/v${PV}/${MY_PN}-linux-amd64.tar.gz -> ${P}-amd64.tar.gz" | ||
|
||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
KEYWORDS="~amd64" | ||
|
||
QA_PREBUILT="usr/bin/*" | ||
RESTRICT="strip" | ||
S="${WORKDIR}" | ||
|
||
pkg_setup() { | ||
enewgroup ${MY_PN} | ||
enewuser ${MY_PN} -1 -1 -1 ${MY_PN} | ||
} | ||
|
||
src_install() { | ||
dobin karma-linux-amd64 | ||
dosym karma-linux-amd64 /usr/bin/karma | ||
insinto /etc/${MY_PN} | ||
newins "${FILESDIR}"/${MY_PN}-0.24.yaml ${MY_PN}.yaml | ||
newinitd "${FILESDIR}"/${MY_PN}.initd ${MY_PN} | ||
keepdir /var/log/${MY_PN} | ||
fowners ${MY_PN}:${MY_PN} /var/log/${MY_PN} | ||
} | ||
|
||
pkg_postinst() { | ||
if [[ -z "${REPLACING_VERSIONS}" ]]; then | ||
elog "Please edit ${EROOT}/etc/karma/karma.yaml to match your system." | ||
fi | ||
} |