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