summaryrefslogtreecommitdiffstats
path: root/rules/vendor-tweaks/pii_nge.make
blob: 5fafcdb43b2a7baf50acf072e51fafa4856f96bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# -*-makefile-*-
#  
# $Id$
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

VENDORTWEAKS = pii_nge

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

pii_nge_targetinstall: $(STATEDIR)/pii_nge.targetinstall

$(STATEDIR)/pii_nge.targetinstall:
	@$(call targetinfo, vendor-tweaks.targetinstall)

	# remove CVS stuff
	find $(ROOTDIR) -name "CVS" | xargs rm -fr 
	rm -f $(ROOTDIR)/JUST_FOR_CVS

	#  generate version stamps
	perl -i -p -e "s,\@VERSION@,$(VERSION),g" $(ROOTDIR)/etc/init.d/banner
	perl -i -p -e "s,\@PATCHLEVEL@,$(PATCHLEVEL),g" $(ROOTDIR)/etc/init.d/banner
	perl -i -p -e "s,\@SUBLEVEL@,$(SUBLEVEL),g" $(ROOTDIR)/etc/init.d/banner
	perl -i -p -e "s,\@PROJECT@,$(PROJECT),g" $(ROOTDIR)/etc/init.d/banner
	perl -i -p -e "s,\@EXTRAVERSION@,$(EXTRAVERSION),g" $(ROOTDIR)/etc/init.d/banner
	perl -i -p -e "s,\@DATE@,$(shell date -Iseconds),g" $(ROOTDIR)/etc/init.d/banner

	# other config data
	rm -f $(ROOTDIR)/etc/hostname
	perl -i -p -e "s,\@CONSOLE@,tts/0,g" $(ROOTDIR)/etc/inittab
	perl -i -p -e "s,\@SPEED@,115200,g" $(ROOTDIR)/etc/inittab
	perl -i -p -e "s,\@VENDOR@,PII ,g" $(ROOTDIR)/etc/init.d/banner
	perl -i -p -e "s,\@PS1@,\'\\\u@\\\h:\\\w> \',g" $(ROOTDIR)/etc/profile
	perl -i -p -e "s,\@PS2@,\'> \',g" $(ROOTDIR)/etc/profile
	perl -i -p -e "s,\@PS4@,\'+ \',g" $(ROOTDIR)/etc/profile

	# create some mountpoints	
	$(call copy_root, 0, 0, 0755, /var/run)
	$(call copy_root, 0, 0, 0755, /var/log)
	$(call copy_root, 0, 0, 0755, /var/lock)
	
	# create /etc/rc.d links
	$(call copy_root, 0, 0, 0755, /etc/rc.d)
	$(call link_root, ../init.d/banner,     /etc/rc.d/S00_banner)
	$(call link_root, ../init.d/networking, /etc/rc.d/S01_networking)
	$(call link_root, ../init.d/utelnetd,   /etc/rc.d/S02_utelnetd)
	$(call link_root, ../init.d/proftpd,    /etc/rc.d/S02_proftpd)

	# donate /home to ftp.ftp so that we can download files 
	$(call copy_root, 11, 101, 0755, /home)

	touch $@

# vim: syntax=make