You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
8 years ago
|
# Copyright 1999-2017 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
8 years ago
|
EAPI=6
|
||
12 years ago
|
|
||
12 years ago
|
inherit autotools eutils user systemd
|
||
13 years ago
|
|
||
|
DESCRIPTION="System uptime record daemon that keeps track of your highest uptimes"
|
||
10 years ago
|
HOMEPAGE="https://github.com/rpodgorny/uptimed/"
|
||
|
SRC_URI="https://github.com/rpodgorny/uptimed/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||
13 years ago
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
8 years ago
|
KEYWORDS="alpha amd64 ~arm hppa ~mips ppc ppc64 sparc x86 ~x86-fbsd"
|
||
12 years ago
|
IUSE="static-libs"
|
||
13 years ago
|
|
||
|
pkg_setup() {
|
||
|
enewgroup uptimed
|
||
|
enewuser uptimed -1 -1 -1 uptimed
|
||
|
}
|
||
|
|
||
12 years ago
|
src_prepare() {
|
||
8 years ago
|
default
|
||
13 years ago
|
# respect DESTDIR
|
||
12 years ago
|
sed -i -e 's|-d \(/var/spool.*\)$|-d $(DESTDIR)\1|' Makefile.am || die
|
||
|
# fix configure.ac for >=automake-1.13 (bug #467582)
|
||
|
sed 's@AM_CONFIG_HEADER@AC_CONFIG_HEADERS@' -i configure.ac || die
|
||
13 years ago
|
eautoreconf
|
||
|
}
|
||
|
|
||
12 years ago
|
src_configure() {
|
||
|
econf $(use_enable static-libs static)
|
||
|
}
|
||
|
|
||
13 years ago
|
src_install() {
|
||
8 years ago
|
local DOCS=( ChangeLog README.md TODO AUTHORS CREDITS INSTALL.cgi sample-cgi/* )
|
||
12 years ago
|
default
|
||
|
prune_libtool_files --all
|
||
13 years ago
|
keepdir /var/spool/uptimed
|
||
|
fowners uptimed:uptimed /var/spool/uptimed
|
||
7 years ago
|
newinitd "${FILESDIR}"/${PN}.init-r1 uptimed
|
||
12 years ago
|
systemd_dounit "${FILESDIR}/${PN}.service"
|
||
13 years ago
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
einfo "Fixing permissions in /var/spool/${PN}"
|
||
|
chown -R uptimed:uptimed /var/spool/${PN}
|
||
|
echo
|
||
11 years ago
|
elog "Start uptimed with '/etc/init.d/uptimed start' (for openRC)"
|
||
|
elog "or systemctl start uptimed (for systemd)"
|
||
13 years ago
|
elog "To view your uptime records, use the command 'uprecords'."
|
||
|
echo
|
||
|
}
|