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