minix/etc/Makefile

65 lines
2.4 KiB
Makefile
Raw Normal View History

ETC=/etc/
2010-07-21 00:20:43 +02:00
USR=/usr/
USRETC=/usr/etc/
DEFAULTS=/etc/defaults
FILES1=group hostname.file inet.conf motd.install mtab profile \
protocols rc services termcap ttytab utmp rc.cd \
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 \
rc.subr rc.subr.minix man.conf shells boot.cfg.default
PWFILES=master.passwd
2010-07-21 00:20:43 +02:00
FILES3=daily dhcptags.conf rc
DEFAULTFILES=rc.conf minix.rc.conf
2010-07-21 00:20:43 +02:00
USRFILES=Makefile
2005-04-21 16:53:53 +02:00
TOOL_PWD_MKDB= pwd_mkdb
2005-04-21 16:53:53 +02:00
clean::
install:: installpw # installpw needed to bootstrap pw db
@echo "Installing /etc, /usr/etc and /usr/lib.."
mkdir -p $(ETC) $(USRLIB)
@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-04-21 16:53:53 +02:00
@echo "Making hierarchy.."
sh mtree.sh mtree/minix.tree
@for f in $(FILES3); do if [ -f $(USRETC)/$$f ]; then :; else cp usr/$$f $(USRETC); chmod 755 $(USRETC)/$$f; fi; done
for f in $(DEFAULTFILES); do cp defaults/$$f $(DEFAULTS)/; chmod 644 $(DEFAULTS)/$$f; done
@echo "Making devices.."
p=`pwd` && cd /dev && sh $$p/../commands/MAKEDEV/MAKEDEV.sh null
p=`pwd` && cd /dev && sh $$p/../commands/MAKEDEV/MAKEDEV.sh std 2>/dev/null
install -o root -g operator -m 755 crontab /usr/lib
@echo "Making user homedirs.."
for u in /usr/ast ~root; do cp ast/.[aepv]* $$u ; done
2007-05-16 15:00:43 +02:00
@echo "Installing fonts.."
install -m 644 -o root -g operator fonts/*.fnt /usr/lib/fonts/
installforce:: $(ETC)/rc $(ETC)/rs.inet $(ETC)/rs.single $(ETC)/system.conf $(ETC)/rc.subr.minix $(USRETC)/rc $(USR)/Makefile installpw
installpw::
if [ ! -d $(ETC) ]; then mkdir $(ETC); chmod 755 $(ETC); fi
@for f in $(PWFILES); do if [ -f $(ETC)/$$f ]; then :; else cp $$f $(ETC)/$$f; chmod 600 $(ETC)/$$f; fi; done
touch /etc/pwd.db; touch /etc/spwd.db; ${TOOL_PWD_MKDB} -p -V 0 /etc/master.passwd
2010-08-27 12:09:06 +02:00
$(ETC)/rc: rc .PHONY
2010-08-27 12:09:06 +02:00
install -m 755 -o root -g operator $> $@
$(ETC)/rs.inet: rs.inet .PHONY
2010-08-27 12:09:06 +02:00
install -m 755 -o root -g operator $> $@
$(ETC)/rs.single: rs.single .PHONY
2010-08-27 12:09:06 +02:00
install -m 755 -o root -g operator $> $@
$(ETC)/system.conf: system.conf .PHONY
2010-08-27 12:09:06 +02:00
install -m 644 -o root -g operator $> $@
$(ETC)/rc.subr.minix: rc.subr.minix .PHONY
install -m 644 -o root -g operator $> $@
$(USRETC)/rc: usr/rc .PHONY
2010-08-27 12:09:06 +02:00
install -m 755 -o root -g operator $> $@
$(USR)/Makefile: usr/Makefile .PHONY
2010-11-23 12:12:06 +01:00
install -m 644 -o root -g operator $> $@