Makefile revision 139113
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2# $FreeBSD: head/etc/Makefile 139113 2004-12-21 10:16:04Z ru $
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	pf.conf pf.os 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.if !defined(NO_LPR)
23BIN1+=	printcap
24.endif
25
26.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
27.if !defined(NO_OPENSSH)
28SSH=	${.CURDIR}/../crypto/openssh/ssh_config \
29	${.CURDIR}/../crypto/openssh/sshd_config \
30	${.CURDIR}/../crypto/openssh/moduli
31.endif
32SSL=	${.CURDIR}/../crypto/openssl/apps/openssl.cnf
33.endif
34
35# -rwxr-xr-x root:wheel, for the new cron root:wheel
36BIN2=	netstart pccard_ether rc.suspend rc.resume
37
38MTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
39	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
40.if !defined(NO_SENDMAIL)
41MTREE+=	BSD.sendmail.dist
42.endif
43.if !defined(NO_BIND)
44MTREE+=	BIND.chroot.dist
45.if defined(WITH_BIND_LIBS)
46MTREE+=	BIND.include.dist
47.endif
48.endif
49
50.if !defined(NO_BIND_ETC) && !defined(NO_BIND)
51NAMEDB=	PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
52	make-localhost
53.endif
54
55PPPCNF=	ppp.conf
56
57.if defined(NO_SENDMAIL)
58ETCMAIL=mailer.conf aliases
59.else
60ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
61	mailertable.sample aliases
62.endif
63
64# Special top level files for FreeBSD
65FREEBSD=COPYRIGHT
66
67afterinstall:
68.if !defined(NO_MAN)
69	cd ${.CURDIR}/../share/man; ${MAKE} makedb
70.endif
71
72distribute:
73	cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION}
74	cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
75
76distribution:
77	cd ${.CURDIR}; \
78	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
79		${BIN1} ${DESTDIR}/etc; \
80	    cap_mkdb ${DESTDIR}/etc/login.conf; \
81	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
82		${BIN2} ${DESTDIR}/etc; \
83	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
84		master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
85	    pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
86	cd ${.CURDIR}/bluetooth; ${MAKE} install
87	cd ${.CURDIR}/defaults; ${MAKE} install
88	cd ${.CURDIR}/periodic; ${MAKE} install
89	cd ${.CURDIR}/rc.d; ${MAKE} install
90	cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
91	cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
92	cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
93	cd ${.CURDIR}/pam.d; ${MAKE} install
94.if !defined(NO_I4B)
95	cd ${.CURDIR}/isdn; ${MAKE} install
96.endif
97.if !defined(NO_SENDMAIL)
98	cd ${.CURDIR}/sendmail; ${MAKE} distribution
99.endif
100.if !defined(NO_OPENSSL)
101.if !defined(NO_OPENSSH)
102	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
103	    ${SSH} ${DESTDIR}/etc/ssh
104.endif
105	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
106	    ${SSL} ${DESTDIR}/etc/ssl
107.endif
108.if !defined(NO_KERBEROS)
109	cd ${.CURDIR}/root; \
110	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
111		dot.k5login ${DESTDIR}/root/.k5login;
112.endif
113	cd ${.CURDIR}/root; \
114	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
115		dot.cshrc ${DESTDIR}/root/.cshrc; \
116	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
117		dot.login ${DESTDIR}/root/.login; \
118	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
119		dot.profile ${DESTDIR}/root/.profile; \
120	    rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
121	    ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
122	    ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
123	cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
124	    ${MTREE} ${DESTDIR}/etc/mtree
125.if !defined(NO_BIND)
126.if !defined(NO_BIND_ETC)
127	cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
128	    ${NAMEDB} ${DESTDIR}/var/named/etc/namedb
129.endif
130.if !defined(NO_BIND_MTREE)
131	@if [ ! -e ${DESTDIR}/etc/namedb ]; then \
132		set -x; \
133		ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
134	fi
135.endif
136.endif
137	cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
138	    ${PPPCNF} ${DESTDIR}/etc/ppp
139	cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
140	    ${ETCMAIL} ${DESTDIR}/etc/mail
141	@if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
142	      ! -f ${DESTDIR}/etc/aliases ]; then \
143		set -x; \
144		ln -s mail/aliases ${DESTDIR}/etc/aliases; \
145	fi
146	${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
147	    ${DESTDIR}/etc/dumpdates
148	${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
149	    ${DESTDIR}/var/db/locate.database
150	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
151	    ${DESTDIR}/var/log/auth.log
152	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
153	    ${DESTDIR}/var/log/cron
154	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
155	    ${DESTDIR}/var/log/debug.log
156	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
157	    ${DESTDIR}/var/log/xferlog
158	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
159	    ${DESTDIR}/var/log/lpd-errs
160	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
161	    ${DESTDIR}/var/log/maillog
162	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
163	    ${DESTDIR}/var/log/lastlog
164	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
165	    ${DESTDIR}/var/log/messages
166	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
167	    ${DESTDIR}/var/log/security
168	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
169	    ${DESTDIR}/var/log/slip.log
170	${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
171	    ${DESTDIR}/var/log/ppp.log
172	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
173	    ${DESTDIR}/var/log/wtmp
174	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
175	    ${DESTDIR}/var/run/utmp
176	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
177	    ${DESTDIR}/var/crash
178	cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
179		${FREEBSD} ${DESTDIR}/
180	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
181	    ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
182	    ${DESTDIR}/boot/device.hints
183
184distrib-dirs:
185	mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
186	mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
187	mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
188	mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
189		-p ${DESTDIR}/usr/include
190.if !defined(NO_BIND)
191.if defined(WITH_BIND_LIBS)
192	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
193	    -p ${DESTDIR}/usr/include
194.endif
195.if !defined(NO_BIND_MTREE)
196	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
197	    -p ${DESTDIR}/var/named
198.endif
199.endif
200.if !defined(NO_SENDMAIL)
201	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
202.endif
203	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
204	cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
205	cd ${DESTDIR}/usr/share/man; \
206	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
207	while [ $$# -gt 0 ] ; \
208	do \
209		rm -rf "$$1"; \
210		ln -s "$$2" "$$1"; \
211		shift; shift; \
212	done
213	cd ${DESTDIR}/usr/share/openssl/man; \
214	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
215	while [ $$# -gt 0 ] ; \
216	do \
217		rm -rf "$$1"; \
218		ln -s "$$2" "$$1"; \
219		shift; shift; \
220	done
221	cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
222	cd ${DESTDIR}/usr/share/nls; \
223	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
224	while [ $$# -gt 0 ] ; \
225	do \
226		rm -rf "$$1"; \
227		ln -s "$$2" "$$1"; \
228		shift; shift; \
229	done
230
231etc-examples:
232	cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
233	    ${BIN1} ${BIN2} nsmb.conf opieaccess \
234	    ${DESTDIR}/usr/share/examples/etc
235	cd ${.CURDIR}/defaults; ${MAKE} install \
236	    DESTDIR=${DESTDIR}/usr/share/examples
237
238.include <bsd.prog.mk>
239