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 $ 4 5.if !defined(NO_SENDMAIL) 6SUBDIR= sendmail 7.endif 8 9BIN1= 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 26 27.if !defined(NO_I4B) 28BIN1+= rc.isdn 29.endif 30 31.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL) 32.if !defined(NO_OPENSSH) 33SSH= ${.CURDIR}/../crypto/openssh/ssh_config \ 34 ${.CURDIR}/../crypto/openssh/sshd_config \ 35 moduli 36.endif 37SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf 38.endif 39 40# -rwxr-xr-x root:wheel, for the new cron root:wheel 41BIN2= netstart pccard_ether rc.suspend rc.resume 42 43DEFAULTS= rc.conf make.conf pccard.conf periodic.conf 44 45MTREE= 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) 48MTREE+= BSD.sendmail.dist 49.endif 50 51NAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \ 52 make-localhost 53 54PPPCNF= ppp.conf 55 56ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ 57 mailertable.sample aliases 58 59# Special top level files for FreeBSD 60FREEBSD=COPYRIGHT 61 62distribute: 63 cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} 64.if defined(OBJFORMAT) 65 echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/${DISTRIBUTION}/etc/objformat 66.endif 67 68distribution: 69 cd ${.CURDIR}; \ 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 84.if !defined(NO_I4B) 85 cd ${.CURDIR}/isdn; ${MAKE} install 86.endif 87.if !defined(NO_SENDMAIL) 88 cd ${.CURDIR}/sendmail; ${MAKE} distribution 89.endif 90.if !defined(NOUUCP) 91 cd ${.CURDIR}/../gnu/libexec/uucp/sample; ${MAKE} install 92.endif 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 97.endif 98 cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ 99 ${SSL} ${DESTDIR}/etc/ssl 100.endif 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 106.endif 107.endif 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 \ 130 set -x; \ 131 ln -s mail/aliases ${DESTDIR}/etc/aliases; \ 132 fi 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 \ 160 ${DESTDIR}/var/crash 161 cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ 162 ${FREEBSD} ${DESTDIR}/ 163.if !defined(NOMAN) 164 cd ${.CURDIR}/../share/man; ${MAKE} makedb 165.endif 166 167distrib-dirs: 168 -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \ 169 while [ $$# -gt 0 ] ; \ 170 do \ 171 for dir in /usr/share/locale \ 172 /usr/share/nls \ 173 /usr/local/share/nls; \ 174 do \ 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"; \ 178 done; \ 179 shift; shift; \ 180 done 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}/ 190.endif 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 ] ; \ 196 do \ 197 rm -rf "$$1"; \ 198 ln -s "$$2" "$$1"; \ 199 shift; shift; \ 200 done 201 cd ${DESTDIR}/usr/share/locale; \ 202 set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.alias`; \ 203 while [ $$# -gt 0 ] ; \ 204 do \ 205 rm -rf "$$1"; \ 206 ln -s "$$2" "$$1"; \ 207 shift; shift; \ 208 done 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 ] ; \ 213 do \ 214 rm -rf "$$1"; \ 215 ln -s "$$2" "$$1"; \ 216 shift; shift; \ 217 done 218 219etc-examples: 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 225 226.include <bsd.prog.mk> 227