File: rules.tpk

package info (click to toggle)
star 1.5a67-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,600 kB
  • ctags: 4,715
  • sloc: ansic: 37,601; sh: 3,198; makefile: 200
file content (47 lines) | stat: -rw-r--r-- 2,623 bytes parent folder | download
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
#ident "@(#)rules.tpk	1.2 05/08/09 "
###########################################################################
# Written 2005 by J. Schilling
###########################################################################
#
# Rules for creating binary tar packages
#
###########################################################################
#@@C@@
###########################################################################

###########################################################################
# If we are included before rules.dir, this will stop to propagate
# the targets tarpkg1 & tarpkg to sub makes but handle packaging at this
# directory bundling level.
###########################################################################
PKGTARGETS=

tarpkg1:
	rm -rf tarpkg
	mkdir -p tarpkg tarpkg/$(INS_BASE)/bin tarpkg/$(INS_BASE)/sbin tarpkg/$(INS_BASE)/etc \
		tarpkg/$(INS_BASE)/lib tarpkg/$(INS_BASE)/share/man
	ln -s share/man tarpkg/$(INS_BASE)/man
	if [ ."$(PRE_INST_CMDS)" != . ]; then cd tarpkg && eval "$(PRE_INST_CMDS)" ; fi
	$(MAKE) $(MAKE_FILE) DESTDIR=`pwd`/tarpkg install
	if [ ."$(POST_INST_CMDS)" != . ]; then cd tarpkg && eval "$(POST_INST_CMDS)" ; fi
	-if [ ."$(STRIPLIST)" != . ];  then chmod u+w $(STRIPLIST:%=tarpkg/%); strip $(STRIPLIST:%=tarpkg/%); fi
	-if [ ."$(STRIPXLIST)" != . ]; then chmod u+w $(STRIPXLIST:%=tarpkg/%); strip -x $(STRIPXLIST:%=tarpkg/%); fi
	-if [ ."$(MCSLIST)" != . ];    then chmod u+w $(MCSLIST:%=tarpkg/%); mcs -d -a "$(PROJECTNAME)" $(MCSLIST:%=tarpkg/%); fi
	if [ ."$(POST_STRIP_CMDS)" != . ]; then cd tarpkg && eval "$(POST_STRIP_CMDS)" ; fi

tarpkg:
	rm -rf tarpkg
	mkdir -p tarpkg tarpkg/$(INS_BASE)/bin tarpkg/$(INS_BASE)/sbin tarpkg/$(INS_BASE)/etc \
		tarpkg/$(INS_BASE)/lib tarpkg/$(INS_BASE)/share/man
	ln -s share/man tarpkg/$(INS_BASE)/man
	if [ ."$(PRE_INST_CMDS)" != . ]; then cd tarpkg && eval "$(PRE_INST_CMDS)" ; fi
	$(MAKE) $(MAKE_FILE) DESTDIR=`pwd`/tarpkg install
	if [ ."$(POST_INST_CMDS)" != . ]; then cd tarpkg && eval "$(POST_INST_CMDS)" ; fi
	find tarpkg -print | sort > /tmp/so.$$; diff filelist /tmp/so.$$; rm -f /tmp/so.$$
	-if [ ."$(STRIPLIST)" != . ];  then chmod u+w $(STRIPLIST:%=tarpkg/%); strip $(STRIPLIST:%=tarpkg/%); fi
	-if [ ."$(STRIPXLIST)" != . ]; then chmod u+w $(STRIPXLIST:%=tarpkg/%); strip -x $(STRIPXLIST:%=tarpkg/%); fi
	-if [ ."$(MCSLIST)" != . ];    then chmod u+w $(MCSLIST:%=tarpkg/%); mcs -d -a "$(PROJECTNAME)" $(MCSLIST:%=tarpkg/%); fi
	if [ ."$(POST_STRIP_CMDS)" != . ]; then cd tarpkg && eval "$(POST_STRIP_CMDS)" ; fi
	star -C tarpkg/ pkglist=pkglist -cP > tarpkg.tar
	bzip2 -9f tarpkg.tar
	rm -rf tarpkg