xref: /freebsd/etc/Makefile (revision 64db83a8ab2d1f72a9b2174b39d2ef42b5b0580c)
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2# $FreeBSD$
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.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
30SSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
31.endif
32
33# -rwxr-xr-x root.wheel, for the new cron root.wheel
34BIN2=	netstart pccard_ether rc.suspend rc.resume
35
36MTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
37	BSD.var.dist BSD.x11.dist
38NAMEDB= PROTO.localhost.rev named.conf named.root make-localhost
39PPPCNF= ppp.deny ppp.shells.sample
40PPPCF2= ppp.conf
41NOSPAM=	Makefile README mailer.conf access.sample virtusertable.sample \
42	mailertable.sample
43
44
45# Special top level files for FreeBSD
46COPYRIGHT=	COPYRIGHT
47FREEBSD=
48FREEBSD+=	${COPYRIGHT}
49
50etc:
51
52distribute:
53	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/bin
54.if defined(OBJFORMAT)
55	echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/bin/etc/objformat
56.endif
57	@echo
58
59distribution:
60	(cd ${.CURDIR}; \
61	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \
62	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN2} ${DESTDIR}/etc; \
63	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/rc.conf ${DESTDIR}/etc/defaults/; \
64	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/make.conf ${DESTDIR}/etc/defaults/; \
65	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/pccard.conf ${DESTDIR}/etc/defaults/; \
66	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
67	    ${DESTDIR}/var/log/cron; \
68	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \
69	    master.passwd ${DESTDIR}/etc; \
70	( cd ${.CURDIR}/periodic; ${MAKE} install ); \
71	( cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ); \
72	( cd ${.CURDIR}/../gnu/libexec/uucp/sample; ${MAKE} install ); \
73	( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \
74	( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \
75	( cd ${.CURDIR}/sendmail; ${MAKE} etc-sendmail.cf ); \
76	( cd ${.CURDIR}/isdn; ${MAKE} install ); \
77	pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; \
78	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
79	     MAKEDEV.local MAKEDEV ${DESTDIR}/dev )
80.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH)
81	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSH} \
82	    ${DESTDIR}/etc/ssh )
83.endif
84.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
85	(cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSL} \
86	    ${DESTDIR}/etc/ssl )
87.endif
88.if !defined(NO_MAKEDEV)
89	(cd ${DESTDIR}/dev; sh MAKEDEV all)
90.endif
91	(cd ${.CURDIR}/root; \
92		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \
93		    ${DESTDIR}/root/.cshrc; \
94		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \
95		    ${DESTDIR}/root/.klogin; \
96		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \
97		    ${DESTDIR}/root/.login; \
98		${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \
99		    ${DESTDIR}/root/.profile; \
100		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
101		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
102		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
103	cd ${.CURDIR}/mtree; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
104	    ${MTREE} ${DESTDIR}/etc/mtree
105	cd ${.CURDIR}/namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
106	    ${NAMEDB} ${DESTDIR}/etc/namedb
107	cd ${.CURDIR}/ppp; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
108	    ${PPPCNF} ${DESTDIR}/etc/ppp
109	cd ${.CURDIR}/ppp; ${INSTALL} -c -o root -g ${BINGRP} -m 600 \
110	    ${PPPCF2} ${DESTDIR}/etc/ppp
111	cd ${.CURDIR}/mail; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
112	    ${NOSPAM} ${DESTDIR}/etc/mail
113	${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \
114	    ${DESTDIR}/etc/dumpdates
115	${INSTALL} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
116	    ${DESTDIR}/var/db/locate.database
117	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
118	    ${DESTDIR}/var/log/lpd-errs
119	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
120	    ${DESTDIR}/var/log/maillog
121	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
122	    ${DESTDIR}/var/log/lastlog
123	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
124	    ${DESTDIR}/var/log/messages
125	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
126	    ${DESTDIR}/var/log/security
127	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
128	    ${DESTDIR}/var/log/slip.log
129	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
130	    ${DESTDIR}/var/log/ppp.log
131	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
132	    ${DESTDIR}/var/log/wtmp
133	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
134	    ${DESTDIR}/var/run/utmp
135	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${.CURDIR}/minfree \
136	    ${DESTDIR}/var/crash
137	(cd ${.CURDIR}/..; \
138	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \
139		${DESTDIR}/)
140	(cd ${.CURDIR}/../share/man; ${MAKE} makedb; )
141
142distrib-dirs:
143	mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
144	mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
145	mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
146	mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
147		-p ${DESTDIR}/usr/include
148	mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
149		-p ${DESTDIR}/usr/libdata/perl/5.00503/mach
150	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
151	cd ${DESTDIR}/usr/share/locale; \
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	cd ${DESTDIR}/usr/share/nls; \
160	set - `cat ${.CURDIR}/locale.alias`; \
161	while [ $$# -gt 0 ] ; \
162	do \
163		rm -rf "$$1"; \
164		ln -s "$$2" "$$1"; \
165		shift; shift; \
166	done; \
167	rm -rf POSIX; \
168	ln -s C POSIX
169
170etc-examples:
171	(cd ${.CURDIR}; \
172	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${BIN1} ${BIN2} \
173	    ${DESTDIR}/usr/share/examples/etc; \
174	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/rc.conf \
175	    ${DESTDIR}/usr/share/examples/etc/defaults; \
176	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/make.conf \
177	    ${DESTDIR}/usr/share/examples/etc/defaults; \
178	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/pccard.conf \
179	    ${DESTDIR}/usr/share/examples/etc/defaults)
180
181.include <bsd.prog.mk>
182