summaryrefslogtreecommitdiff
blob: 83a8be5c6799196a36d56df64e8fc9b203d54e9a (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
55
56
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/sys-apps/vcron/vcron-3.0.1.ebuild,v 1.2 2002/07/11 06:30:55 drobbins Exp $

MY_P=${P/vcron/vixie-cron}
S=${WORKDIR}/${MY_P}
DESCRIPTION="The Vixie cron daemon"
SRC_URI="ftp://ftp.vix.com/pub/vixie/${MY_P}.tar.bz2"

DEPEND="virtual/glibc"

src_unpack() {

	unpack ${A}
	
	cd ${S}
	patch -p1 < ${FILESDIR}/${MY_P}-gentoo.patch || die

	cp Makefile Makefile.orig
	sed -e "s:-O2:${CFLAGS}:" Makefile.orig > Makefile
}

src_compile() {

	emake || die
}

src_install() {

	dodir /usr/{bin,sbin,share/man/man{1,5,8}}
	make DESTDIR=${D} \
		DESTMAN=${D}/usr/share/man \
		install || die

	dodoc CHANGES CONVERSION FEATURES MAIL MANIFEST README THANKS

	diropts -m0755 ; dodir /var/spool
	diropts -m0700 ; dodir /var/spool/cron
	diropts -m0755 ; dodir /etc/cron.d

	exeinto /etc/init.d
	newexe ${FILESDIR}/vcron.rc6 vcron
}

pkg_postinst() {

	if [ ! -d /var/spool/cron ] ; then
		mkdir -p /var/spool/cron
		chmod 0700 /var/spool/cron
	fi
	if [ ! -d /etc/cron.d ] ; then
		mkdir -p /etc/cron.d
		chmod 0755 /etc/cron.d
	fi
}