/[gentoo-alt]/trunk/sys-process/vixie-cron/vixie-cron-4.1-r7.ebuild
Gentoo

Contents of /trunk/sys-process/vixie-cron/vixie-cron-4.1-r7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 371 - (show annotations) (download)
Sat May 14 13:59:10 2005 UTC (9 years, 4 months ago) by flameeyes
File size: 2558 byte(s)
Added vixie-cron with fixed pamd file and virtual/pam dependency.

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4
5 inherit cron toolchain-funcs debug
6
7 # no useful homepage, bug #65898
8 HOMEPAGE="ftp://ftp.isc.org/isc/cron/"
9 DESCRIPTION="Paul Vixie's cron daemon, a fully featured crond implementation"
10
11 SELINUX_PATCH="${P}-selinux.diff"
12 GENTOO_PATCH_REV="r4"
13
14 SRC_URI="mirror://gentoo/${P}.tar.bz2
15 mirror://gentoo/${P}-gentoo-${GENTOO_PATCH_REV}.patch.bz2"
16
17 LICENSE="as-is"
18 KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ppc ~ppc64 sparc x86"
19 IUSE="selinux pam debug"
20
21 DEPEND=">=sys-apps/portage-2.0.47-r10
22 selinux? ( sys-libs/libselinux )
23 pam? ( virtual/pam )"
24
25 RDEPEND="selinux? ( sys-libs/libselinux )
26 pam? ( virtual/pam )"
27
28 src_unpack() {
29 unpack ${A}
30 cd ${S}
31
32 epatch ${WORKDIR}/${P}-gentoo-${GENTOO_PATCH_REV}.patch
33 epatch ${FILESDIR}/crontab.5.diff
34 epatch ${FILESDIR}/${P}-commandline.patch
35 epatch ${FILESDIR}/${P}-basename.diff
36
37 use pam && epatch ${FILESDIR}/${P}-pam.patch
38 use selinux && epatch ${FILESDIR}/${SELINUX_PATCH}
39 }
40
41 src_compile() {
42 # we need to tinker with ldflags since we're installing as setuid. see
43 # "[gentoo-core] Heads up changes in suid handing with portage >=51_pre21"
44 # for details. Note that we do the sed fixes here rather than in unpack so
45 # that our changes to LDFLAGS are picked up.
46
47 append-ldflags -Wl,-z,now
48 use debug && append-flags -DDEBUGGING
49
50 sed -i -e "s:gcc \(-Wall.*\):$(tc-getCC) \1 ${CFLAGS}:" \
51 -e "s:^\(LDFLAGS[ \t]\+=\).*:\1 ${LDFLAGS}:" Makefile \
52 || die "sed Makefile failed"
53
54 emake || die "emake failed"
55 }
56
57 src_install() {
58 docrondir
59 docron
60 docrontab
61
62 # /etc stuff
63 insinto /etc
64 newins ${FILESDIR}/crontab-3.0.1-r4 crontab
65 newins ${FILESDIR}/${P}-cron.deny cron.deny
66
67 keepdir /etc/cron.d
68 newpamd ${FILESDIR}/pamd.compatible cron
69 newinitd ${FILESDIR}/vixie-cron.rc6 vixie-cron
70
71 # doc stuff
72 doman crontab.1 crontab.5 cron.8
73 dodoc ${FILESDIR}/crontab
74 dodoc CHANGES CONVERSION FEATURES MAIL README THANKS
75 }
76
77 pkg_postinst() {
78 if [[ -f ${ROOT}/etc/init.d/vcron ]]
79 then
80 ewarn "Please run:"
81 ewarn "rc-update del vcron"
82 ewarn "rc-update add vixie-cron default"
83 fi
84
85 # bug 71326
86 if [[ -u ${ROOT}/etc/pam.d/cron ]] ; then
87 echo
88 ewarn "Warning: previous ebuilds didn't reset permissions prior"
89 ewarn "to installing crontab, resulting in /etc/pam.d/cron being"
90 ewarn "installed with the SUID and executable bits set."
91 ewarn
92 ewarn "Run the following as root to set the proper permissions:"
93 ewarn " chmod 0644 /etc/pam.d/cron"
94 echo
95 fi
96
97 cron_pkg_postinst
98 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20