2012-05-01 16:32:15 +02:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
ETC=${DESTDIR}/etc/
|
|
|
|
USR=${DESTDIR}/usr/
|
|
|
|
USRETC=${DESTDIR}/usr/etc/
|
|
|
|
DEFAULTS=${ETC}/defaults
|
2012-06-05 12:49:50 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# FILES1 are installed in /etc *before* the tree hierarchy is created
|
|
|
|
# and can therefore not rely on /etc/groups and /etc/passwd being
|
|
|
|
# present.
|
2012-05-01 16:32:15 +02:00
|
|
|
|
2011-09-30 12:18:10 +02:00
|
|
|
FILES1=group hostname.file inet.conf motd.install mtab profile \
|
2012-03-16 16:03:49 +01:00
|
|
|
protocols rc services termcap utmp rc.cd \
|
2011-11-25 18:27:22 +01:00
|
|
|
syslog.conf rc.daemons.dist \
|
2011-09-01 16:41:57 +02:00
|
|
|
rs.inet rs.single make.conf system.conf ttys resolv.conf rc.conf \
|
2012-06-05 12:49:50 +02:00
|
|
|
rc.subr rc.subr.minix man.conf shells boot.cfg.default \
|
|
|
|
devmand/scripts/block devmand/scripts/singlechar
|
2011-06-07 17:23:23 +02:00
|
|
|
|
2012-06-05 12:49:50 +02:00
|
|
|
#
|
|
|
|
# PWFILES are installed in /etc with the 600 permission
|
|
|
|
#
|
2011-09-30 12:18:10 +02:00
|
|
|
PWFILES=master.passwd
|
2012-06-05 12:49:50 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# FILES3 are installed in /usr/etc 755
|
|
|
|
#
|
2010-07-21 00:20:43 +02:00
|
|
|
FILES3=daily dhcptags.conf rc
|
2012-02-13 09:08:25 +01:00
|
|
|
DEFAULTFILES=rc.conf minix.rc.conf
|
2010-07-21 00:20:43 +02:00
|
|
|
USRFILES=Makefile
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2012-05-01 16:32:15 +02:00
|
|
|
TOOL_PWD_MKDB?= pwd_mkdb
|
2011-09-30 12:18:10 +02:00
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
clean::
|
|
|
|
|
2012-05-01 16:32:15 +02:00
|
|
|
install: installpw # installpw needed to bootstrap pw db
|
2011-07-01 15:57:43 +02:00
|
|
|
@echo "Installing /etc, /usr/etc and /usr/lib.."
|
2012-05-07 16:28:01 +02:00
|
|
|
${INSTALL_DIR} $(ETC)
|
|
|
|
${INSTALL_DIR} $(ETC)/devmand/scripts
|
2012-05-01 16:32:15 +02:00
|
|
|
@echo "Making hierarchy.."
|
2012-05-07 16:22:27 +02:00
|
|
|
sh mtree.sh mtree/minix.tree ${TOOL_AWK} ${TOOL_STAT} ${MKUNPRIVED} ${DESTDIR}; # DESTDIR must be last; special case!
|
2005-05-03 17:41:02 +02:00
|
|
|
@for f in $(FILES1); do if [ -f $(ETC)/$$f ]; then :; else cp $$f $(ETC)/$$f; chmod 755 $(ETC)/$$f; fi; done
|
2010-07-21 00:20:43 +02:00
|
|
|
@for f in $(USRFILES); do cp usr/$$f $(USR)/$$f; chmod 644 $(USR)/$$f; done
|
2005-05-03 17:41:02 +02:00
|
|
|
@for f in $(FILES3); do if [ -f $(USRETC)/$$f ]; then :; else cp usr/$$f $(USRETC); chmod 755 $(USRETC)/$$f; fi; done
|
2011-11-23 16:01:00 +01:00
|
|
|
for f in $(DEFAULTFILES); do cp defaults/$$f $(DEFAULTS)/; chmod 644 $(DEFAULTS)/$$f; done
|
2005-05-03 17:41:02 +02:00
|
|
|
@echo "Making devices.."
|
2012-05-01 16:32:15 +02:00
|
|
|
if [ ${MKUNPRIVED} != yes ] ;then \
|
|
|
|
cd ${DESTDIR}/dev && sh ${NETBSDSRCDIR}/commands/MAKEDEV/MAKEDEV.sh null ;\
|
|
|
|
cd ${DESTDIR}/dev && sh ${NETBSDSRCDIR}/commands/MAKEDEV/MAKEDEV.sh std 2>/dev/null ;\
|
|
|
|
fi
|
|
|
|
${INSTALL_FILE} -o root -g operator -m 755 crontab ${DESTDIR}/usr/lib
|
2005-05-03 17:41:02 +02:00
|
|
|
@echo "Making user homedirs.."
|
2012-05-07 16:28:01 +02:00
|
|
|
for u in ${DESTDIR}/usr/ast ${DESTDIR}/root; do ${INSTALL_DIR} $$u; cp ast/.[aepv]* $$u ; done
|
2007-05-16 15:00:43 +02:00
|
|
|
@echo "Installing fonts.."
|
2012-05-01 16:32:15 +02:00
|
|
|
${INSTALL_FILE} -m 644 -o root -g operator fonts/*.fnt ${DESTDIR}/usr/lib/fonts/
|
2011-09-30 12:18:10 +02:00
|
|
|
|
2011-12-22 01:29:27 +01:00
|
|
|
installforce:: $(ETC)/rc $(ETC)/rs.inet $(ETC)/rs.single $(ETC)/system.conf $(ETC)/rc.subr.minix $(USRETC)/rc $(USR)/Makefile installpw
|
2011-09-30 12:18:10 +02:00
|
|
|
|
|
|
|
installpw::
|
2012-05-07 16:28:01 +02:00
|
|
|
if [ ! -d $(ETC) ]; then ${INSTALL_DIR} $(ETC); chmod 755 $(ETC); fi
|
2011-09-30 12:18:10 +02:00
|
|
|
@for f in $(PWFILES); do if [ -f $(ETC)/$$f ]; then :; else cp $$f $(ETC)/$$f; chmod 600 $(ETC)/$$f; fi; done
|
2012-05-01 16:32:15 +02:00
|
|
|
touch ${ETC}/pwd.db; touch ${ETC}/spwd.db; ${TOOL_PWD_MKDB} -d ${ETC}/.. -p -V 0 ${ETC}/master.passwd
|
2010-08-27 12:09:06 +02:00
|
|
|
|
2011-11-25 18:27:22 +01:00
|
|
|
$(ETC)/rc: rc .PHONY
|
2012-05-01 16:32:15 +02:00
|
|
|
${INSTALL_FILE} -m 755 -o root -g operator $> $@
|
2010-08-27 12:09:06 +02:00
|
|
|
|
2011-11-25 18:27:22 +01:00
|
|
|
$(ETC)/rs.inet: rs.inet .PHONY
|
2012-05-01 16:32:15 +02:00
|
|
|
${INSTALL_FILE} -m 755 -o root -g operator $> $@
|
2010-08-27 12:09:06 +02:00
|
|
|
|
2011-11-25 18:27:22 +01:00
|
|
|
$(ETC)/rs.single: rs.single .PHONY
|
2012-05-01 16:32:15 +02:00
|
|
|
${INSTALL_FILE} -m 755 -o root -g operator $> $@
|
2010-08-27 12:09:06 +02:00
|
|
|
|
2011-11-25 18:27:22 +01:00
|
|
|
$(ETC)/system.conf: system.conf .PHONY
|
2012-05-01 16:32:15 +02:00
|
|
|
${INSTALL_FILE} -m 644 -o root -g operator $> $@
|
2010-08-27 12:09:06 +02:00
|
|
|
|
2011-12-22 01:29:27 +01:00
|
|
|
$(ETC)/rc.subr.minix: rc.subr.minix .PHONY
|
2012-05-01 16:32:15 +02:00
|
|
|
${INSTALL_FILE} -m 644 -o root -g operator $> $@
|
2011-12-22 01:29:27 +01:00
|
|
|
|
2011-11-25 18:27:22 +01:00
|
|
|
$(USRETC)/rc: usr/rc .PHONY
|
2012-05-01 16:32:15 +02:00
|
|
|
${INSTALL_FILE} -m 755 -o root -g operator $> $@
|
2010-08-27 12:09:06 +02:00
|
|
|
|
2011-11-25 18:27:22 +01:00
|
|
|
$(USR)/Makefile: usr/Makefile .PHONY
|
2012-05-01 16:32:15 +02:00
|
|
|
${INSTALL_FILE} -m 644 -o root -g operator $> $@
|