Makefile revision 121911
18478Swollman#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
28478Swollman# $FreeBSD: head/etc/Makefile 121911 2003-11-02 22:13:36Z markm $
38478Swollman
48478Swollman.if !defined(NO_SENDMAIL)
58478SwollmanSUBDIR=	sendmail
68478Swollman.endif
78478Swollman
88478SwollmanBIN1=	amd.map apmd.conf auth.conf \
98478Swollman	crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \
108478Swollman	dhclient.conf disktab fbtab ftpusers gettytab group \
118478Swollman	hosts hosts.allow hosts.equiv hosts.lpd \
128478Swollman	inetd.conf login.access login.conf \
138478Swollman	mac.conf motd netconfig network.subr networks newsyslog.conf \
148478Swollman	phones profile protocols \
158478Swollman	rc rc.firewall rc.firewall6 rc.sendmail rc.shutdown \
168478Swollman	rc.subr remote rpc services \
178478Swollman	shells sysctl.conf syslog.conf usbd.conf \
188478Swollman	etc.${MACHINE_ARCH}/ttys \
198478Swollman	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
208478Swollman	${.CURDIR}/../usr.bin/mail/misc/mail.rc \
218478Swollman	${.CURDIR}/../usr.bin/locate/locate/locate.rc
228478Swollman.if !defined(NO_LPR)
238478SwollmanBIN1+=	printcap
248478Swollman.endif
258478Swollman
268478Swollman.if !defined(NOCRYPT) && !defined(NO_OPENSSL)
278478Swollman.if !defined(NO_OPENSSH)
288478SwollmanSSH=	${.CURDIR}/../crypto/openssh/ssh_config \
298478Swollman	${.CURDIR}/../crypto/openssh/sshd_config \
30114589Sobrien	moduli
318478Swollman.endif
3236999ScharnierSSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
338478Swollman.endif
348478Swollman
358478Swollman# -rwxr-xr-x root:wheel, for the new cron root:wheel
368478SwollmanBIN2=	netstart pccard_ether rc.suspend rc.resume
378478Swollman
3836999ScharnierMTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
39114589Sobrien	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
4036999Scharnier.if !defined(NO_SENDMAIL)
41114589SobrienMTREE+=	BSD.sendmail.dist
42114589Sobrien.endif
438478Swollman
44136104SdesNAMEDB=	PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
45136104Sdes	make-localhost
46136104Sdes
47136104SdesPPPCNF=	ppp.conf
4836999Scharnier
49136104Sdes.if defined(NO_SENDMAIL)
50136104SdesETCMAIL=mailer.conf aliases
51136104Sdes.else
528478SwollmanETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
5378732Sdd	mailertable.sample aliases
5496381Salfred.endif
55136104Sdes
568478Swollman# Special top level files for FreeBSD
578478SwollmanFREEBSD=COPYRIGHT
58136104Sdes
598478Swollmandistribute:
60136104Sdes	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
61136104Sdes	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
62136104Sdes	    ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
63136104Sdes	    ${DISTDIR}/${DISTRIBUTION}/boot/device.hints
64136104Sdes
65136104Sdesdistribution:
66136104Sdes	cd ${.CURDIR}; \
67136104Sdes	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
68136104Sdes		${BIN1} ${DESTDIR}/etc; \
69136104Sdes	    cap_mkdb ${DESTDIR}/etc/login.conf; \
70136104Sdes	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
71136104Sdes		${BIN2} ${DESTDIR}/etc; \
72136104Sdes	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
73163852Sjhb		master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
74136104Sdes	    pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
75158083Sps	cd ${.CURDIR}/bluetooth; ${MAKE} install
76136104Sdes	cd ${.CURDIR}/defaults; ${MAKE} install
77158083Sps	cd ${.CURDIR}/periodic; ${MAKE} install
78136104Sdes	cd ${.CURDIR}/rc.d; ${MAKE} install
79163852Sjhb	cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
80158083Sps	cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
81158083Sps	cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
82158083Sps	cd ${.CURDIR}/pam.d; ${MAKE} install
83163852Sjhb.if !defined(NO_I4B)
84136104Sdes	cd ${.CURDIR}/isdn; ${MAKE} install
85136104Sdes.endif
86136104Sdes.if !defined(NO_SENDMAIL)
87136104Sdes	cd ${.CURDIR}/sendmail; ${MAKE} distribution
88136110Sdes.endif
89136104Sdes.if !defined(NO_OPENSSL)
90136104Sdes.if !defined(NO_OPENSSH)
91136104Sdes	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
92136104Sdes	    ${SSH} ${DESTDIR}/etc/ssh
93136104Sdes.endif
94136104Sdes	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
958478Swollman	    ${SSL} ${DESTDIR}/etc/ssl
9692542Simp.endif
978478Swollman.if !defined(NO_KERBEROS)
98136104Sdes	cd ${.CURDIR}/root; \
9993491Sphk	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
10093491Sphk		dot.k5login ${DESTDIR}/root/.k5login;
1018478Swollman.endif
10224359Simp	cd ${.CURDIR}/root; \
1038478Swollman	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
1048478Swollman		dot.cshrc ${DESTDIR}/root/.cshrc; \
1058478Swollman	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
1068478Swollman		dot.login ${DESTDIR}/root/.login; \
1078478Swollman	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
1088478Swollman		dot.profile ${DESTDIR}/root/.profile; \
1098478Swollman	    rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
110136104Sdes	    ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
111136104Sdes	    ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
1128478Swollman	cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
1138478Swollman	    ${MTREE} ${DESTDIR}/etc/mtree
114136104Sdes	cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
1158478Swollman	    ${NAMEDB} ${DESTDIR}/etc/namedb
1168478Swollman	cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
117136104Sdes	    ${PPPCNF} ${DESTDIR}/etc/ppp
11893491Sphk	cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
11993491Sphk	    ${ETCMAIL} ${DESTDIR}/etc/mail
1208478Swollman	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
121136104Sdes	      ! -f ${DESTDIR}/etc/aliases ]; then \
12293491Sphk		set -x; \
12394272Sphk		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
12493491Sphk	fi
12594272Sphk	${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
12693491Sphk	    ${DESTDIR}/etc/dumpdates
12793491Sphk	${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
1288478Swollman	    ${DESTDIR}/var/db/locate.database
12993491Sphk	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
13093491Sphk	    ${DESTDIR}/var/log/auth.log
13193491Sphk	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
13293491Sphk	    ${DESTDIR}/var/log/cron
13394272Sphk	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
13493491Sphk	    ${DESTDIR}/var/log/debug.log
13593491Sphk	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
1368478Swollman	    ${DESTDIR}/var/log/xferlog
13793491Sphk	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
13894272Sphk	    ${DESTDIR}/var/log/lpd-errs
1398478Swollman	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
14093491Sphk	    ${DESTDIR}/var/log/maillog
1418478Swollman	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
142	    ${DESTDIR}/var/log/lastlog
143	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
144	    ${DESTDIR}/var/log/messages
145	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
146	    ${DESTDIR}/var/log/security
147	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
148	    ${DESTDIR}/var/log/slip.log
149	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
150	    ${DESTDIR}/var/log/ppp.log
151	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
152	    ${DESTDIR}/var/log/wtmp
153	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
154	    ${DESTDIR}/var/run/utmp
155	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
156	    ${DESTDIR}/var/crash
157	cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
158		${FREEBSD} ${DESTDIR}/
159.if !defined(NOMAN)
160	cd ${.CURDIR}/../share/man; ${MAKE} makedb
161.endif
162
163distrib-dirs:
164	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
165	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
166	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
167	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
168		-p ${DESTDIR}/usr/include
169.if !defined(NO_SENDMAIL)
170	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
171.endif
172	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
173	cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
174	cd ${DESTDIR}/usr/share/man; \
175	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
176	while [ $$# -gt 0 ] ; \
177	do \
178		rm -rf "$$1"; \
179		ln -s "$$2" "$$1"; \
180		shift; shift; \
181	done
182	cd ${DESTDIR}/usr/share/openssl/man; \
183	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
184	while [ $$# -gt 0 ] ; \
185	do \
186		rm -rf "$$1"; \
187		ln -s "$$2" "$$1"; \
188		shift; shift; \
189	done
190	cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
191	cd ${DESTDIR}/usr/share/nls; \
192	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
193	while [ $$# -gt 0 ] ; \
194	do \
195		rm -rf "$$1"; \
196		ln -s "$$2" "$$1"; \
197		shift; shift; \
198	done
199
200etc-examples:
201	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
202	    ${BIN1} ${BIN2} nsmb.conf opieaccess \
203	    ${DESTDIR}/usr/share/examples/etc
204	cd ${.CURDIR}/defaults; ${MAKE} install \
205	    DESTDIR=${DESTDIR}/usr/share/examples
206
207.include <bsd.prog.mk>
208