diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2021-07-31 23:52:09 +0200 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2021-07-31 23:52:20 +0200 |
commit | c4ddd3a2caef5972cae66747dd180934a711e8bc (patch) | |
tree | 58106677f4e7ca44111ca13b68cb11f0ac062c31 /app-misc/uptimed/uptimed-0.4.4.ebuild | |
parent | dev-util/catfish: Bump to 4.16.2 (diff) | |
download | gentoo-c4ddd3a2.tar.gz gentoo-c4ddd3a2.tar.bz2 gentoo-c4ddd3a2.zip |
app-misc/uptimed: Bump to version 0.4.4
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-misc/uptimed/uptimed-0.4.4.ebuild')
-rw-r--r-- | app-misc/uptimed/uptimed-0.4.4.ebuild | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/app-misc/uptimed/uptimed-0.4.4.ebuild b/app-misc/uptimed/uptimed-0.4.4.ebuild new file mode 100644 index 000000000000..e45cede0338e --- /dev/null +++ b/app-misc/uptimed/uptimed-0.4.4.ebuild @@ -0,0 +1,59 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools systemd + +DESCRIPTION="System uptime record daemon that keeps track of your highest uptimes" +HOMEPAGE="https://github.com/rpodgorny/uptimed/" +SRC_URI="https://github.com/rpodgorny/uptimed/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="static-libs" + +RDEPEND=" + acct-group/uptimed + acct-user/uptimed +" +DEPEND="${RDEPEND}" +BDEPEND="${RDEPEND}" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf $(use_enable static-libs static) +} + +src_install() { + local DOCS=( ChangeLog README.md TODO AUTHORS CREDITS INSTALL.cgi sample-cgi/* ) + default + find "${ED}" -type f -name '*.la' -delete || die + + local spooldir="/var/spool/${PN}" + keepdir ${spooldir} + fowners uptimed:uptimed ${spooldir} + + newinitd "${FILESDIR}"/${PN}.init-r1 uptimed + systemd_dounit "${FILESDIR}/${PN}.service" +} + +pkg_postinst() { + local spooldir="/var/spool/${PN}" + if [[ -d "${spooldir}" ]] ; then + einfo "Fixing permissions in ${spooldir}" + find ${spooldir} -type f -links 1 \ + \( -name records -o -name records.old \) \ + | xargs --no-run-if-empty chown uptimed:uptimed || die + fi + echo + elog "Start uptimed with '/etc/init.d/uptimed start' (for openRC)" + elog "or systemctl start uptimed (for systemd)" + elog "To view your uptime records, use the command 'uprecords'." + echo +} |