/[gentoo-x86]/sys-process/bcron/bcron-0.09-r2.ebuild
Gentoo

Contents of /sys-process/bcron/bcron-0.09-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Apr 20 17:52:35 2011 UTC (3 years, 4 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -4 lines
Don't PROVIDE and don't block against virtual/cron, bug 360109.

(Portage version: 2.1.9.46/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-process/bcron/bcron-0.09-r2.ebuild,v 1.2 2011/01/29 21:52:10 bangert Exp $
4
5 EAPI="2"
6
7 inherit cron eutils toolchain-funcs multilib
8 DESCRIPTION="A new cron system designed with secure operations in mind by Bruce Guenter"
9
10 HOMEPAGE="http://untroubled.org/bcron/"
11 SRC_URI="http://untroubled.org/bcron/archive/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE=""
17
18 DEPEND=">=dev-libs/bglibs-1.106"
19 RDEPEND=">=sys-process/cronbase-0.3.2
20 virtual/mta
21 sys-apps/ucspi-unix
22 virtual/daemontools"
23
24 CRON_SYSTEM_CRONTAB="yes"
25
26 src_prepare() {
27 epatch "${FILESDIR}/bcron-0.09-fix-parallel-build.patch"
28 epatch "${FILESDIR}/bcron-0.09-fix-socket-permissions.patch"
29 }
30
31 src_configure() {
32 echo "/usr/include/bglibs" > conf-bgincs
33 echo "/usr/$(get_libdir)/bglibs" > conf-bglibs
34 echo "${D}/usr/bin" > conf-bin
35 echo "$(tc-getCC) ${CFLAGS}" > conf-cc
36 echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
37 }
38
39 src_install() {
40 einstall || die
41
42 #fix permissions of crontab
43 fperms o-rwx /usr/bin/bcrontab
44 fowners root:cron /usr/bin/bcrontab
45
46 doman bcrontab.1 crontab.5 bcron-update.8 bcron-start.8
47 doman bcron-spool.8 bcron-sched.8 bcron-exec.8
48
49 dodoc ANNOUNCEMENT NEWS README TODO
50
51 keepdir /etc/cron.d
52
53 keepdir /var/spool/cron/crontabs
54 keepdir /var/spool/cron/tmp
55
56 for i in crontabs tmp;
57 do
58 fowners cron:cron /var/spool/cron/$i
59 fperms go-rwx /var/spool/cron/$i
60 done
61
62 dodir /etc/bcron
63
64 insinto /etc
65 doins "${FILESDIR}"/crontab
66
67 insinto /var/lib/supervise/bcron
68 doins bcron-sched.run
69
70 insinto /var/lib/supervise/bcron/log
71 doins bcron-sched-log.run
72
73 insinto /var/lib/supervise/bcron-spool
74 doins bcron-spool.run
75
76 insinto /var/lib/supervise/bcron-update
77 doins bcron-update.run
78 }
79
80 pkg_config() {
81 cd "${ROOT}"var/lib/supervise/bcron
82 [ -e run ] && cp run bcron-sched.run.`date +%Y%m%d%H%M%S`
83 cp bcron-sched.run run
84 chmod u+x run
85
86 cd "${ROOT}"/var/lib/supervise/bcron/log
87 [ -e run ] && cp run bcron-sched-log.run.`date +%Y%m%d%H%M%S`
88 cp bcron-sched-log.run run
89 chmod u+x run
90
91 cd "${ROOT}"/var/lib/supervise/bcron-spool
92 [ -e run ] && cp run bcron-spool.run.`date +%Y%m%d%H%M%S`
93 cp bcron-spool.run run
94 chmod u+x run
95
96 cd "${ROOT}"/var/lib/supervise/bcron-update
97 [ -e run ] && cp run bcron-update.run.`date +%Y%m%d%H%M%S`
98 cp bcron-update.run run
99 chmod u+x run
100
101 [ ! -e "${ROOT}"/var/spool/cron/trigger ] && mkfifo "${ROOT}"var/spool/cron/trigger
102 chown cron:cron /var/spool/cron/trigger
103 chmod go-rwx /var/spool/cron/trigger
104 }
105
106 pkg_postinst() {
107 echo
108 elog "Run "
109 elog "emerge --config =${PF}"
110 elog "to create or update your run files (backups are created) in"
111 elog " /var/lib/supervise/bcron (bcron daemon) and"
112 elog " /var/lib/supervise/bcron-spool (crontab receiver) and"
113 elog " /var/lib/supervise/bcron-update (system crontab updater)"
114
115 cron_pkg_postinst
116 }

  ViewVC Help
Powered by ViewVC 1.1.20