1 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91
2 # $FreeBSD: src/etc/Makefile,v 1.219.2.38 2003/03/04 09:49:00 ru Exp $
3 # $DragonFly: src/etc/Makefile,v 1.7 2003/11/19 01:05:32 dillon Exp $
5 .if !defined(NO_SENDMAIL)
9 BINUPDATE= apmd.conf fbtab gettytab network.subr \
11 rc rc.firewall rc.firewall6 \
12 rc.sendmail rc.shutdown \
13 rc.subr rpc services \
14 etc.${MACHINE_ARCH}/disktab \
15 ${.CURDIR}/../usr.bin/mail/misc/mail.rc \
16 ${.CURDIR}/../usr.bin/locate/locate/locate.rc
20 crontab csh.cshrc csh.login csh.logout \
21 dhclient.conf dm.conf ftpusers group \
22 hosts hosts.allow host.conf hosts.equiv hosts.lpd \
23 inetd.conf login.access login.conf \
24 motd modems networks newsyslog.conf \
25 pam.conf phones printcap profile \
27 shells sysctl.conf syslog.conf usbd.conf \
28 etc.${MACHINE_ARCH}/ttys \
29 ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config
31 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
32 .if !defined(NO_OPENSSH)
33 SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
34 ${.CURDIR}/../crypto/openssh/sshd_config \
37 SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
40 # -rwxr-xr-x root:wheel, for the new cron root:wheel
41 BIN2= pccard_ether rc.suspend rc.resume
43 DEFAULTS= rc.conf make.conf pccard.conf periodic.conf
45 MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
46 BSD.var.dist BSD.x11.dist BSD.x11-4.dist
47 .if !defined(NO_SENDMAIL)
48 MTREE+= BSD.sendmail.dist
51 NAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
56 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
57 mailertable.sample aliases
59 # Special top level files for FreeBSD
63 cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
64 .if defined(OBJFORMAT)
65 echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/${DISTRIBUTION}/etc/objformat
70 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
71 ${BINUPDATE} ${DESTDIR}/etc; \
72 cap_mkdb ${DESTDIR}/etc/login.conf; \
73 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
74 ${BIN2} ${DESTDIR}/etc;
75 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
76 ${DEFAULTS} ${DESTDIR}/etc/defaults
77 cd ${.CURDIR}/periodic; ${MAKE} install
78 cd ${.CURDIR}/rc.d; ${MAKE} install
79 cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
80 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
81 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
83 cd ${.CURDIR}/isdn; ${MAKE} install
85 .if !defined(NO_MAKEDEV)
86 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
87 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
88 .if !defined(NO_MAKEDEV_RUN)
89 cd ${DESTDIR}/dev; sh MAKEDEV all
92 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
93 ${MTREE} ${DESTDIR}/etc/mtree
94 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
95 ${FREEBSD} ${DESTDIR}/
97 cd ${.CURDIR}/../share/man; ${MAKE} makedb
102 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
103 ${BIN1} ${DESTDIR}/etc; \
104 cap_mkdb ${DESTDIR}/etc/login.conf; \
105 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
106 ${BIN2} ${DESTDIR}/etc; \
107 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
108 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
109 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
110 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
111 ${DEFAULTS} ${DESTDIR}/etc/defaults
112 cd ${.CURDIR}/periodic; ${MAKE} install
113 cd ${.CURDIR}/rc.d; ${MAKE} install
114 cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
115 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
116 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
118 cd ${.CURDIR}/isdn; ${MAKE} install
120 .if !defined(NO_SENDMAIL)
121 cd ${.CURDIR}/sendmail; ${MAKE} distribution
123 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
124 .if !defined(NO_OPENSSH)
125 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
126 ${SSH} ${DESTDIR}/etc/ssh
128 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
129 ${SSL} ${DESTDIR}/etc/ssl
131 .if !defined(NO_MAKEDEV)
132 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
133 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
134 .if !defined(NO_MAKEDEV_RUN)
135 cd ${DESTDIR}/dev; sh MAKEDEV all
138 cd ${.CURDIR}/root; \
139 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
140 dot.cshrc ${DESTDIR}/root/.cshrc; \
141 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
142 dot.klogin ${DESTDIR}/root/.klogin; \
143 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
144 dot.login ${DESTDIR}/root/.login; \
145 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
146 dot.profile ${DESTDIR}/root/.profile; \
147 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
148 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
149 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
150 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
151 ${MTREE} ${DESTDIR}/etc/mtree
152 cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
153 ${NAMEDB} ${DESTDIR}/etc/namedb
154 cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
155 ${PPPCNF} ${DESTDIR}/etc/ppp
156 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
157 ${ETCMAIL} ${DESTDIR}/etc/mail
158 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
159 ! -f ${DESTDIR}/etc/aliases ]; then \
161 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
163 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
164 ${DESTDIR}/etc/dumpdates
165 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
166 ${DESTDIR}/var/db/locate.database
167 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
168 ${DESTDIR}/var/log/auth.log
169 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
170 ${DESTDIR}/var/log/cron
171 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
172 ${DESTDIR}/var/log/lpd-errs
173 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
174 ${DESTDIR}/var/log/maillog
175 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
176 ${DESTDIR}/var/log/lastlog
177 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
178 ${DESTDIR}/var/log/messages
179 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
180 ${DESTDIR}/var/log/security
181 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
182 ${DESTDIR}/var/log/slip.log
183 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
184 ${DESTDIR}/var/log/ppp.log
185 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
186 ${DESTDIR}/var/log/wtmp
187 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
188 ${DESTDIR}/var/run/utmp
189 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
191 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
192 ${FREEBSD} ${DESTDIR}/
194 cd ${.CURDIR}/../share/man; ${MAKE} makedb
198 -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
199 while [ $$# -gt 0 ] ; \
201 for dir in /usr/share/locale \
203 /usr/local/share/nls; \
205 test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
206 test -L "$$2" && rm -rf "$$2"; \
207 test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
211 mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
212 mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
213 mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
214 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
215 -p ${DESTDIR}/usr/include
216 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
217 -p ${DESTDIR}/usr/libdata/perl/5.00503/mach
218 .if !defined(NO_SENDMAIL)
219 mtree -deU -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
221 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
222 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
223 cd ${DESTDIR}/usr/share/man; \
224 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
225 while [ $$# -gt 0 ] ; \
231 cd ${DESTDIR}/usr/share/locale; \
232 set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
233 while [ $$# -gt 0 ] ; \
239 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
240 cd ${DESTDIR}/usr/share/nls; \
241 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
242 while [ $$# -gt 0 ] ; \
250 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
251 ${BIN1} ${BIN2} nsmb.conf opieaccess \
252 ${DESTDIR}/usr/share/examples/etc
253 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
254 ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
256 .include <bsd.prog.mk>