summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-process/dcron/ChangeLog10
-rw-r--r--sys-process/dcron/dcron-4.5-r1.ebuild56
-rw-r--r--sys-process/dcron/files/dcron.service11
3 files changed, 75 insertions, 2 deletions
diff --git a/sys-process/dcron/ChangeLog b/sys-process/dcron/ChangeLog
index 82594a40bef9..cc093959a09e 100644
--- a/sys-process/dcron/ChangeLog
+++ b/sys-process/dcron/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-process/dcron
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/ChangeLog,v 1.26 2012/07/01 18:20:07 armin76 Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/ChangeLog,v 1.27 2013/07/27 08:35:31 pacho Exp $
+
+*dcron-4.5-r1 (27 Jul 2013)
+
+ 27 Jul 2013; Pacho Ramos <pacho@gentoo.org> +dcron-4.5-r1.ebuild,
+ +files/dcron.service:
+ Install unit file #470754
01 Jul 2012; Raúl Porcel <armin76@gentoo.org> dcron-4.5.ebuild:
alpha/ia64/m68k/s390/sh/sparc stable wrt #413969
diff --git a/sys-process/dcron/dcron-4.5-r1.ebuild b/sys-process/dcron/dcron-4.5-r1.ebuild
new file mode 100644
index 000000000000..aeb4116fcd94
--- /dev/null
+++ b/sys-process/dcron/dcron-4.5-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/dcron-4.5-r1.ebuild,v 1.1 2013/07/27 08:35:31 pacho Exp $
+
+EAPI=4
+
+inherit cron toolchain-funcs eutils 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 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.5-pidfile.patch
+ epatch "${FILESDIR}"/${PN}-4.5-ldflags.patch
+ tc-export CC
+ cat <<-EOF > config
+ PREFIX = /usr
+ CRONTAB_GROUP = cron
+ EOF
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ dodoc CHANGELOG README "${FILESDIR}"/crontab
+
+ docrondir
+ docron crond -m0700 -o root -g wheel
+ docrontab
+
+ insinto /etc
+ doins "${FILESDIR}"/crontab
+ insinto /etc/cron.d
+ doins extra/prune-cronstamps
+ dodoc extra/run-cron extra/root.crontab
+
+ newinitd "${FILESDIR}"/dcron.init-4.5 dcron
+ newconfd "${FILESDIR}"/dcron.confd-4.4 dcron
+ systemd_dounit "${FILESDIR}"/dcron.service
+
+ insinto /etc/logrotate.d
+ newins extra/crond.logrotate dcron
+}
+
+pkg_postinst() {
+ # upstream renamed their pid file
+ local src="${ROOT}/var/run/cron.pid" dst="${ROOT}/var/run/crond.pid"
+ if [ -e "${src}" -a ! -e "${dst}" ] ; then
+ cp "${src}" "${dst}"
+ fi
+}
diff --git a/sys-process/dcron/files/dcron.service b/sys-process/dcron/files/dcron.service
new file mode 100644
index 000000000000..0332390f2c81
--- /dev/null
+++ b/sys-process/dcron/files/dcron.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Cron Daemon
+After=syslog.target
+
+[Service]
+ExecStart=/usr/sbin/crond -S -l info
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
+