summaryrefslogtreecommitdiff
path: root/sys-process/dcron/dcron-4.5-r2.ebuild
blob: 925bb4d7594572574ced755aa1101037d61be065 (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
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit cron toolchain-funcs systemd

DESCRIPTION="A cute little cron from Matt Dillon"
HOMEPAGE="
	http://www.jimpryor.net/linux/dcron.html
	http://apollo.backplane.com/FreeSrc/"
SRC_URI="http://www.jimpryor.net/linux/releases/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"

PATCHES=(
	"${FILESDIR}"/${PN}-4.5-ldflags.patch
	"${FILESDIR}"/${PN}-4.5-pidfile.patch
)

src_configure() {
	tc-export CC

	cat > config <<-EOF || die
		PREFIX = /usr
		CRONTAB_GROUP = cron
	EOF
}

src_install() {
	default
	dodoc extra/run-cron extra/root.crontab "${FILESDIR}"/crontab

	docrondir
	docron crond -m0700 -o root -g wheel
	docrontab

	insinto /etc
	doins "${FILESDIR}"/crontab

	insinto /etc/cron.d
	doins extra/prune-cronstamps

	insinto /etc/logrotate.d
	newins extra/crond.logrotate dcron

	keepdir /var/spool/cron/cronstamps

	newinitd "${FILESDIR}"/dcron.init dcron
	newconfd "${FILESDIR}"/dcron.confd dcron
	systemd_dounit "${FILESDIR}"/dcron.service
}