summaryrefslogtreecommitdiffstats
path: root/rules/vendor-tweaks/innokom.make
blob: 599d9d95bbca59a6656b0f64b5ecedfde635bb59 (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
61
62
# -*-makefile-*-
# $Id: innokom.make,v 1.7 2003/10/09 07:43:00 robert Exp $
#
# (c) 2003 by Auerswald GmbH & Co. KG <linux-development@auerswald.de>
# (c) 2003 by Robert Schwebel <r.schwebel@pengutronix.de>
#          
# 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.
#

# leave this intact for all vendor tweaks
VENDORTWEAKS=vendor-tweaks.targetinstall

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

vendor-tweaks_targetinstall: $(STATEDIR)/vendor-tweaks.targetinstall

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

	# the application resides in /opt
	install -d $(ROOTDIR)/opt

	# writable directories must be on /data (ramdisk)
	install -d $(ROOTDIR)/data

	mv $(ROOTDIR)/var/log $(ROOTDIR)/data/log || mkdir $(ROOTDIR)/data/log
	ln -sf /data/log $(ROOTDIR)/var/log

	mv $(ROOTDIR)/tmp $(ROOTDIR)/data/tmp || mkdir $(ROOTDIR)/data/tmp
	ln -sf /data/tmp $(ROOTDIR)/tmp

ifeq (y, $(PTXCONF_NFSUTILS_INSTALL_NFSD))
	mv $(ROOTDIR)/var/lib/nfs $(ROOTDIR)/data/nfs || mkdir $(ROOTDIR)/data/nfs
	ln -sf /data/nfs $(ROOTDIR)/var/lib/nfs
endif

	# copy /etc template
	cp -a $(TOPDIR)/etc/innokom/. $(ROOTDIR)/etc

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

	# make scripts executable
	chmod 755 $(ROOTDIR)/etc/init.d/*

	# 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

	touch $@

# vim: syntax=make