1# from: @(#)Makefile 5.11 (Berkeley) 5/21/91 2# $FreeBSD$ 3 4.include <bsd.own.mk> 5 6.if ${MK_SENDMAIL} != "no" 7SUBDIR= sendmail 8.endif 9 10BIN1= auth.conf \ 11 crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \ 12 ddb.conf dhclient.conf disktab fbtab \ 13 ftpusers gettytab group \ 14 hosts hosts.allow hosts.equiv \ 15 inetd.conf libalias.conf login.access login.conf mac.conf motd \ 16 netconfig network.subr networks newsyslog.conf nsswitch.conf \ 17 phones profile protocols \ 18 rc rc.bsdextended rc.firewall rc.firewall6 rc.initdiskless \ 19 rc.sendmail rc.shutdown \ 20 rc.subr remote rpc services shells \ 21 sysctl.conf syslog.conf \ 22 etc.${MACHINE_ARCH}/ttys 23 24OPENBSMDIR= ${.CURDIR}/../contrib/openbsm 25BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \ 26 ${OPENBSMDIR}/etc/audit_event 27BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ 28 ${OPENBSMDIR}/etc/audit_user 29BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn 30BSM_ETC_DIR= ${DESTDIR}/etc/security 31 32# NB: keep these sorted by MK_* knobs 33 34.if ${MK_AMD} != "no" 35BIN1+= amd.map 36.endif 37 38.if ${MK_APM} != "no" 39BIN1+= apmd.conf 40.endif 41 42.if ${MK_BSNMP} != "no" 43BIN1+= snmpd.config 44.endif 45 46.if ${MK_FREEBSD_UPDATE} != "no" 47BIN1+= freebsd-update.conf 48.endif 49 50.if ${MK_LOCATE} != "no" 51BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc 52.endif 53 54.if ${MK_LPR} != "no" 55BIN1+= hosts.lpd printcap 56.endif 57 58.if ${MK_MAIL} != "no" 59BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc 60.endif 61 62.if ${MK_MAN} != "no" 63BIN1+= ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config 64.endif 65 66.if ${MK_OPENSSH} != "no" 67SSH= ${.CURDIR}/../crypto/openssh/ssh_config \ 68 ${.CURDIR}/../crypto/openssh/sshd_config \ 69 ${.CURDIR}/../crypto/openssh/moduli 70.endif 71.if ${MK_OPENSSL} != "no" 72SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf 73.endif 74 75.if ${MK_NS_CACHING} != "no" 76BIN1+= nscd.conf 77.endif 78 79.if ${MK_PORTSNAP} != "no" 80BIN1+= portsnap.conf 81.endif 82 83.if ${MK_PF} != "no" 84BIN1+= pf.os 85.endif 86 87.if ${MK_WIRELESS} != "no" 88BIN1+= regdomain.xml 89.endif 90 91# -rwxr-xr-x root:wheel, for the new cron root:wheel 92BIN2= netstart pccard_ether rc.suspend rc.resume 93 94MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \ 95 BSD.var.dist BSD.x11.dist BSD.x11-4.dist 96.if ${MK_SENDMAIL} != "no" 97MTREE+= BSD.sendmail.dist 98.endif 99.if ${MK_BIND} != "no" 100MTREE+= BIND.chroot.dist 101.if ${MK_BIND_LIBS} != "no" 102MTREE+= BIND.include.dist 103.endif 104.endif 105 106PPPCNF= ppp.conf 107 108.if ${MK_SENDMAIL} == "no" 109ETCMAIL=mailer.conf aliases 110.else 111ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ 112 mailertable.sample aliases 113.endif 114 115# Special top level files for FreeBSD 116FREEBSD=COPYRIGHT 117 118afterinstall: 119.if ${MK_MAN} != "no" 120 ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb 121.endif 122 123distribute: 124 ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} 125 ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} 126 127.include <bsd.endian.mk> 128.if ${TARGET_ENDIANNESS} == "1234" 129CAP_MKDB_ENDIAN?= -l 130PWD_MKDB_ENDIAN?= -L 131.elif ${TARGET_ENDIANNESS} == "4321" 132CAP_MKDB_ENDIAN?= -b 133PWD_MKDB_ENDIAN?= -B 134.else 135CAP_MKDB_ENDIAN?= 136PWD_MKDB_ENDIAN?= 137.endif 138 139distribution: 140.if !defined(DESTDIR) 141 @echo "set DESTDIR before running \"make ${.TARGET}\"" 142 @false 143.endif 144 cd ${.CURDIR}; \ 145 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 146 ${BIN1} ${DESTDIR}/etc; \ 147 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ 148 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ 149 ${BIN2} ${DESTDIR}/etc; \ 150 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 151 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \ 152 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ 153 ${DESTDIR}/etc/master.passwd 154.if ${MK_BLUETOOTH} != "no" 155 ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install 156.endif 157 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install 158 ${_+_}cd ${.CURDIR}/gss; ${MAKE} install 159 ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install 160 ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install 161 ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall 162 ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap 163 ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt 164 ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install 165 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ 166 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} 167 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ 168 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} 169 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ 170 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} 171.if ${MK_BIND_MTREE} != "no" 172 @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ 173 set -x; \ 174 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ 175 fi 176.endif 177.if ${MK_BIND_ETC} != "no" 178 ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install 179.endif 180.if ${MK_SENDMAIL} != "no" 181 ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution 182.endif 183.if ${MK_OPENSSH} != "no" 184 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 185 ${SSH} ${DESTDIR}/etc/ssh 186.endif 187.if ${MK_OPENSSL} != "no" 188 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 189 ${SSL} ${DESTDIR}/etc/ssl 190.endif 191.if ${MK_KERBEROS} != "no" 192 cd ${.CURDIR}/root; \ 193 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 194 dot.k5login ${DESTDIR}/root/.k5login; 195.endif 196 cd ${.CURDIR}/root; \ 197 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 198 dot.cshrc ${DESTDIR}/root/.cshrc; \ 199 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 200 dot.login ${DESTDIR}/root/.login; \ 201 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 202 dot.profile ${DESTDIR}/root/.profile; \ 203 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 204 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 205 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile 206 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 207 ${MTREE} ${DESTDIR}/etc/mtree 208.if ${MK_PPP} != "no" 209 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 210 ${PPPCNF} ${DESTDIR}/etc/ppp 211.endif 212.if ${MK_MAIL} != "no" 213 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 214 ${ETCMAIL} ${DESTDIR}/etc/mail 215 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ 216 ! -f ${DESTDIR}/etc/aliases ]; then \ 217 set -x; \ 218 ln -s mail/aliases ${DESTDIR}/etc/aliases; \ 219 fi 220.endif 221 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ 222 ${DESTDIR}/etc/dumpdates 223 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ 224 ${DESTDIR}/var/db/locate.database 225 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ 226 ${DESTDIR}/var/crash 227 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 228 ${FREEBSD} ${DESTDIR}/ 229.if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints) 230 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 231 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ 232 ${DESTDIR}/boot/device.hints 233.endif 234 235distrib-dirs: 236 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ 237 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var 238 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr 239 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ 240 -p ${DESTDIR}/usr/include 241.if ${MK_BIND_LIBS} != "no" 242 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ 243 -p ${DESTDIR}/usr/include 244.endif 245.if ${MK_BIND_MTREE} != "no" 246 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ 247 -p ${DESTDIR}/var/named 248.endif 249.if ${MK_SENDMAIL} != "no" 250 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ 251.endif 252 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys 253 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . 254 cd ${DESTDIR}/usr/share/man; \ 255 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 256 while [ $$# -gt 0 ] ; \ 257 do \ 258 rm -rf "$$1"; \ 259 ln -s "$$2" "$$1"; \ 260 shift; shift; \ 261 done 262 cd ${DESTDIR}/usr/share/openssl/man; \ 263 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 264 while [ $$# -gt 0 ] ; \ 265 do \ 266 rm -rf "$$1"; \ 267 ln -s "$$2" "$$1"; \ 268 shift; shift; \ 269 done 270 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* . 271 cd ${DESTDIR}/usr/share/nls; \ 272 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ 273 while [ $$# -gt 0 ] ; \ 274 do \ 275 rm -rf "$$1"; \ 276 ln -s "$$2" "$$1"; \ 277 shift; shift; \ 278 done 279 280etc-examples: 281 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 282 ${BIN1} ${BIN2} nsmb.conf opieaccess \ 283 ${DESTDIR}/usr/share/examples/etc 284 ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \ 285 DESTDIR=${DESTDIR}/usr/share/examples 286 287.include <bsd.prog.mk> 288