Makefile revision 59257
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2# $FreeBSD: head/etc/Makefile 59257 2000-04-15 16:48:41Z iwasaki $
3
4SUBDIR=	sendmail
5
6BIN1=   aliases amd.map apmd.conf auth.conf \
7	crontab csh.cshrc csh.login csh.logout \
8	dhclient.conf dm.conf fbtab ftpusers gettytab group \
9	hosts hosts.allow host.conf hosts.equiv hosts.lpd \
10	inetd.conf login.access login.conf \
11	motd modems networks newsyslog.conf \
12	pam.conf phones pim6dd.conf pim6sd.conf \
13	printcap profile protocols \
14	rc rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.isdn \
15	rc.network rc.network6 rc.pccard rc.serial rc.shutdown rc.sysctl \
16	remote rpc security services shells syslog.conf usbd.conf \
17	etc.${MACHINE_ARCH}/disktab \
18	etc.${MACHINE_ARCH}/rc.${MACHINE_ARCH} \
19	etc.${MACHINE_ARCH}/ttys \
20	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
21	${.CURDIR}/../usr.bin/mail/misc/mail.rc \
22	${.CURDIR}/../usr.bin/locate/locate/locate.rc
23
24.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH)
25SSH=	${.CURDIR}/../crypto/openssh/ssh_config \
26	${.CURDIR}/../crypto/openssh/sshd_config
27.endif
28
29# -rwxr-xr-x root.wheel, for the new cron root.wheel
30BIN2=	netstart pccard_ether rc.suspend rc.resume
31
32MTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
33	BSD.var.dist BSD.x11.dist
34NAMEDB= PROTO.localhost.rev named.conf named.root make-localhost
35PPPCNF= ppp.deny ppp.shells.sample
36PPPCF2= ppp.conf
37NOSPAM=	Makefile README mailer.conf access.sample virtusertable.sample \
38	mailertable.sample
39
40
41# Special top level files for FreeBSD
42COPYRIGHT=	COPYRIGHT
43FREEBSD=
44FREEBSD+=	${COPYRIGHT}
45
46etc:
47
48distribute:
49	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/bin
50.if defined(OBJFORMAT)
51	echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/bin/etc/objformat
52.endif
53	@echo 
54
55distribution:
56	(cd ${.CURDIR}; \
57	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \
58	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN2} ${DESTDIR}/etc; \
59	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/rc.conf ${DESTDIR}/etc/defaults/; \
60	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/make.conf ${DESTDIR}/etc/defaults/; \
61	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/pccard.conf ${DESTDIR}/etc/defaults/; \
62	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
63	    ${DESTDIR}/var/log/cron; \
64	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \
65	    master.passwd ${DESTDIR}/etc; \
66	( cd ${.CURDIR}/periodic; ${MAKE} install ); \
67	( cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ); \
68	( cd ${.CURDIR}/../gnu/libexec/uucp/sample; ${MAKE} install ); \
69	( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \
70	( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \
71	( cd ${.CURDIR}/sendmail; ${MAKE} etc-sendmail.cf ); \
72	( cd ${.CURDIR}/isdn; ${MAKE} install ); \
73	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; \
74	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
75	     MAKEDEV.local MAKEDEV ${DESTDIR}/dev )
76.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH)
77	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSH} \
78	    ${DESTDIR}/etc/ssh )
79.endif
80.if !defined(NO_MAKEDEV)
81	(cd ${DESTDIR}/dev; sh MAKEDEV all)
82.endif
83	(cd ${.CURDIR}/root; \
84		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \
85		    ${DESTDIR}/root/.cshrc; \
86		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \
87		    ${DESTDIR}/root/.klogin; \
88		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \
89		    ${DESTDIR}/root/.login; \
90		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \
91		    ${DESTDIR}/root/.profile; \
92		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
93		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
94		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
95	cd ${.CURDIR}/mtree; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
96	    ${MTREE} ${DESTDIR}/etc/mtree
97	cd ${.CURDIR}/namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
98	    ${NAMEDB} ${DESTDIR}/etc/namedb
99	cd ${.CURDIR}/ppp; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
100	    ${PPPCNF} ${DESTDIR}/etc/ppp
101	cd ${.CURDIR}/ppp; ${INSTALL} -c -o root -g ${BINGRP} -m 600 \
102	    ${PPPCF2} ${DESTDIR}/etc/ppp
103	cd ${.CURDIR}/mail; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
104	    ${NOSPAM} ${DESTDIR}/etc/mail
105	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
106	    ${DESTDIR}/etc/dumpdates
107	${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
108	    ${DESTDIR}/var/db/locate.database
109	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
110	    ${DESTDIR}/var/log/lpd-errs
111	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
112	    ${DESTDIR}/var/log/maillog
113	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
114	    ${DESTDIR}/var/log/lastlog
115	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
116	    ${DESTDIR}/var/log/messages
117	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
118	    ${DESTDIR}/var/log/security
119	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
120	    ${DESTDIR}/var/log/slip.log
121	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
122	    ${DESTDIR}/var/log/ppp.log
123	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
124	    ${DESTDIR}/var/log/wtmp
125	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
126	    ${DESTDIR}/var/run/utmp
127	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${.CURDIR}/minfree \
128	    ${DESTDIR}/var/crash
129	(cd ${.CURDIR}/..; \
130	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \
131		${DESTDIR}/)
132	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
133
134distrib-dirs:
135	mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
136	mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
137	mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
138	mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
139		-p ${DESTDIR}/usr/include
140	mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
141		-p ${DESTDIR}/usr/libdata/perl/5.00503/mach
142	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
143	cd ${DESTDIR}/usr/share/locale; \
144	set - `cat ${.CURDIR}/locale.alias`; \
145	while [ $$# -gt 0 ] ; \
146	do \
147		rm -rf "$$1"; \
148		ln -s "$$2" "$$1"; \
149		shift; shift; \
150	done
151	cd ${DESTDIR}/usr/share/nls; \
152	set - `cat ${.CURDIR}/locale.alias`; \
153	while [ $$# -gt 0 ] ; \
154	do \
155		rm -rf "$$1"; \
156		ln -s "$$2" "$$1"; \
157		shift; shift; \
158	done; \
159	rm -rf POSIX; \
160	ln -s C POSIX
161
162etc-examples:
163	(cd ${.CURDIR}; \
164	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${BIN1} ${BIN2} \
165	    ${DESTDIR}/usr/share/examples/etc; \
166	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/rc.conf \
167	    ${DESTDIR}/usr/share/examples/etc/defaults; \
168	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/make.conf \
169	    ${DESTDIR}/usr/share/examples/etc/defaults; \
170	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/pccard.conf \
171	    ${DESTDIR}/usr/share/examples/etc/defaults)
172
173.include <bsd.prog.mk>
174