Deleted Added
full compact
Makefile (289662) Makefile (290083)
1# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
1# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
2# $FreeBSD: head/etc/Makefile 289662 2015-10-20 20:35:34Z jmmv $
2# $FreeBSD: head/etc/Makefile 290083 2015-10-27 23:35:02Z bdrewery $
3
4.include <src.opts.mk>
5
6SUBDIR= \
7 newsyslog.conf.d
8
9.if ${MK_SENDMAIL} != "no"
10SUBDIR+=sendmail
11.endif
12
13BIN1= crontab \
14 devd.conf \
15 devfs.conf \
16 ddb.conf \
17 dhclient.conf \
18 disktab \
19 fbtab \
20 gettytab \
21 group \
22 hosts \
23 hosts.allow \
24 hosts.equiv \
25 libalias.conf \
26 libmap.conf \
27 login.access \
28 login.conf \
29 mac.conf \
30 motd \
31 netconfig \
32 network.subr \
33 networks \
34 newsyslog.conf \
35 nsswitch.conf \
36 phones \
37 profile \
38 protocols \
39 rc \
40 rc.bsdextended \
41 rc.firewall \
42 rc.initdiskless \
43 rc.shutdown \
44 rc.subr \
45 remote \
46 rpc \
47 services \
48 shells \
49 sysctl.conf \
50 syslog.conf \
51 termcap.small
52
53.if exists(${.CURDIR}/etc.${MACHINE}/ttys)
54BIN1+= etc.${MACHINE}/ttys
55.elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys)
56BIN1+= etc.${MACHINE_ARCH}/ttys
57.elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys)
58BIN1+= etc.${MACHINE_CPUARCH}/ttys
59.else
60.error etc.MACHINE/ttys missing
61.endif
62
63OPENBSMDIR= ${.CURDIR}/../contrib/openbsm
64BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \
65 ${OPENBSMDIR}/etc/audit_event
66BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
67 ${OPENBSMDIR}/etc/audit_user
68BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
69BSM_ETC_DIR= ${DESTDIR}/etc/security
70
71# NB: keep these sorted by MK_* knobs
72
73.if ${MK_AMD} != "no"
74BIN1+= amd.map
75.endif
76
77.if ${MK_APM} != "no"
78BIN1+= apmd.conf
79.endif
80
81.if ${MK_AUTOFS} != "no"
82BIN1+= auto_master
83.endif
84
85.if ${MK_BSNMP} != "no"
86BIN1+= snmpd.config
87.endif
88
89.if ${MK_FREEBSD_UPDATE} != "no"
90BIN1+= freebsd-update.conf
91.endif
92
93.if ${MK_FTP} != "no"
94BIN1+= ftpusers
95.endif
96
97.if ${MK_INETD} != "no"
98BIN1+= inetd.conf
99.endif
100
101.if ${MK_LOCATE} != "no"
102BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc
103.endif
104
105.if ${MK_LPR} != "no"
106BIN1+= hosts.lpd printcap
107.endif
108
109.if ${MK_MAIL} != "no"
110BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc
111.endif
112
113.if ${MK_NTP} != "no"
114BIN1+= ntp.conf
115.endif
116
117.if ${MK_OPENSSH} != "no"
118SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
119 ${.CURDIR}/../crypto/openssh/sshd_config \
120 ${.CURDIR}/../crypto/openssh/moduli
121.endif
122.if ${MK_OPENSSL} != "no"
123SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
124.endif
125
126.if ${MK_NS_CACHING} != "no"
127BIN1+= nscd.conf
128.endif
129
130.if ${MK_PORTSNAP} != "no"
131BIN1+= portsnap.conf
132.endif
133
134.if ${MK_PF} != "no"
135BIN1+= pf.os
136.endif
137
138.if ${MK_SENDMAIL} != "no"
139BIN1+= rc.sendmail
140.endif
141
142.if ${MK_TCSH} != "no"
143BIN1+= csh.cshrc csh.login csh.logout
144.endif
145
146.if ${MK_WIRELESS} != "no"
147BIN1+= regdomain.xml
148.endif
149
150# -rwxr-xr-x root:wheel, for the new cron root:wheel
151BIN2= netstart pccard_ether rc.suspend rc.resume
152
153MTREE= BSD.debug.dist BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
154.if ${MK_LIB32} != "no"
155MTREE+= BSD.lib32.dist
156.endif
157.if ${MK_TESTS} != "no"
158MTREE+= BSD.tests.dist
159.endif
160.if ${MK_SENDMAIL} != "no"
161MTREE+= BSD.sendmail.dist
162.endif
163
164PPPCNF= ppp.conf
165
166.if ${MK_SENDMAIL} == "no"
167ETCMAIL=mailer.conf aliases
168.else
169ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
170 mailertable.sample aliases
171.endif
172
173# Special top level files for FreeBSD
174FREEBSD=COPYRIGHT
175
176# Sanitize DESTDIR
177DESTDIR:= ${DESTDIR:C://*:/:g}
178
179afterinstall:
180.if ${MK_MAN} != "no"
181 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
182.endif
183
184distribute:
185 # Avoid installing tests here; "make distribution" will do this and
186 # correctly place them in the right location.
187 ${_+_}cd ${.CURDIR} ; ${MAKE} MK_TESTS=no install \
188 DESTDIR=${DISTDIR}/${DISTRIBUTION}
189 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
190
191.include <bsd.endian.mk>
192.if ${TARGET_ENDIANNESS} == "1234"
193CAP_MKDB_ENDIAN?= -l
194.elif ${TARGET_ENDIANNESS} == "4321"
195CAP_MKDB_ENDIAN?= -b
196.else
197CAP_MKDB_ENDIAN?=
198.endif
199
200.if defined(NO_ROOT)
201METALOG.add?= cat -l >> ${METALOG}
202.endif
203
204distribution:
205.if !defined(DESTDIR)
206 @echo "set DESTDIR before running \"make ${.TARGET}\""
207 @false
208.endif
209 cd ${.CURDIR}; \
210 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
211 ${BIN1} ${DESTDIR}/etc; \
212 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
213 services_mkdb ${CAP_MKDB_ENDIAN} -q -o ${DESTDIR}/var/db/services.db \
214 ${DESTDIR}/etc/services; \
215 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
216 ${BIN2} ${DESTDIR}/etc; \
217 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
218 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
219.if ${MK_AT} == "no"
220 sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab
221.endif
222.if ${MK_TCSH} == "no"
223 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
224.endif
225 pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
226.if defined(NO_ROOT)
227 ( \
228 echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \
229 echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \
230 echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \
231 echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \
232 ) | ${METALOG.add}
233.endif
234.if ${MK_AUTOFS} != "no"
235 ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install
236.endif
237.if ${MK_BLUETOOTH} != "no"
238 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
239.endif
240.if ${MK_CASPER} != "no"
241 ${_+_}cd ${.CURDIR}/casper; ${MAKE} install
242.endif
243 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
244 ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
245 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
246.if ${MK_NTP} != "no"
247 ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install
248.endif
249 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
250.if ${MK_PKGBOOTSTRAP} != "no"
251 ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
252.endif
253 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
254 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
255 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
256 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
257 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
258 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
259 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
260 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
261 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
262 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
263.if ${MK_UNBOUND} != "no"
264 if [ ! -e ${DESTDIR}/etc/unbound ]; then \
265 ${INSTALL_SYMLINK} ../var/unbound ${DESTDIR}/etc/unbound; \
266 fi
267.endif
268.if ${MK_SENDMAIL} != "no"
269 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
270.endif
271.if ${MK_OPENSSH} != "no"
272 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
273 ${SSH} ${DESTDIR}/etc/ssh
274.endif
275.if ${MK_OPENSSL} != "no"
276 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
277 ${SSL} ${DESTDIR}/etc/ssl
278.endif
279.if ${MK_KERBEROS} != "no"
280 cd ${.CURDIR}/root; \
281 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
282 dot.k5login ${DESTDIR}/root/.k5login;
283.endif
284 cd ${.CURDIR}/root; \
285 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
286 dot.profile ${DESTDIR}/root/.profile; \
287 rm -f ${DESTDIR}/.profile; \
288 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
289.if ${MK_TCSH} != "no"
290 cd ${.CURDIR}/root; \
291 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
292 dot.cshrc ${DESTDIR}/root/.cshrc; \
293 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
294 dot.login ${DESTDIR}/root/.login; \
295 rm -f ${DESTDIR}/.cshrc; \
296 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
297.endif
298 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
299 ${MTREE} ${DESTDIR}/etc/mtree
300.if ${MK_MAIL} != "no"
301 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
302 ${ETCMAIL} ${DESTDIR}/etc/mail
303 if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
304 ! -f ${DESTDIR}/etc/aliases ]; then \
305 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
306 fi
307.endif
308 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
309 ${DESTDIR}/etc/dumpdates
310.if ${MK_LOCATE} != "no"
311 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
312 ${DESTDIR}/var/db/locate.database
313.endif
314 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
315 ${DESTDIR}/var/crash
316 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
317 ${FREEBSD} ${DESTDIR}/
318.if ${MK_BOOT} != "no"
319.if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
320 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
321 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
322 ${DESTDIR}/boot/device.hints
323.endif
324.endif
325.if ${MK_NIS} == "no"
326 sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \
327 ${DESTDIR}/etc/nsswitch.conf
328.endif
329
330MTREE_CMD?= mtree
331
332.if ${MK_INSTALL_AS_USER} == "yes" && ${_uid} != 0
333MTREE_FILTER= sed -e 's,\([gu]\)name=,\1id=,g' \
334 -e 's,\(uid=\)[^ ]* ,\1${_uid} ,' \
335 -e 's,\(gid=\)[^ ]* ,\1${_gid} ,' \
336 -e 's,\(uid=\)[^ ]*$$,\1${_uid},' \
337 -e 's,\(gid=\)[^ ]*$$,\1${_gid},'
338.else
339MTREE_FILTER= cat
340.endif
341
342MTREES= mtree/BSD.root.dist / \
343 mtree/BSD.var.dist /var \
344 mtree/BSD.usr.dist /usr \
345 mtree/BSD.include.dist /usr/include \
346 mtree/BSD.debug.dist /usr/lib
347.if ${MK_GROFF} != "no"
348MTREES+= mtree/BSD.groff.dist /usr
349.endif
350.if ${MK_LIB32} != "no"
351MTREES+= mtree/BSD.lib32.dist /usr
352MTREES+= mtree/BSD.lib32.dist /usr/lib/debug/usr
353.endif
354.if ${MK_TESTS} != "no"
355MTREES+= mtree/BSD.tests.dist ${TESTSBASE}
356MTREES+= mtree/BSD.tests.dist /usr/lib/debug/${TESTSBASE}
357.endif
358.if ${MK_SENDMAIL} != "no"
359MTREES+= mtree/BSD.sendmail.dist /
360.endif
361.for mtree in ${LOCAL_MTREE}
362MTREES+= ../${mtree} /
363.endfor
364
365distrib-dirs: ${MTREES:N/*}
366 @set ${MTREES}; \
367 while test $$# -ge 2; do \
368 m=${.CURDIR}/$$1; \
369 shift; \
370 d=${DESTDIR}$$1; \
371 shift; \
372 test -d $$d || mkdir -p $$d; \
373 ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \
374 -f $$m -p $$d; \
375 ${MTREE_FILTER} $$m | \
376 ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -p $$d; \
377 done; true
378.if defined(NO_ROOT)
379 @set ${MTREES}; \
380 while test $$# -ge 2; do \
381 m=${.CURDIR}/$$1; \
382 shift; \
383 d=$$1; \
384 test "$$d" == "/" && d=""; \
385 d=${DISTBASE}$$d; \
386 shift; \
387 test -d ${DESTDIR}/$$d || mkdir -p ${DESTDIR}/$$d; \
388 ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \
389 "sed s#^\.#.$$d# | ${METALOG.add}" ; \
390 ${MTREE_FILTER} $$m | \
391 ${MTREE_CMD:N-W} -C -K uname,gname | sed s#^\.#.$$d# | \
392 ${METALOG.add} ; \
393 done; true
394.endif
395 ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
396.if ${MK_MAN} != "no"
3
4.include <src.opts.mk>
5
6SUBDIR= \
7 newsyslog.conf.d
8
9.if ${MK_SENDMAIL} != "no"
10SUBDIR+=sendmail
11.endif
12
13BIN1= crontab \
14 devd.conf \
15 devfs.conf \
16 ddb.conf \
17 dhclient.conf \
18 disktab \
19 fbtab \
20 gettytab \
21 group \
22 hosts \
23 hosts.allow \
24 hosts.equiv \
25 libalias.conf \
26 libmap.conf \
27 login.access \
28 login.conf \
29 mac.conf \
30 motd \
31 netconfig \
32 network.subr \
33 networks \
34 newsyslog.conf \
35 nsswitch.conf \
36 phones \
37 profile \
38 protocols \
39 rc \
40 rc.bsdextended \
41 rc.firewall \
42 rc.initdiskless \
43 rc.shutdown \
44 rc.subr \
45 remote \
46 rpc \
47 services \
48 shells \
49 sysctl.conf \
50 syslog.conf \
51 termcap.small
52
53.if exists(${.CURDIR}/etc.${MACHINE}/ttys)
54BIN1+= etc.${MACHINE}/ttys
55.elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys)
56BIN1+= etc.${MACHINE_ARCH}/ttys
57.elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys)
58BIN1+= etc.${MACHINE_CPUARCH}/ttys
59.else
60.error etc.MACHINE/ttys missing
61.endif
62
63OPENBSMDIR= ${.CURDIR}/../contrib/openbsm
64BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \
65 ${OPENBSMDIR}/etc/audit_event
66BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
67 ${OPENBSMDIR}/etc/audit_user
68BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
69BSM_ETC_DIR= ${DESTDIR}/etc/security
70
71# NB: keep these sorted by MK_* knobs
72
73.if ${MK_AMD} != "no"
74BIN1+= amd.map
75.endif
76
77.if ${MK_APM} != "no"
78BIN1+= apmd.conf
79.endif
80
81.if ${MK_AUTOFS} != "no"
82BIN1+= auto_master
83.endif
84
85.if ${MK_BSNMP} != "no"
86BIN1+= snmpd.config
87.endif
88
89.if ${MK_FREEBSD_UPDATE} != "no"
90BIN1+= freebsd-update.conf
91.endif
92
93.if ${MK_FTP} != "no"
94BIN1+= ftpusers
95.endif
96
97.if ${MK_INETD} != "no"
98BIN1+= inetd.conf
99.endif
100
101.if ${MK_LOCATE} != "no"
102BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc
103.endif
104
105.if ${MK_LPR} != "no"
106BIN1+= hosts.lpd printcap
107.endif
108
109.if ${MK_MAIL} != "no"
110BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc
111.endif
112
113.if ${MK_NTP} != "no"
114BIN1+= ntp.conf
115.endif
116
117.if ${MK_OPENSSH} != "no"
118SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
119 ${.CURDIR}/../crypto/openssh/sshd_config \
120 ${.CURDIR}/../crypto/openssh/moduli
121.endif
122.if ${MK_OPENSSL} != "no"
123SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
124.endif
125
126.if ${MK_NS_CACHING} != "no"
127BIN1+= nscd.conf
128.endif
129
130.if ${MK_PORTSNAP} != "no"
131BIN1+= portsnap.conf
132.endif
133
134.if ${MK_PF} != "no"
135BIN1+= pf.os
136.endif
137
138.if ${MK_SENDMAIL} != "no"
139BIN1+= rc.sendmail
140.endif
141
142.if ${MK_TCSH} != "no"
143BIN1+= csh.cshrc csh.login csh.logout
144.endif
145
146.if ${MK_WIRELESS} != "no"
147BIN1+= regdomain.xml
148.endif
149
150# -rwxr-xr-x root:wheel, for the new cron root:wheel
151BIN2= netstart pccard_ether rc.suspend rc.resume
152
153MTREE= BSD.debug.dist BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
154.if ${MK_LIB32} != "no"
155MTREE+= BSD.lib32.dist
156.endif
157.if ${MK_TESTS} != "no"
158MTREE+= BSD.tests.dist
159.endif
160.if ${MK_SENDMAIL} != "no"
161MTREE+= BSD.sendmail.dist
162.endif
163
164PPPCNF= ppp.conf
165
166.if ${MK_SENDMAIL} == "no"
167ETCMAIL=mailer.conf aliases
168.else
169ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
170 mailertable.sample aliases
171.endif
172
173# Special top level files for FreeBSD
174FREEBSD=COPYRIGHT
175
176# Sanitize DESTDIR
177DESTDIR:= ${DESTDIR:C://*:/:g}
178
179afterinstall:
180.if ${MK_MAN} != "no"
181 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb
182.endif
183
184distribute:
185 # Avoid installing tests here; "make distribution" will do this and
186 # correctly place them in the right location.
187 ${_+_}cd ${.CURDIR} ; ${MAKE} MK_TESTS=no install \
188 DESTDIR=${DISTDIR}/${DISTRIBUTION}
189 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
190
191.include <bsd.endian.mk>
192.if ${TARGET_ENDIANNESS} == "1234"
193CAP_MKDB_ENDIAN?= -l
194.elif ${TARGET_ENDIANNESS} == "4321"
195CAP_MKDB_ENDIAN?= -b
196.else
197CAP_MKDB_ENDIAN?=
198.endif
199
200.if defined(NO_ROOT)
201METALOG.add?= cat -l >> ${METALOG}
202.endif
203
204distribution:
205.if !defined(DESTDIR)
206 @echo "set DESTDIR before running \"make ${.TARGET}\""
207 @false
208.endif
209 cd ${.CURDIR}; \
210 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
211 ${BIN1} ${DESTDIR}/etc; \
212 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
213 services_mkdb ${CAP_MKDB_ENDIAN} -q -o ${DESTDIR}/var/db/services.db \
214 ${DESTDIR}/etc/services; \
215 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
216 ${BIN2} ${DESTDIR}/etc; \
217 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
218 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
219.if ${MK_AT} == "no"
220 sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab
221.endif
222.if ${MK_TCSH} == "no"
223 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
224.endif
225 pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
226.if defined(NO_ROOT)
227 ( \
228 echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \
229 echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \
230 echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \
231 echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \
232 ) | ${METALOG.add}
233.endif
234.if ${MK_AUTOFS} != "no"
235 ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install
236.endif
237.if ${MK_BLUETOOTH} != "no"
238 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
239.endif
240.if ${MK_CASPER} != "no"
241 ${_+_}cd ${.CURDIR}/casper; ${MAKE} install
242.endif
243 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
244 ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
245 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
246.if ${MK_NTP} != "no"
247 ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install
248.endif
249 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
250.if ${MK_PKGBOOTSTRAP} != "no"
251 ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
252.endif
253 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
254 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
255 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt
256 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install
257 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \
258 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
259 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
260 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
261 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
262 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
263.if ${MK_UNBOUND} != "no"
264 if [ ! -e ${DESTDIR}/etc/unbound ]; then \
265 ${INSTALL_SYMLINK} ../var/unbound ${DESTDIR}/etc/unbound; \
266 fi
267.endif
268.if ${MK_SENDMAIL} != "no"
269 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
270.endif
271.if ${MK_OPENSSH} != "no"
272 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
273 ${SSH} ${DESTDIR}/etc/ssh
274.endif
275.if ${MK_OPENSSL} != "no"
276 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
277 ${SSL} ${DESTDIR}/etc/ssl
278.endif
279.if ${MK_KERBEROS} != "no"
280 cd ${.CURDIR}/root; \
281 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
282 dot.k5login ${DESTDIR}/root/.k5login;
283.endif
284 cd ${.CURDIR}/root; \
285 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
286 dot.profile ${DESTDIR}/root/.profile; \
287 rm -f ${DESTDIR}/.profile; \
288 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
289.if ${MK_TCSH} != "no"
290 cd ${.CURDIR}/root; \
291 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
292 dot.cshrc ${DESTDIR}/root/.cshrc; \
293 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
294 dot.login ${DESTDIR}/root/.login; \
295 rm -f ${DESTDIR}/.cshrc; \
296 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
297.endif
298 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
299 ${MTREE} ${DESTDIR}/etc/mtree
300.if ${MK_MAIL} != "no"
301 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
302 ${ETCMAIL} ${DESTDIR}/etc/mail
303 if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
304 ! -f ${DESTDIR}/etc/aliases ]; then \
305 ln -s mail/aliases ${DESTDIR}/etc/aliases; \
306 fi
307.endif
308 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \
309 ${DESTDIR}/etc/dumpdates
310.if ${MK_LOCATE} != "no"
311 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
312 ${DESTDIR}/var/db/locate.database
313.endif
314 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
315 ${DESTDIR}/var/crash
316 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
317 ${FREEBSD} ${DESTDIR}/
318.if ${MK_BOOT} != "no"
319.if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints)
320 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
321 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
322 ${DESTDIR}/boot/device.hints
323.endif
324.endif
325.if ${MK_NIS} == "no"
326 sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \
327 ${DESTDIR}/etc/nsswitch.conf
328.endif
329
330MTREE_CMD?= mtree
331
332.if ${MK_INSTALL_AS_USER} == "yes" && ${_uid} != 0
333MTREE_FILTER= sed -e 's,\([gu]\)name=,\1id=,g' \
334 -e 's,\(uid=\)[^ ]* ,\1${_uid} ,' \
335 -e 's,\(gid=\)[^ ]* ,\1${_gid} ,' \
336 -e 's,\(uid=\)[^ ]*$$,\1${_uid},' \
337 -e 's,\(gid=\)[^ ]*$$,\1${_gid},'
338.else
339MTREE_FILTER= cat
340.endif
341
342MTREES= mtree/BSD.root.dist / \
343 mtree/BSD.var.dist /var \
344 mtree/BSD.usr.dist /usr \
345 mtree/BSD.include.dist /usr/include \
346 mtree/BSD.debug.dist /usr/lib
347.if ${MK_GROFF} != "no"
348MTREES+= mtree/BSD.groff.dist /usr
349.endif
350.if ${MK_LIB32} != "no"
351MTREES+= mtree/BSD.lib32.dist /usr
352MTREES+= mtree/BSD.lib32.dist /usr/lib/debug/usr
353.endif
354.if ${MK_TESTS} != "no"
355MTREES+= mtree/BSD.tests.dist ${TESTSBASE}
356MTREES+= mtree/BSD.tests.dist /usr/lib/debug/${TESTSBASE}
357.endif
358.if ${MK_SENDMAIL} != "no"
359MTREES+= mtree/BSD.sendmail.dist /
360.endif
361.for mtree in ${LOCAL_MTREE}
362MTREES+= ../${mtree} /
363.endfor
364
365distrib-dirs: ${MTREES:N/*}
366 @set ${MTREES}; \
367 while test $$# -ge 2; do \
368 m=${.CURDIR}/$$1; \
369 shift; \
370 d=${DESTDIR}$$1; \
371 shift; \
372 test -d $$d || mkdir -p $$d; \
373 ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \
374 -f $$m -p $$d; \
375 ${MTREE_FILTER} $$m | \
376 ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -p $$d; \
377 done; true
378.if defined(NO_ROOT)
379 @set ${MTREES}; \
380 while test $$# -ge 2; do \
381 m=${.CURDIR}/$$1; \
382 shift; \
383 d=$$1; \
384 test "$$d" == "/" && d=""; \
385 d=${DISTBASE}$$d; \
386 shift; \
387 test -d ${DESTDIR}/$$d || mkdir -p ${DESTDIR}/$$d; \
388 ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \
389 "sed s#^\.#.$$d# | ${METALOG.add}" ; \
390 ${MTREE_FILTER} $$m | \
391 ${MTREE_CMD:N-W} -C -K uname,gname | sed s#^\.#.$$d# | \
392 ${METALOG.add} ; \
393 done; true
394.endif
395 ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
396.if ${MK_MAN} != "no"
397 cd ${DESTDIR}/usr/share/man; \
397 cd ${DESTDIR}${SHAREDIR}/man; \
398 for mandir in man*; do \
399 ${INSTALL_SYMLINK} ../$$mandir \
398 for mandir in man*; do \
399 ${INSTALL_SYMLINK} ../$$mandir \
400 ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
400 ${DESTDIR}${SHAREDIR}/man/en.ISO8859-1/; \
401 ${INSTALL_SYMLINK} ../$$mandir \
401 ${INSTALL_SYMLINK} ../$$mandir \
402 ${DESTDIR}/usr/share/man/en.UTF-8/; \
402 ${DESTDIR}${SHAREDIR}/man/en.UTF-8/; \
403 done
404.if ${MK_OPENSSL} != "no"
403 done
404.if ${MK_OPENSSL} != "no"
405 cd ${DESTDIR}/usr/share/openssl/man; \
405 cd ${DESTDIR}${SHAREDIR}/openssl/man; \
406 for mandir in man*; do \
407 ${INSTALL_SYMLINK} ../$$mandir \
406 for mandir in man*; do \
407 ${INSTALL_SYMLINK} ../$$mandir \
408 ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \
408 ${DESTDIR}${SHAREDIR}/openssl/man/en.ISO8859-1/; \
409 done
410.endif
411 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
412 while [ $$# -gt 0 ] ; do \
409 done
410.endif
411 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
412 while [ $$# -gt 0 ] ; do \
413 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \
413 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/man/$$1"; \
414 if [ "${MK_OPENSSL}" != "no" ]; then \
415 ${INSTALL_SYMLINK} "$$2" \
414 if [ "${MK_OPENSSL}" != "no" ]; then \
415 ${INSTALL_SYMLINK} "$$2" \
416 "${DESTDIR}/usr/share/openssl/man/$$1"; \
416 "${DESTDIR}${SHAREDIR}/openssl/man/$$1"; \
417 fi; \
418 shift; shift; \
419 done
420.endif
421.if ${MK_NLS} != "no"
422 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
423 while [ $$# -gt 0 ] ; do \
417 fi; \
418 shift; shift; \
419 done
420.endif
421.if ${MK_NLS} != "no"
422 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
423 while [ $$# -gt 0 ] ; do \
424 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
424 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/nls/$$1"; \
425 shift; shift; \
426 done
427.endif
428
429etc-examples:
430 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
431 ${BIN1} ${BIN2} nsmb.conf opieaccess \
425 shift; shift; \
426 done
427.endif
428
429etc-examples:
430 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
431 ${BIN1} ${BIN2} nsmb.conf opieaccess \
432 ${DESTDIR}/usr/share/examples/etc
432 ${DESTDIR}${SHAREDIR}/examples/etc
433 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
433 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \
434 DESTDIR=${DESTDIR}/usr/share/examples
434 DESTDIR=${DESTDIR}${SHAREDIR}/examples
435
436.include <bsd.prog.mk>
435
436.include <bsd.prog.mk>