summaryrefslogtreecommitdiff
path: root/time/anacron/Makefile
blob: d3e1b56196ce087f313f3c16553830d74b6f1930 (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
57
58
59
60
61
62
63
64
65
66
# $NetBSD: Makefile,v 1.11 2008/06/12 02:14:52 joerg Exp $
#

DISTNAME=	anacron-2.3
PKGREVISION=	2
CATEGORIES=	time
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=anacron/}

MAINTAINER=	jmmv@NetBSD.org
HOMEPAGE=	http://anacron.sourceforge.net/
COMMENT=	Periodic command scheduler

PKG_DESTDIR_SUPPORT=	user-destdir

USE_TOOLS+=		gmake

.include "../../mk/bsd.prefs.mk"

SUBST_CLASSES+=		hdr
SUBST_MESSAGE.hdr=	Setting up global.h.
SUBST_STAGE.hdr=	pre-configure
SUBST_FILES.hdr=	global.h
.if ${OPSYS} == "NetBSD"
SUBST_SED.hdr=		-e 's|SENDMAIL ".*"|SENDMAIL "/usr/sbin/sendmail"|'
.else
SUBST_SED.hdr=		-e 's|SENDMAIL ".*"|SENDMAIL "/usr/lib/sendmail"|'
.endif

SUBST_CLASSES+=		man
SUBST_MESSAGE.man=	Setting up manpages.
SUBST_STAGE.man=	pre-configure
SUBST_FILES.man=	anacrontab.5 anacron.8
SUBST_SED.man=		-e 's|/etc/anacrontab|${PKG_SYSCONFDIR}/anacrontab|g'

MAKE_FLAGS+=		ANACRONTAB='${PKG_SYSCONFDIR}/anacrontab'
MAKE_FLAGS+=		BINDIR='${PREFIX}/sbin'
MAKE_FLAGS+=		CFLAGS=${CFLAGS:M*:Q}
MAKE_FLAGS+=		INSTALL_DATA=${INSTALL_DATA:Q}
MAKE_FLAGS+=		INSTALL_DIR=${TRUE:Q}
MAKE_FLAGS+=		INSTALL_PROGRAM=${INSTALL_PROGRAM:Q}
MAKE_FLAGS+=		MANDIR='${PREFIX}/man'
MAKE_FLAGS+=		PREFIX=${PREFIX:Q}
MAKE_FLAGS+=		SHELL=${SH:Q}
MAKE_FLAGS+=		SPOOLDIR='/var/spool/anacron'

EGDIR=			${PREFIX}/share/examples/anacron
.if exists(${FILESDIR}/anacrontab.${OPSYS})
CONF_FILES=		${EGDIR}/anacrontab.${OPSYS} \
			${PKG_SYSCONFDIR}/anacrontab
CONF_FILES_MODE=	0600
.endif

OWN_DIRS=		/var/spool/anacron

RCD_SCRIPTS=		anacron

INSTALLATION_DIRS=	${PKGMANDIR}/man5 ${PKGMANDIR}/man8 sbin ${EGDIR}

INSTALL_MAKE_FLAGS=	BINDIR=${DESTDIR}${PREFIX}/sbin \
			MANDIR=${DESTDIR}${PREFIX}/${PKGMANDIR}

post-install:
	${INSTALL_DATA} ${FILESDIR}/anacrontab.FreeBSD ${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${FILESDIR}/anacrontab.NetBSD ${DESTDIR}${EGDIR}

.include "../../mk/bsd.pkg.mk"