xref: /openbsd/usr.sbin/nsd/Makefile.bsd-wrapper (revision 73471bf0)
1#	$OpenBSD: Makefile.bsd-wrapper,v 1.19 2021/06/30 11:50:22 deraadt Exp $
2
3.include <bsd.own.mk>
4
5BINDIR=		/usr/sbin
6CHROOTDIR=	/var/nsd
7
8XCFLAGS=	CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDFLAGS}" \
9		YACC="/usr/bin/yacc"
10CONFIGURE_OPTS=	--prefix=/usr \
11		--localstatedir=/var \
12		--sysconfdir=/etc \
13		--with-ssl=/usr \
14		--with-user=_nsd \
15		--with-chroot=${CHROOTDIR} \
16		--with-configdir=${CHROOTDIR}/etc \
17		--with-pidfile="" \
18		--with-zonesdir=${CHROOTDIR}/zones \
19		--with-dbfile="" \
20		--with-zonelistfile="${CHROOTDIR}/db/zone.list" \
21		--with-xfrdir=${CHROOTDIR}/run/xfr \
22		--with-xfrdfile=${CHROOTDIR}/run/xfrd.state \
23		--with-libevent=/usr \
24		--enable-ratelimit \
25		--enable-root-server
26
27PROG=	nsd nsd-checkconf nsd-checkzone nsd-control
28
29MAN=	nsd.8 nsd-checkconf.8 nsd-checkzone.8 nsd-control.8 nsd.conf.5
30
31all:	config.status
32	@exec ${MAKE}
33
34${MAN}:	config.status
35
36.FORCE: .IGNORE
37
38config: .FORCE
39	-rm -f config.cache
40	PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
41	${XCFLAGS} \
42	sh ${.CURDIR}/configure ${CONFIGURE_OPTS}
43
44config.status:
45	PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
46	${XCFLAGS} \
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		nsd-control-setup.sh  ${DESTDIR}${BINDIR}/nsd-control-setup
63
64clean cleandir:
65	-@if [ -e Makefile ]; then ${MAKE} realclean; fi
66	rm -f ${CLEANFILES}
67
68tags:
69	# Nothing here so far...
70
71.include <bsd.obj.mk>
72.include <bsd.subdir.mk>
73.ifndef NOMAN
74.include <bsd.man.mk>
75.endif
76