Makefile revision 120709
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2# $FreeBSD: head/etc/Makefile 120709 2003-10-03 19:38:21Z phk $
3
4.if !defined(NO_SENDMAIL)
5SUBDIR=	sendmail
6.endif
7
8BIN1=	amd.map apmd.conf auth.conf \
9	crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \
10	dhclient.conf disktab fbtab ftpusers gettytab group \
11	hosts hosts.allow hosts.equiv hosts.lpd \
12	inetd.conf login.access login.conf \
13	mac.conf motd netconfig network.subr networks newsyslog.conf \
14	phones profile protocols \
15	rc rc.firewall rc.firewall6 rc.sendmail rc.shutdown \
16	rc.subr remote rpc services \
17	shells sysctl.conf syslog.conf usbd.conf \
18	etc.${MACHINE_ARCH}/ttys \
19	${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
20	${.CURDIR}/../usr.bin/mail/misc/mail.rc \
21	${.CURDIR}/../usr.bin/locate/locate/locate.rc
22
23.if !defined(NO_OPENSSL)
24.if !defined(NO_OPENSSH)
25SSH=	${.CURDIR}/../crypto/openssh/ssh_config \
26	${.CURDIR}/../crypto/openssh/sshd_config \
27	moduli
28.endif
29SSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
30.endif
31
32# -rwxr-xr-x root:wheel, for the new cron root:wheel
33BIN2=	netstart pccard_ether rc.suspend rc.resume
34
35MTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
36	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
37.if !defined(NO_SENDMAIL)
38MTREE+=	BSD.sendmail.dist
39.endif
40
41NAMEDB=	PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
42	make-localhost
43
44PPPCNF=	ppp.conf
45
46.if defined(NO_SENDMAIL)
47ETCMAIL=mailer.conf aliases
48.else
49ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
50	mailertable.sample aliases
51.endif
52
53# Special top level files for FreeBSD
54FREEBSD=COPYRIGHT
55
56distribute:
57	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
58	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
59	    ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
60	    ${DISTDIR}/${DISTRIBUTION}/boot/device.hints
61
62distribution:
63	cd ${.CURDIR}; \
64	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
65		${BIN1} ${DESTDIR}/etc; \
66	    cap_mkdb ${DESTDIR}/etc/login.conf; \
67	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
68		${BIN2} ${DESTDIR}/etc; \
69	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
70		master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
71	    pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
72	cd ${.CURDIR}/defaults; ${MAKE} install
73	cd ${.CURDIR}/periodic; ${MAKE} install
74	cd ${.CURDIR}/rc.d; ${MAKE} install
75	cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
76	cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
77	cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
78	cd ${.CURDIR}/pam.d; ${MAKE} install
79.if !defined(NO_I4B)
80	cd ${.CURDIR}/isdn; ${MAKE} install
81.endif
82.if !defined(NO_LPR)
83	cd ${.CURDIR}; \
84	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
85		printcap ${DESTDIR}/etc
86.endif
87.if !defined(NO_SENDMAIL)
88	cd ${.CURDIR}/sendmail; ${MAKE} distribution
89.endif
90.if !defined(NO_OPENSSL)
91.if !defined(NO_OPENSSH)
92	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
93	    ${SSH} ${DESTDIR}/etc/ssh
94.endif
95	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
96	    ${SSL} ${DESTDIR}/etc/ssl
97.endif
98.if !defined(NO_KERBEROS)
99	cd ${.CURDIR}/root; \
100	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
101		dot.k5login ${DESTDIR}/root/.k5login;
102.endif
103	cd ${.CURDIR}/root; \
104	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
105		dot.cshrc ${DESTDIR}/root/.cshrc; \
106	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
107		dot.login ${DESTDIR}/root/.login; \
108	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
109		dot.profile ${DESTDIR}/root/.profile; \
110	    rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
111	    ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
112	    ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
113	cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
114	    ${MTREE} ${DESTDIR}/etc/mtree
115	cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
116	    ${NAMEDB} ${DESTDIR}/etc/namedb
117	cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
118	    ${PPPCNF} ${DESTDIR}/etc/ppp
119	cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
120	    ${ETCMAIL} ${DESTDIR}/etc/mail
121	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
122	      ! -f ${DESTDIR}/etc/aliases ]; then \
123		set -x; \
124		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
125	fi
126	${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
127	    ${DESTDIR}/etc/dumpdates
128	${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
129	    ${DESTDIR}/var/db/locate.database
130	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
131	    ${DESTDIR}/var/log/auth.log
132	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
133	    ${DESTDIR}/var/log/cron
134	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
135	    ${DESTDIR}/var/log/debug.log
136	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
137	    ${DESTDIR}/var/log/xferlog
138	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
139	    ${DESTDIR}/var/log/lpd-errs
140	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
141	    ${DESTDIR}/var/log/maillog
142	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
143	    ${DESTDIR}/var/log/lastlog
144	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
145	    ${DESTDIR}/var/log/messages
146	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
147	    ${DESTDIR}/var/log/security
148	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
149	    ${DESTDIR}/var/log/slip.log
150	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
151	    ${DESTDIR}/var/log/ppp.log
152	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
153	    ${DESTDIR}/var/log/wtmp
154	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
155	    ${DESTDIR}/var/run/utmp
156	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
157	    ${DESTDIR}/var/crash
158	cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
159		${FREEBSD} ${DESTDIR}/
160.if !defined(NOMAN)
161	cd ${.CURDIR}/../share/man; ${MAKE} makedb
162.endif
163
164distrib-dirs:
165	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
166	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
167	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
168	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
169		-p ${DESTDIR}/usr/include
170.if !defined(NO_SENDMAIL)
171	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
172.endif
173	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
174	cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
175	cd ${DESTDIR}/usr/share/man; \
176	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
177	while [ $$# -gt 0 ] ; \
178	do \
179		rm -rf "$$1"; \
180		ln -s "$$2" "$$1"; \
181		shift; shift; \
182	done
183	cd ${DESTDIR}/usr/share/openssl/man; \
184	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
185	while [ $$# -gt 0 ] ; \
186	do \
187		rm -rf "$$1"; \
188		ln -s "$$2" "$$1"; \
189		shift; shift; \
190	done
191	cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
192	cd ${DESTDIR}/usr/share/nls; \
193	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
194	while [ $$# -gt 0 ] ; \
195	do \
196		rm -rf "$$1"; \
197		ln -s "$$2" "$$1"; \
198		shift; shift; \
199	done
200
201etc-examples:
202	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
203	    ${BIN1} ${BIN2} nsmb.conf opieaccess \
204	    ${DESTDIR}/usr/share/examples/etc
205	cd ${.CURDIR}/defaults; ${MAKE} install \
206	    DESTDIR=${DESTDIR}/usr/share/examples
207
208.include <bsd.prog.mk>
209