xref: /openbsd/usr.sbin/nsd/Makefile.bsd-wrapper (revision b39c5158)
1#	$OpenBSD: Makefile.bsd-wrapper,v 1.5 2010/08/22 09:30:18 jakob Exp $
2
3.include <bsd.own.mk>
4
5BINDIR=		/usr/sbin
6CHROOTDIR=	/var/nsd
7USER=		_nsd
8
9XCFLAGS=	CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDFLAGS}" \
10		YACC="/usr/bin/yacc"
11CONFIGURE_OPTS=	--prefix=/usr \
12		--localstatedir=/var \
13		--sysconfdir=/etc \
14		--with-ssl=/usr \
15		--with-user=${USER} \
16		--with-nsd-conf-file=/etc/nsd.conf \
17		--with-chroot=${CHROOTDIR} \
18		--with-pidfile=${CHROOTDIR}/nsd.pid \
19		--with-zonesdir=${CHROOTDIR}/zones \
20		--with-dbfile=${CHROOTDIR}/nsd.db \
21		--with-difffile=${CHROOTDIR}/ixfr.db \
22		--with-xfrdfile=${CHROOTDIR}/xfrd.state \
23		--enable-root-server
24
25PROG=	nsd nsd-zonec nsd-notify nsd-checkconf nsd-patch nsd-xfer
26
27MAN=	nsd.8 nsdc.8 nsd-zonec.8 nsd-notify.8 nsd-checkconf.8 nsd-patch.8 \
28	nsd-xfer.8 nsd.conf.5
29
30
31all:	config.status
32	${MAKE}
33
34.FORCE: .IGNORE
35
36config: .FORCE
37	-rm -f config.cache
38	PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
39	${XCFLAGS} \
40	INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
41	sh ${.CURDIR}/configure ${CONFIGURE_OPTS}
42
43config.status:
44	PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
45	${XCFLAGS} \
46	INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
47	sh ${.CURDIR}/configure ${CONFIGURE_OPTS}
48
49.ifdef NOMAN
50maninstall:
51	@echo NOMAN is set
52.endif
53
54install: maninstall
55.for file in ${PROG}
56	${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} \
57		-o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
58		${file} ${DESTDIR}${BINDIR}
59.endfor
60	${INSTALL} ${INSTALL_COPY} \
61		-o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
62		nsdc.sh  ${DESTDIR}${BINDIR}/nsdc
63
64BEFOREMAN= config.status
65
66clean cleandir:
67	-@if [ -e Makefile ]; then ${MAKE} realclean; fi
68	rm -f ${CLEANFILES}
69
70depend:
71	# Nothing here so far...
72
73lint:
74	# Nothing here so far...
75
76tags:
77	# Nothing here so far...
78
79.include <bsd.obj.mk>
80.include <bsd.subdir.mk>
81.ifndef NOMAN
82.include <bsd.man.mk>
83.endif
84