Makefile revision 126977
1279377Simp#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2279377Simp# $FreeBSD: head/etc/Makefile 126977 2004-03-14 17:18:39Z ru $
3279377Simp
4279377Simp.if !defined(NO_SENDMAIL)
5279377SimpSUBDIR=	sendmail
6279377Simp.endif
7279377Simp
8279377SimpBIN1=	amd.map apmd.conf auth.conf \
9279377Simp	crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \
10279377Simp	dhclient.conf disktab fbtab ftpusers gettytab group \
11279377Simp	hosts hosts.allow hosts.equiv hosts.lpd \
12279377Simp	inetd.conf login.access login.conf \
13279377Simp	mac.conf motd netconfig network.subr networks newsyslog.conf \
14279377Simp	pf.conf pf.os phones profile protocols \
15279377Simp	rc rc.firewall rc.firewall6 rc.sendmail rc.shutdown \
16279377Simp	rc.subr remote rpc services \
17279377Simp	shells sysctl.conf syslog.conf usbd.conf \
18279377Simp	etc.${MACHINE_ARCH}/ttys \
19279377Simp	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
20279377Simp	${.CURDIR}/../usr.bin/mail/misc/mail.rc \
21279377Simp	${.CURDIR}/../usr.bin/locate/locate/locate.rc
22279377Simp.if !defined(NO_LPR)
23279377SimpBIN1+=	printcap
24279377Simp.endif
25279377Simp
26279377Simp.if !defined(NOCRYPT) && !defined(NO_OPENSSL)
27279377Simp.if !defined(NO_OPENSSH)
28279377SimpSSH=	${.CURDIR}/../crypto/openssh/ssh_config \
29279377Simp	${.CURDIR}/../crypto/openssh/sshd_config \
30279377Simp	${.CURDIR}/../crypto/openssh/moduli
31279377Simp.endif
32279377SimpSSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
33279377Simp.endif
34279377Simp
35279377Simp# -rwxr-xr-x root:wheel, for the new cron root:wheel
36279377SimpBIN2=	netstart pccard_ether rc.suspend rc.resume
37279377Simp
38279377SimpMTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
39279377Simp	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
40279377Simp.if !defined(NO_SENDMAIL)
41279377SimpMTREE+=	BSD.sendmail.dist
42279377Simp.endif
43279377Simp
44279377SimpNAMEDB=	PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
45279377Simp	make-localhost
46279377Simp
47279377SimpPPPCNF=	ppp.conf
48279377Simp
49279377Simp.if defined(NO_SENDMAIL)
50279377SimpETCMAIL=mailer.conf aliases
51279377Simp.else
52279377SimpETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
53279377Simp	mailertable.sample aliases
54279377Simp.endif
55279377Simp
56279377Simp# Special top level files for FreeBSD
57279377SimpFREEBSD=COPYRIGHT
58279377Simp
59279377Simpafterinstall:
60279377Simp.if !defined(NOMAN)
61279377Simp	cd ${.CURDIR}/../share/man; ${MAKE} makedb
62279377Simp.endif
63279377Simp
64279377Simpdistribute:
65279377Simp	cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
66279377Simp	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
67279377Simp
68279377Simpdistribution:
69279377Simp	cd ${.CURDIR}; \
70279377Simp	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
71279377Simp		${BIN1} ${DESTDIR}/etc; \
72279377Simp	    cap_mkdb ${DESTDIR}/etc/login.conf; \
73279377Simp	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
74279377Simp		${BIN2} ${DESTDIR}/etc; \
75279377Simp	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
76279377Simp		master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
77279377Simp	    pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
78279377Simp	cd ${.CURDIR}/bluetooth; ${MAKE} install
79279377Simp	cd ${.CURDIR}/defaults; ${MAKE} install
80279377Simp	cd ${.CURDIR}/periodic; ${MAKE} install
81279377Simp	cd ${.CURDIR}/rc.d; ${MAKE} install
82279377Simp	cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
83279377Simp	cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
84279377Simp	cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
85279377Simp	cd ${.CURDIR}/pam.d; ${MAKE} install
86279377Simp.if !defined(NO_I4B)
87279377Simp	cd ${.CURDIR}/isdn; ${MAKE} install
88279377Simp.endif
89279377Simp.if !defined(NO_SENDMAIL)
90279377Simp	cd ${.CURDIR}/sendmail; ${MAKE} distribution
91279377Simp.endif
92279377Simp.if !defined(NO_OPENSSL)
93279377Simp.if !defined(NO_OPENSSH)
94279377Simp	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
95279377Simp	    ${SSH} ${DESTDIR}/etc/ssh
96279377Simp.endif
97279377Simp	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
98279377Simp	    ${SSL} ${DESTDIR}/etc/ssl
99279377Simp.endif
100279377Simp.if !defined(NO_KERBEROS)
101279377Simp	cd ${.CURDIR}/root; \
102279377Simp	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
103279377Simp		dot.k5login ${DESTDIR}/root/.k5login;
104279377Simp.endif
105279377Simp	cd ${.CURDIR}/root; \
106279377Simp	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
107279377Simp		dot.cshrc ${DESTDIR}/root/.cshrc; \
108279377Simp	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
109279377Simp		dot.login ${DESTDIR}/root/.login; \
110279377Simp	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
111279377Simp		dot.profile ${DESTDIR}/root/.profile; \
112279377Simp	    rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
113279377Simp	    ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
114279377Simp	    ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
115279377Simp	cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
116279377Simp	    ${MTREE} ${DESTDIR}/etc/mtree
117279377Simp	cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
118279377Simp	    ${NAMEDB} ${DESTDIR}/etc/namedb
119279377Simp	cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
120279377Simp	    ${PPPCNF} ${DESTDIR}/etc/ppp
121279377Simp	cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
122279377Simp	    ${ETCMAIL} ${DESTDIR}/etc/mail
123279377Simp	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
124279377Simp	      ! -f ${DESTDIR}/etc/aliases ]; then \
125279377Simp		set -x; \
126279377Simp		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
127279377Simp	fi
128279377Simp	${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
129279377Simp	    ${DESTDIR}/etc/dumpdates
130279377Simp	${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
131279377Simp	    ${DESTDIR}/var/db/locate.database
132279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
133279377Simp	    ${DESTDIR}/var/log/auth.log
134279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
135279377Simp	    ${DESTDIR}/var/log/cron
136279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
137279377Simp	    ${DESTDIR}/var/log/debug.log
138279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
139279377Simp	    ${DESTDIR}/var/log/xferlog
140279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
141279377Simp	    ${DESTDIR}/var/log/lpd-errs
142279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
143279377Simp	    ${DESTDIR}/var/log/maillog
144279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
145279377Simp	    ${DESTDIR}/var/log/lastlog
146279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
147279377Simp	    ${DESTDIR}/var/log/messages
148279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
149279377Simp	    ${DESTDIR}/var/log/security
150279377Simp	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
151279377Simp	    ${DESTDIR}/var/log/slip.log
152279377Simp	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
153279377Simp	    ${DESTDIR}/var/log/ppp.log
154279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
155279377Simp	    ${DESTDIR}/var/log/wtmp
156279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
157279377Simp	    ${DESTDIR}/var/run/utmp
158279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
159279377Simp	    ${DESTDIR}/var/crash
160279377Simp	cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
161279377Simp		${FREEBSD} ${DESTDIR}/
162279377Simp	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
163279377Simp	    ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
164279377Simp	    ${DESTDIR}/boot/device.hints
165279377Simp
166279377Simpdistrib-dirs:
167279377Simp	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
168279377Simp	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
169279377Simp	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
170279377Simp	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
171279377Simp		-p ${DESTDIR}/usr/include
172279377Simp.if !defined(NO_SENDMAIL)
173279377Simp	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
174279377Simp.endif
175279377Simp	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
176279377Simp	cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
177279377Simp	cd ${DESTDIR}/usr/share/man; \
178279377Simp	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
179279377Simp	while [ $$# -gt 0 ] ; \
180279377Simp	do \
181279377Simp		rm -rf "$$1"; \
182279377Simp		ln -s "$$2" "$$1"; \
183279377Simp		shift; shift; \
184279377Simp	done
185279377Simp	cd ${DESTDIR}/usr/share/openssl/man; \
186279377Simp	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
187279377Simp	while [ $$# -gt 0 ] ; \
188279377Simp	do \
189279377Simp		rm -rf "$$1"; \
190279377Simp		ln -s "$$2" "$$1"; \
191279377Simp		shift; shift; \
192279377Simp	done
193279377Simp	cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
194279377Simp	cd ${DESTDIR}/usr/share/nls; \
195279377Simp	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
196279377Simp	while [ $$# -gt 0 ] ; \
197279377Simp	do \
198279377Simp		rm -rf "$$1"; \
199279377Simp		ln -s "$$2" "$$1"; \
200279377Simp		shift; shift; \
201279377Simp	done
202279377Simp
203279377Simpetc-examples:
204279377Simp	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
205279377Simp	    ${BIN1} ${BIN2} nsmb.conf opieaccess \
206279377Simp	    ${DESTDIR}/usr/share/examples/etc
207279377Simp	cd ${.CURDIR}/defaults; ${MAKE} install \
208279377Simp	    DESTDIR=${DESTDIR}/usr/share/examples
209279377Simp
210279377Simp.include <bsd.prog.mk>
211279377Simp