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.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+= cached.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 67.if ${MK_BIND_ETC} != "no" 68NAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \ 69 make-localhost 70.endif 71 72PPPCNF= ppp.conf 73 74.if ${MK_SENDMAIL} == "no" 75ETCMAIL=mailer.conf aliases 76.else 77ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ 78 mailertable.sample aliases 79.endif 80 81# Special top level files for FreeBSD 82FREEBSD=COPYRIGHT 83 84afterinstall: 85.if ${MK_MAN} != "no" 86 cd ${.CURDIR}/../share/man; ${MAKE} makedb 87.endif 88 89distribute: 90 cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} 91 cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} 92 93.include <bsd.endian.mk> 94.if ${TARGET_ENDIANNESS} == "1234" 95CAP_MKDB_ENDIAN?= -l 96PWD_MKDB_ENDIAN?= -L 97.elif ${TARGET_ENDIANNESS} == "4321" 98CAP_MKDB_ENDIAN?= -b 99PWD_MKDB_ENDIAN?= -B 100.else 101CAP_MKDB_ENDIAN?= 102PWD_MKDB_ENDIAN?= 103.endif 104 105distribution: 106.if !defined(DESTDIR) 107 @echo "set DESTDIR before running \"make ${.TARGET}\"" 108 @false 109.endif 110 cd ${.CURDIR}; \ 111 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 112 ${BIN1} ${DESTDIR}/etc; \ 113 cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ 114 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ 115 ${BIN2} ${DESTDIR}/etc; \ 116 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 117 master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \ 118 pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ 119 ${DESTDIR}/etc/master.passwd 120 cd ${.CURDIR}/bluetooth; ${MAKE} install 121 cd ${.CURDIR}/defaults; ${MAKE} install 122 cd ${.CURDIR}/gss; ${MAKE} install 123 cd ${.CURDIR}/periodic; ${MAKE} install 124 cd ${.CURDIR}/rc.d; ${MAKE} install 125 cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall 126 cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap 127 cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt 128 cd ${.CURDIR}/pam.d; ${MAKE} install 129 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ 130 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} 131 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ 132 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} 133 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ 134 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} 135.if ${MK_I4B} != "no" 136 cd ${.CURDIR}/isdn; ${MAKE} install 137.endif 138.if ${MK_SENDMAIL} != "no" 139 cd ${.CURDIR}/sendmail; ${MAKE} distribution 140.endif 141.if ${MK_OPENSSH} != "no" 142 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 143 ${SSH} ${DESTDIR}/etc/ssh 144.endif 145.if ${MK_OPENSSL} != "no" 146 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 147 ${SSL} ${DESTDIR}/etc/ssl 148.endif 149.if ${MK_KERBEROS} != "no" 150 cd ${.CURDIR}/root; \ 151 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 152 dot.k5login ${DESTDIR}/root/.k5login; 153.endif 154 cd ${.CURDIR}/root; \ 155 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 156 dot.cshrc ${DESTDIR}/root/.cshrc; \ 157 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 158 dot.login ${DESTDIR}/root/.login; \ 159 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 160 dot.profile ${DESTDIR}/root/.profile; \ 161 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 162 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 163 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile 164 cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 165 ${MTREE} ${DESTDIR}/etc/mtree 166.if ${MK_BIND_ETC} != "no" 167 cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 168 ${NAMEDB} ${DESTDIR}/var/named/etc/namedb 169.endif 170.if ${MK_BIND_MTREE} != "no" 171 @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ 172 set -x; \ 173 ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ 174 fi 175.endif 176 cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ 177 ${PPPCNF} ${DESTDIR}/etc/ppp 178 cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 179 ${ETCMAIL} ${DESTDIR}/etc/mail 180 @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ 181 ! -f ${DESTDIR}/etc/aliases ]; then \ 182 set -x; \ 183 ln -s mail/aliases ${DESTDIR}/etc/aliases; \ 184 fi 185 ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ 186 ${DESTDIR}/etc/dumpdates 187 ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ 188 ${DESTDIR}/var/db/locate.database 189 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ 190 ${DESTDIR}/var/crash 191 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 192 ${FREEBSD} ${DESTDIR}/ 193 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 194 ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ 195 ${DESTDIR}/boot/device.hints 196 197distrib-dirs: 198 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ 199 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var 200 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr 201 mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ 202 -p ${DESTDIR}/usr/include 203.if ${MK_BIND_LIBS} != "no" 204 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ 205 -p ${DESTDIR}/usr/include 206.endif 207.if ${MK_BIND_MTREE} != "no" 208 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ 209 -p ${DESTDIR}/var/named 210.endif 211.if ${MK_SENDMAIL} != "no" 212 mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ 213.endif 214 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys 215 cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . 216 cd ${DESTDIR}/usr/share/man; \ 217 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 218 while [ $$# -gt 0 ] ; \ 219 do \ 220 rm -rf "$$1"; \ 221 ln -s "$$2" "$$1"; \ 222 shift; shift; \ 223 done 224 cd ${DESTDIR}/usr/share/openssl/man; \ 225 set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ 226 while [ $$# -gt 0 ] ; \ 227 do \ 228 rm -rf "$$1"; \ 229 ln -s "$$2" "$$1"; \ 230 shift; shift; \ 231 done 232 cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* . 233 cd ${DESTDIR}/usr/share/nls; \ 234 set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ 235 while [ $$# -gt 0 ] ; \ 236 do \ 237 rm -rf "$$1"; \ 238 ln -s "$$2" "$$1"; \ 239 shift; shift; \ 240 done 241 242etc-examples: 243 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 244 ${BIN1} ${BIN2} nsmb.conf opieaccess \ 245 ${DESTDIR}/usr/share/examples/etc 246 cd ${.CURDIR}/defaults; ${MAKE} install \ 247 DESTDIR=${DESTDIR}/usr/share/examples 248 249.include <bsd.prog.mk> 250