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.11 2004/01/29 01:43:47 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}/../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
98 .if exists(${DESTDIR}/usr/libexec/binutils212/cc1)
99 ldconfig -m ${DESTDIR}/usr/lib/gcc2
100 rm -rf ${DESTDIR}/usr/libdata/ldscripts
101 rm -rf ${DESTDIR}/usr/libexec/elf
102 rm -rf ${DESTDIR}/usr/libexec/aout
103 rm -rf ${DESTDIR}/usr/libexec/gcc2
104 csh -c "rm -f ${DESTDIR}/usr/libexec/{cc1,cc1obj,cc1plus,cpp,cpp0}"
105 csh -c "rm -f ${DESTDIR}/usr/libexec/{f771,objformat}"
106 csh -c "rm -f ${DESTDIR}/usr/lib/{crtbegin.o,crtbeginS.o,crtend.o}"
107 csh -c "rm -f ${DESTDIR}/usr/lib/{crtendS.o,libgcc.a,libgcc_p.a}"
108 csh -c "rm -f ${DESTDIR}/usr/lib/{libobjc.a,libobjc_p.a,libstdc++.a}"
109 csh -c "rm -f ${DESTDIR}/usr/lib/{libstdc++.so,libstdc++.so.3}"
110 csh -c "rm -f ${DESTDIR}/usr/lib/{libstdc++_p.a}"
111 csh -c "rm -f ${DESTDIR}/usr/bin/CC"
117 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
118 ${BIN1} ${DESTDIR}/etc; \
119 cap_mkdb ${DESTDIR}/etc/login.conf; \
120 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
121 ${BIN2} ${DESTDIR}/etc; \
122 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
123 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
124 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
125 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
126 ${DEFAULTS} ${DESTDIR}/etc/defaults
127 cd ${.CURDIR}/periodic; ${MAKE} install
128 cd ${.CURDIR}/rc.d; ${MAKE} install
129 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
130 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
132 cd ${.CURDIR}/isdn; ${MAKE} install
134 .if !defined(NO_SENDMAIL)
135 cd ${.CURDIR}/sendmail; ${MAKE} distribution
137 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
138 .if !defined(NO_OPENSSH)
139 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
140 ${SSH} ${DESTDIR}/etc/ssh
142 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
143 ${SSL} ${DESTDIR}/etc/ssl
145 .if !defined(NO_MAKEDEV)
146 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
147 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
148 .if !defined(NO_MAKEDEV_RUN)
149 cd ${DESTDIR}/dev; sh MAKEDEV all
152 cd ${.CURDIR}/root; \
153 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
154 dot.cshrc ${DESTDIR}/root/.cshrc; \
155 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
156 dot.klogin ${DESTDIR}/root/.klogin; \
157 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
158 dot.login ${DESTDIR}/root/.login; \
159 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
160 dot.profile ${DESTDIR}/root/.profile; \
161 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
162 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
163 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
164 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
165 ${MTREE} ${DESTDIR}/etc/mtree
166 cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
167 ${NAMEDB} ${DESTDIR}/etc/namedb
168 cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
169 ${PPPCNF} ${DESTDIR}/etc/ppp
170 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
171 ${ETCMAIL} ${DESTDIR}/etc/mail
172 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
173 ! -f ${DESTDIR}/etc/aliases ]; then \
175 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
177 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
178 ${DESTDIR}/etc/dumpdates
179 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
180 ${DESTDIR}/var/db/locate.database
181 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
182 ${DESTDIR}/var/log/auth.log
183 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
184 ${DESTDIR}/var/log/cron
185 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
186 ${DESTDIR}/var/log/lpd-errs
187 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
188 ${DESTDIR}/var/log/maillog
189 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
190 ${DESTDIR}/var/log/lastlog
191 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
192 ${DESTDIR}/var/log/messages
193 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
194 ${DESTDIR}/var/log/security
195 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
196 ${DESTDIR}/var/log/slip.log
197 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
198 ${DESTDIR}/var/log/ppp.log
199 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
200 ${DESTDIR}/var/log/wtmp
201 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
202 ${DESTDIR}/var/run/utmp
203 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
205 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
206 ${FREEBSD} ${DESTDIR}/
208 cd ${.CURDIR}/../share/man; ${MAKE} makedb
212 -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
213 while [ $$# -gt 0 ] ; \
215 for dir in /usr/share/locale \
217 /usr/local/share/nls; \
219 test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
220 test -L "$$2" && rm -rf "$$2"; \
221 test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
225 mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
226 mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
227 mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
228 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
229 -p ${DESTDIR}/usr/include
230 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
231 -p ${DESTDIR}/usr/libdata/perl/5.00503/mach
232 .if !defined(NO_SENDMAIL)
233 mtree -deU -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
235 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
236 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
237 cd ${DESTDIR}/usr/share/man; \
238 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
239 while [ $$# -gt 0 ] ; \
245 cd ${DESTDIR}/usr/share/locale; \
246 set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
247 while [ $$# -gt 0 ] ; \
253 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
254 cd ${DESTDIR}/usr/share/nls; \
255 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
256 while [ $$# -gt 0 ] ; \
264 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
265 ${BIN1} ${BIN2} nsmb.conf opieaccess \
266 ${DESTDIR}/usr/share/examples/etc
267 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
268 ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
270 .include <bsd.prog.mk>