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.2 2003/06/17 04:24:45 dillon 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 newsyslog.conf \
15 pam.conf phones printcap profile protocols \
16 rc rc.atm rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \
17 rc.network rc.network6 rc.pccard rc.sendmail rc.serial rc.shutdown \
18 rc.syscons rc.sysctl remote rpc services \
19 shells sysctl.conf syslog.conf usbd.conf \
20 etc.${MACHINE_ARCH}/disktab \
21 etc.${MACHINE_ARCH}/rc.${MACHINE_ARCH} \
22 etc.${MACHINE_ARCH}/ttys \
23 ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
24 ${.CURDIR}/../usr.bin/mail/misc/mail.rc \
25 ${.CURDIR}/../usr.bin/locate/locate/locate.rc
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= netstart 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 ${BIN1} ${DESTDIR}/etc; \
72 cap_mkdb ${DESTDIR}/etc/login.conf; \
73 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
74 ${BIN2} ${DESTDIR}/etc; \
75 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
76 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
77 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
78 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
79 ${DEFAULTS} ${DESTDIR}/etc/defaults
80 cd ${.CURDIR}/periodic; ${MAKE} install
81 cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
82 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
83 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
85 cd ${.CURDIR}/isdn; ${MAKE} install
87 .if !defined(NO_SENDMAIL)
88 cd ${.CURDIR}/sendmail; ${MAKE} distribution
91 cd ${.CURDIR}/../gnu/libexec/uucp/sample; ${MAKE} install
93 .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL)
94 .if !defined(NO_OPENSSH)
95 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
96 ${SSH} ${DESTDIR}/etc/ssh
98 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
99 ${SSL} ${DESTDIR}/etc/ssl
101 .if !defined(NO_MAKEDEV)
102 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
103 MAKEDEV.local MAKEDEV ${DESTDIR}/dev
104 .if !defined(NO_MAKEDEV_RUN)
105 cd ${DESTDIR}/dev; sh MAKEDEV all
108 cd ${.CURDIR}/root; \
109 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
110 dot.cshrc ${DESTDIR}/root/.cshrc; \
111 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
112 dot.klogin ${DESTDIR}/root/.klogin; \
113 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
114 dot.login ${DESTDIR}/root/.login; \
115 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
116 dot.profile ${DESTDIR}/root/.profile; \
117 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
118 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
119 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
120 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
121 ${MTREE} ${DESTDIR}/etc/mtree
122 cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
123 ${NAMEDB} ${DESTDIR}/etc/namedb
124 cd ${.CURDIR}/ppp; ${INSTALL} -o root -g ${BINGRP} -m 600 \
125 ${PPPCNF} ${DESTDIR}/etc/ppp
126 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
127 ${ETCMAIL} ${DESTDIR}/etc/mail
128 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
129 ! -f ${DESTDIR}/etc/aliases ]; then \
131 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
133 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
134 ${DESTDIR}/etc/dumpdates
135 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
136 ${DESTDIR}/var/db/locate.database
137 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
138 ${DESTDIR}/var/log/auth.log
139 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
140 ${DESTDIR}/var/log/cron
141 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
142 ${DESTDIR}/var/log/lpd-errs
143 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
144 ${DESTDIR}/var/log/maillog
145 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
146 ${DESTDIR}/var/log/lastlog
147 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
148 ${DESTDIR}/var/log/messages
149 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
150 ${DESTDIR}/var/log/security
151 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
152 ${DESTDIR}/var/log/slip.log
153 ${INSTALL} -o ${BINOWN} -g network -m 640 /dev/null \
154 ${DESTDIR}/var/log/ppp.log
155 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
156 ${DESTDIR}/var/log/wtmp
157 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
158 ${DESTDIR}/var/run/utmp
159 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
161 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
162 ${FREEBSD} ${DESTDIR}/
164 cd ${.CURDIR}/../share/man; ${MAKE} makedb
168 -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
169 while [ $$# -gt 0 ] ; \
171 for dir in /usr/share/locale \
173 /usr/local/share/nls; \
175 test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
176 test -L "$$2" && rm -rf "$$2"; \
177 test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
181 mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
182 mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
183 mtree -deU -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
184 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
185 -p ${DESTDIR}/usr/include
186 mtree -deU -f ${.CURDIR}/mtree/BSD.include.dist \
187 -p ${DESTDIR}/usr/libdata/perl/5.00503/mach
188 .if !defined(NO_SENDMAIL)
189 mtree -deU -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
191 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
192 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
193 cd ${DESTDIR}/usr/share/man; \
194 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
195 while [ $$# -gt 0 ] ; \
201 cd ${DESTDIR}/usr/share/locale; \
202 set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \
203 while [ $$# -gt 0 ] ; \
209 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
210 cd ${DESTDIR}/usr/share/nls; \
211 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
212 while [ $$# -gt 0 ] ; \
220 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
221 ${BIN1} ${BIN2} nsmb.conf opieaccess \
222 ${DESTDIR}/usr/share/examples/etc
223 cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
224 ${DEFAULTS} ${DESTDIR}/usr/share/examples/etc/defaults
226 .include <bsd.prog.mk>