Makefile revision 142794
11195Srgrimes#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
250472Speter# $FreeBSD: head/etc/Makefile 142794 2005-02-28 14:16:53Z ru $
337Srgrimes
473251Sgshapiro.if !defined(NO_SENDMAIL)
538103SpeterSUBDIR=	sendmail
673251Sgshapiro.endif
738103Speter
899451SruBIN1=	amd.map apmd.conf auth.conf \
9114780Sdougb	crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \
10114780Sdougb	dhclient.conf disktab fbtab ftpusers gettytab group \
1165532Snectar	hosts hosts.allow hosts.equiv hosts.lpd \
1255230Speter	inetd.conf login.access login.conf \
13113674Smtm	mac.conf motd netconfig network.subr networks newsyslog.conf \
14126756Smlaier	pf.conf pf.os phones profile protocols \
15114555Sdougb	rc rc.firewall rc.firewall6 rc.sendmail rc.shutdown \
16114492Sdougb	rc.subr remote rpc services \
1798187Sgordon	shells sysctl.conf syslog.conf usbd.conf \
1855230Speter	etc.${MACHINE_ARCH}/ttys \
191734Sjkh	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
2017639Swosch	${.CURDIR}/../usr.bin/mail/misc/mail.rc \
2117639Swosch	${.CURDIR}/../usr.bin/locate/locate/locate.rc
22121911Smarkm.if !defined(NO_LPR)
23121911SmarkmBIN1+=	printcap
24121911Smarkm.endif
2537Srgrimes
26139113Sru.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
2798548Sru.if !defined(NO_OPENSSH)
2857488SpeterSSH=	${.CURDIR}/../crypto/openssh/ssh_config \
2974837Sgreen	${.CURDIR}/../crypto/openssh/sshd_config \
30124214Sdes	${.CURDIR}/../crypto/openssh/moduli
3157459Smarkm.endif
3260677SkrisSSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
3360677Skris.endif
3460677Skris
3582521Salex# -rwxr-xr-x root:wheel, for the new cron root:wheel
36108002SgreenBIN2=	netstart pccard_ether rc.suspend rc.resume
37147Srgrimes
3827487SasamiMTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
3965168Sasami	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
4095144Sgshapiro.if !defined(NO_SENDMAIL)
4195144SgshapiroMTREE+=	BSD.sendmail.dist
4295144Sgshapiro.endif
43135851Sdougb.if !defined(NO_BIND)
44135851SdougbMTREE+=	BIND.chroot.dist
45135851Sdougb.if defined(WITH_BIND_LIBS)
46135851SdougbMTREE+=	BIND.include.dist
47135851Sdougb.endif
48135851Sdougb.endif
4999451Sru
50135851Sdougb.if !defined(NO_BIND_ETC) && !defined(NO_BIND)
5199451SruNAMEDB=	PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
5290281Sume	make-localhost
53135851Sdougb.endif
5499451Sru
5599451SruPPPCNF=	ppp.conf
5699451Sru
57117292Sgshapiro.if defined(NO_SENDMAIL)
58117292SgshapiroETCMAIL=mailer.conf aliases
59117292Sgshapiro.else
6064598SgshapiroETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
6164598Sgshapiro	mailertable.sample aliases
62117292Sgshapiro.endif
6337Srgrimes
64263Srgrimes# Special top level files for FreeBSD
6599449SruFREEBSD=COPYRIGHT
66263Srgrimes
67124831Sruafterinstall:
68139103Sru.if !defined(NO_MAN)
69124831Sru	cd ${.CURDIR}/../share/man; ${MAKE} makedb
70124831Sru.endif
71124831Sru
724487Sphkdistribute:
73124831Sru	cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
7495327Sobrien	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
755948Sjkh
76142794Sru.include <bsd.endian.mk>
77142794Sru.if ${TARGET_ENDIANNESS} == "1234"
78142794SruCAP_MKDB_ENDIAN= -l
79142794Sru.elif ${TARGET_ENDIANNESS} == "4321"
80142794SruCAP_MKDB_ENDIAN= -b
81142794Sru.else
82142794SruCAP_MKDB_ENDIAN=
83142794Sru.endif
84142794Sru
854487Sphkdistribution:
8699449Sru	cd ${.CURDIR}; \
87100872Sru	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
8899451Sru		${BIN1} ${DESTDIR}/etc; \
89142794Sru	    cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
90100872Sru	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
9199451Sru		${BIN2} ${DESTDIR}/etc; \
92100872Sru	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
9399451Sru		master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
9499451Sru	    pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
95121580Semax	cd ${.CURDIR}/bluetooth; ${MAKE} install
96119385Smtm	cd ${.CURDIR}/defaults; ${MAKE} install
9799449Sru	cd ${.CURDIR}/periodic; ${MAKE} install
9899449Sru	cd ${.CURDIR}/rc.d; ${MAKE} install
9999449Sru	cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
10099449Sru	cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
10199449Sru	cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
10299449Sru	cd ${.CURDIR}/pam.d; ${MAKE} install
10377041Sru.if !defined(NO_I4B)
10499449Sru	cd ${.CURDIR}/isdn; ${MAKE} install
10577041Sru.endif
10673251Sgshapiro.if !defined(NO_SENDMAIL)
10799449Sru	cd ${.CURDIR}/sendmail; ${MAKE} distribution
10873251Sgshapiro.endif
109120202Smarkm.if !defined(NO_OPENSSL)
11098548Sru.if !defined(NO_OPENSSH)
111100872Sru	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
11299451Sru	    ${SSH} ${DESTDIR}/etc/ssh
11357488Speter.endif
114100872Sru	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
11599451Sru	    ${SSL} ${DESTDIR}/etc/ssl
11660677Skris.endif
117120709Sphk.if !defined(NO_KERBEROS)
11899449Sru	cd ${.CURDIR}/root; \
119100872Sru	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
120120709Sphk		dot.k5login ${DESTDIR}/root/.k5login;
121120709Sphk.endif
122120709Sphk	cd ${.CURDIR}/root; \
123120709Sphk	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
12499451Sru		dot.cshrc ${DESTDIR}/root/.cshrc; \
125100872Sru	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
12699451Sru		dot.login ${DESTDIR}/root/.login; \
127100872Sru	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
12899451Sru		dot.profile ${DESTDIR}/root/.profile; \
12999451Sru	    rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
13099451Sru	    ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
13199451Sru	    ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
132100872Sru	cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
1331731Sjkh	    ${MTREE} ${DESTDIR}/etc/mtree
134136242Sdougb.if !defined(NO_BIND)
135136242Sdougb.if !defined(NO_BIND_ETC)
136100872Sru	cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
137135963Sdougb	    ${NAMEDB} ${DESTDIR}/var/named/etc/namedb
138135851Sdougb.endif
139136242Sdougb.if !defined(NO_BIND_MTREE)
140136242Sdougb	@if [ ! -e ${DESTDIR}/etc/namedb ]; then \
141136242Sdougb		set -x; \
142136242Sdougb		ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
143136242Sdougb	fi
144136242Sdougb.endif
145136242Sdougb.endif
146119058Sobrien	cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
1476177Samurai	    ${PPPCNF} ${DESTDIR}/etc/ppp
148100872Sru	cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
14964598Sgshapiro	    ${ETCMAIL} ${DESTDIR}/etc/mail
15064629Sgshapiro	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
15164629Sgshapiro	      ! -f ${DESTDIR}/etc/aliases ]; then \
15264629Sgshapiro		set -x; \
15364629Sgshapiro		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
15464629Sgshapiro	fi
155100872Sru	${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
15637Srgrimes	    ${DESTDIR}/etc/dumpdates
157100872Sru	${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
158147Srgrimes	    ${DESTDIR}/var/db/locate.database
159100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
16092100Srwatson	    ${DESTDIR}/var/log/auth.log
161100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
16299449Sru	    ${DESTDIR}/var/log/cron
163103720Smarkm	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
164113259Sdes	    ${DESTDIR}/var/log/debug.log
165113259Sdes	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
166103738Smarkm	    ${DESTDIR}/var/log/xferlog
167100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
168147Srgrimes	    ${DESTDIR}/var/log/lpd-errs
169100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
17037Srgrimes	    ${DESTDIR}/var/log/maillog
171100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
172288Srgrimes	    ${DESTDIR}/var/log/lastlog
173100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
174147Srgrimes	    ${DESTDIR}/var/log/messages
175100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
17650126Sgreen	    ${DESTDIR}/var/log/security
177100872Sru	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
17813378Sache	    ${DESTDIR}/var/log/slip.log
179100872Sru	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
18017104Spst	    ${DESTDIR}/var/log/ppp.log
181100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
182147Srgrimes	    ${DESTDIR}/var/log/wtmp
183100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
18437Srgrimes	    ${DESTDIR}/var/run/utmp
185100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
1861759Sjkh	    ${DESTDIR}/var/crash
187100872Sru	cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
18899451Sru		${FREEBSD} ${DESTDIR}/
189126977Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
190126977Sru	    ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
191126977Sru	    ${DESTDIR}/boot/device.hints
19237Srgrimes
193147Srgrimesdistrib-dirs:
194127339Sdes	mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
195127339Sdes	mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
196127339Sdes	mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
197127339Sdes	mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
1987129Srgrimes		-p ${DESTDIR}/usr/include
199135875Sdougb.if !defined(NO_BIND)
200135875Sdougb.if defined(WITH_BIND_LIBS)
201135875Sdougb	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
202135875Sdougb	    -p ${DESTDIR}/usr/include
203135875Sdougb.endif
204136242Sdougb.if !defined(NO_BIND_MTREE)
205135875Sdougb	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
206135875Sdougb	    -p ${DESTDIR}/var/named
207135875Sdougb.endif
208136242Sdougb.endif
20995144Sgshapiro.if !defined(NO_SENDMAIL)
21095144Sgshapiro	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
21195144Sgshapiro.endif
212410Srgrimes	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
21377993Sache	cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
21477993Sache	cd ${DESTDIR}/usr/share/man; \
21577993Sache	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
21677993Sache	while [ $$# -gt 0 ] ; \
21777993Sache	do \
21877993Sache		rm -rf "$$1"; \
21977993Sache		ln -s "$$2" "$$1"; \
22077993Sache		shift; shift; \
22177993Sache	done
222110663Sache	cd ${DESTDIR}/usr/share/openssl/man; \
223110663Sache	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
224110663Sache	while [ $$# -gt 0 ] ; \
225110663Sache	do \
226110663Sache		rm -rf "$$1"; \
227110663Sache		ln -s "$$2" "$$1"; \
228110663Sache		shift; shift; \
229110663Sache	done
230110655Snectar	cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
23111635Sache	cd ${DESTDIR}/usr/share/nls; \
23277999Sache	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
23311635Sache	while [ $$# -gt 0 ] ; \
23411635Sache	do \
23511635Sache		rm -rf "$$1"; \
23611635Sache		ln -s "$$2" "$$1"; \
23711635Sache		shift; shift; \
23877999Sache	done
239147Srgrimes
24048185Ssheldonhetc-examples:
241100872Sru	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
24299451Sru	    ${BIN1} ${BIN2} nsmb.conf opieaccess \
24399451Sru	    ${DESTDIR}/usr/share/examples/etc
244119385Smtm	cd ${.CURDIR}/defaults; ${MAKE} install \
245119385Smtm	    DESTDIR=${DESTDIR}/usr/share/examples
24648185Ssheldonh
24737Srgrimes.include <bsd.prog.mk>
248