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.8 2004/01/09 20:25:13 drhodus 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}/../share/termcap; ${MAKE} etc-termcap
80 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
82 cd ${.CURDIR}/isdn; ${MAKE} install
84 .if !defined(NO_MAKEDEV)
85 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
86 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
87 .if !defined(NO_MAKEDEV_RUN)
88 cd ${DESTDIR}/dev; sh MAKEDEV all
91 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
92 ${MTREE} ${DESTDIR}/etc/mtree
93 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
94 ${FREEBSD} ${DESTDIR}/
96 cd ${.CURDIR}/../share/man; ${MAKE} makedb
101 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
102 ${BIN1} ${DESTDIR}/etc; \
103 cap_mkdb ${DESTDIR}/etc/login.conf; \
104 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
105 ${BIN2} ${DESTDIR}/etc; \
106 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
107 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
108 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
109 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
110 ${DEFAULTS} ${DESTDIR}/etc/defaults
111 cd ${.CURDIR}/periodic; ${MAKE} install
112 cd ${.CURDIR}/rc.d; ${MAKE} install
113 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
114 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
116 cd ${.CURDIR}/isdn; ${MAKE} install
118 .if !defined(NO_SENDMAIL)
119 cd ${.CURDIR}/sendmail; ${MAKE} distribution
121 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
122 .if !defined(NO_OPENSSH)
123 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
124 ${SSH} ${DESTDIR}/etc/ssh
126 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
127 ${SSL} ${DESTDIR}/etc/ssl
129 .if !defined(NO_MAKEDEV)
130 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
131 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
132 .if !defined(NO_MAKEDEV_RUN)
133 cd ${DESTDIR}/dev; sh MAKEDEV all
136 cd ${.CURDIR}/root; \
137 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
138 dot.cshrc ${DESTDIR}/root/.cshrc; \
139 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
140 dot.klogin ${DESTDIR}/root/.klogin; \
141 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
142 dot.login ${DESTDIR}/root/.login; \
143 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
144 dot.profile ${DESTDIR}/root/.profile; \
145 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
146 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
147 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
148 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
149 ${MTREE} ${DESTDIR}/etc/mtree
150 cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
151 ${NAMEDB} ${DESTDIR}/etc/namedb
152 cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
153 ${PPPCNF} ${DESTDIR}/etc/ppp
154 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
155 ${ETCMAIL} ${DESTDIR}/etc/mail
156 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
157 ! -f ${DESTDIR}/etc/aliases ]; then \
159 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
161 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
162 ${DESTDIR}/etc/dumpdates
163 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
164 ${DESTDIR}/var/db/locate.database
165 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
166 ${DESTDIR}/var/log/auth.log
167 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
168 ${DESTDIR}/var/log/cron
169 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
170 ${DESTDIR}/var/log/lpd-errs
171 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
172 ${DESTDIR}/var/log/maillog
173 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
174 ${DESTDIR}/var/log/lastlog
175 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
176 ${DESTDIR}/var/log/messages
177 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
178 ${DESTDIR}/var/log/security
179 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
180 ${DESTDIR}/var/log/slip.log
181 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
182 ${DESTDIR}/var/log/ppp.log
183 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
184 ${DESTDIR}/var/log/wtmp
185 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
186 ${DESTDIR}/var/run/utmp
187 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
189 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
190 ${FREEBSD} ${DESTDIR}/
192 cd ${.CURDIR}/../share/man; ${MAKE} makedb
196 -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
197 while [ $$# -gt 0 ] ; \
199 for dir in /usr/share/locale \
201 /usr/local/share/nls; \
203 test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
204 test -L "$$2" && rm -rf "$$2"; \
205 test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
209 mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
210 mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
211 mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
212 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
213 -p ${DESTDIR}/usr/include
214 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
215 -p ${DESTDIR}/usr/libdata/perl/5.00503/mach
216 .if !defined(NO_SENDMAIL)
217 mtree -deU -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
219 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
220 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
221 cd ${DESTDIR}/usr/share/man; \
222 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
223 while [ $$# -gt 0 ] ; \
229 cd ${DESTDIR}/usr/share/locale; \
230 set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
231 while [ $$# -gt 0 ] ; \
237 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
238 cd ${DESTDIR}/usr/share/nls; \
239 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
240 while [ $$# -gt 0 ] ; \
248 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
249 ${BIN1} ${BIN2} nsmb.conf opieaccess \
250 ${DESTDIR}/usr/share/examples/etc
251 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
252 ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
254 .include <bsd.prog.mk>