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.6 2003/08/01 03:48:33 rob Exp $
5 .if !defined(NO_SENDMAIL)
9 BIN1= amd.map apmd.conf auth.conf \
10 crontab csh.cshrc csh.login csh.logout \
11 dhclient.conf dm.conf fbtab ftpusers gettytab group \
12 hosts hosts.allow host.conf hosts.equiv hosts.lpd \
13 inetd.conf login.access login.conf \
14 motd modems networks network.subr newsyslog.conf \
15 pam.conf phones printcap profile protocols \
16 rc rc.firewall rc.firewall6 \
17 rc.sendmail rc.shutdown \
18 rc.subr remote rpc services \
19 shells sysctl.conf syslog.conf usbd.conf \
20 etc.${MACHINE_ARCH}/disktab \
21 etc.${MACHINE_ARCH}/ttys \
22 ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
23 ${.CURDIR}/../usr.bin/mail/misc/mail.rc \
24 ${.CURDIR}/../usr.bin/locate/locate/locate.rc
26 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
27 .if !defined(NO_OPENSSH)
28 SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
29 ${.CURDIR}/../crypto/openssh/sshd_config \
32 SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
35 # -rwxr-xr-x root:wheel, for the new cron root:wheel
36 BIN2= pccard_ether rc.suspend rc.resume
38 DEFAULTS= rc.conf make.conf pccard.conf periodic.conf
40 MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
41 BSD.var.dist BSD.x11.dist BSD.x11-4.dist
42 .if !defined(NO_SENDMAIL)
43 MTREE+= BSD.sendmail.dist
46 NAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
51 ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
52 mailertable.sample aliases
54 # Special top level files for FreeBSD
58 cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
59 .if defined(OBJFORMAT)
60 echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/${DISTRIBUTION}/etc/objformat
65 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
66 ${BIN1} ${DESTDIR}/etc; \
67 cap_mkdb ${DESTDIR}/etc/login.conf; \
68 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
69 ${BIN2} ${DESTDIR}/etc; \
70 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
71 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
72 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
73 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
74 ${DEFAULTS} ${DESTDIR}/etc/defaults
75 cd ${.CURDIR}/periodic; ${MAKE} install
76 cd ${.CURDIR}/rc.d; ${MAKE} install
77 cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
78 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
79 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
81 cd ${.CURDIR}/isdn; ${MAKE} install
83 .if !defined(NO_SENDMAIL)
84 cd ${.CURDIR}/sendmail; ${MAKE} distribution
86 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
87 .if !defined(NO_OPENSSH)
88 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
89 ${SSH} ${DESTDIR}/etc/ssh
91 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
92 ${SSL} ${DESTDIR}/etc/ssl
94 .if !defined(NO_MAKEDEV)
95 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
96 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
97 .if !defined(NO_MAKEDEV_RUN)
98 cd ${DESTDIR}/dev; sh MAKEDEV all
101 cd ${.CURDIR}/root; \
102 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
103 dot.cshrc ${DESTDIR}/root/.cshrc; \
104 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
105 dot.klogin ${DESTDIR}/root/.klogin; \
106 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
107 dot.login ${DESTDIR}/root/.login; \
108 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
109 dot.profile ${DESTDIR}/root/.profile; \
110 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
111 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
112 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
113 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
114 ${MTREE} ${DESTDIR}/etc/mtree
115 cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
116 ${NAMEDB} ${DESTDIR}/etc/namedb
117 cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
118 ${PPPCNF} ${DESTDIR}/etc/ppp
119 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
120 ${ETCMAIL} ${DESTDIR}/etc/mail
121 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
122 ! -f ${DESTDIR}/etc/aliases ]; then \
124 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
126 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
127 ${DESTDIR}/etc/dumpdates
128 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
129 ${DESTDIR}/var/db/locate.database
130 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
131 ${DESTDIR}/var/log/auth.log
132 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
133 ${DESTDIR}/var/log/cron
134 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
135 ${DESTDIR}/var/log/lpd-errs
136 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
137 ${DESTDIR}/var/log/maillog
138 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
139 ${DESTDIR}/var/log/lastlog
140 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
141 ${DESTDIR}/var/log/messages
142 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
143 ${DESTDIR}/var/log/security
144 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
145 ${DESTDIR}/var/log/slip.log
146 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
147 ${DESTDIR}/var/log/ppp.log
148 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
149 ${DESTDIR}/var/log/wtmp
150 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
151 ${DESTDIR}/var/run/utmp
152 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
154 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
155 ${FREEBSD} ${DESTDIR}/
157 cd ${.CURDIR}/../share/man; ${MAKE} makedb
161 -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
162 while [ $$# -gt 0 ] ; \
164 for dir in /usr/share/locale \
166 /usr/local/share/nls; \
168 test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
169 test -L "$$2" && rm -rf "$$2"; \
170 test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
174 mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
175 mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
176 mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
177 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
178 -p ${DESTDIR}/usr/include
179 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
180 -p ${DESTDIR}/usr/libdata/perl/5.00503/mach
181 .if !defined(NO_SENDMAIL)
182 mtree -deU -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
184 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
185 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
186 cd ${DESTDIR}/usr/share/man; \
187 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
188 while [ $$# -gt 0 ] ; \
194 cd ${DESTDIR}/usr/share/locale; \
195 set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
196 while [ $$# -gt 0 ] ; \
202 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
203 cd ${DESTDIR}/usr/share/nls; \
204 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
205 while [ $$# -gt 0 ] ; \
213 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
214 ${BIN1} ${BIN2} nsmb.conf opieaccess \
215 ${DESTDIR}/usr/share/examples/etc
216 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
217 ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
219 .include <bsd.prog.mk>