media-radio/flrig: amd64 stable wrt bug #559398
[gentoo.git] / sys-process / anacron / anacron-2.3-r3.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 inherit eutils toolchain-funcs
8
9 DESCRIPTION="a periodic command scheduler"
10 HOMEPAGE="http://anacron.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
12
13 LICENSE="GPL-2+"
14 SLOT="0"
15 KEYWORDS="~amd64 ~arm ~ppc ~x86"
16 IUSE=""
17
18 DEPEND="sys-process/cronbase"
19 RDEPEND="${RDEPEND}
20         virtual/mta"
21
22 src_prepare() {
23         epatch "${FILESDIR}"/${P}-compile-fix-from-debian.patch
24         epatch "${FILESDIR}"/${P}-headers.patch
25         sed -i \
26                 -e '/^CFLAGS/{s:=:+=:;s:-O2::}' \
27                 Makefile || die
28 }
29
30 src_configure() {
31         tc-export CC
32 }
33
34 src_install() {
35         #this does not work if the directory exists already
36         diropts -m0750 -o root -g cron
37         keepdir /var/spool/anacron
38
39         doman anacrontab.5 anacron.8
40
41         newinitd "${FILESDIR}"/anacron.rc6 anacron
42
43         dodoc ChangeLog README TODO
44
45         dosbin anacron
46
47         insinto /etc
48         doins "${FILESDIR}"/anacrontab
49 }
50
51 pkg_postinst() {
52         if [[ -z ${REPLACING_VERSIONS} ]] ; then
53                 elog "Schedule the command \"anacron -s\" as a daily cron-job (preferably"
54                 elog "at some early morning hour).  This will make sure that jobs are run"
55                 elog "when the systems is left running for a night."
56                 echo
57                 elog "Update /etc/anacrontab to include what you want anacron to run."
58
59                 echo
60                 elog "You may wish to read the Gentoo Linux Cron Guide, which can be"
61                 elog "found online at:"
62                 elog "    https://wiki.gentoo.org/wiki/Cron"
63         fi
64 }