File: rules

package info (click to toggle)
inventor 2.1.5-10-21
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 36,312 kB
  • sloc: ansic: 33,864; lisp: 7,361; cpp: 3,874; yacc: 369; sh: 359; perl: 234; awk: 141; makefile: 81; csh: 35; sed: 11
file content (156 lines) | stat: -rwxr-xr-x 4,578 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.
#
# This version is for a multibinary package. It also allows you to build any
# of the binary packages independantly, via binary-<package> targets.

# Uncomment this to turn on verbose mode. 
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# This has to be exported to make some magic below work.
export DH_OPTIONS

export IVROOT=$(shell pwd)/debian/tmp
export FREETYPE=1

# Set optimization and debugging flags [Policy 10.1].
# These options are controlled by variables VCOPTS and VCXXOPTS;
# see setting of "CFLAGS" in make/commondefs for details.
#
# Since we're building libraries, set _REENTRANT [Policy 10.2].
#
export VCOPTS=-g -D_REENTRANT

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
VCOPTS += -O0
else
VCOPTS += -O3
endif

export VCXXOPTS=$(VCOPTS)

# Set linking flags.
# These options are controlled by the variable VLDOPTS;
# see setting of "LDFLAGS" in make/commondefs for details. 
export VLDOPTS=-Wl,--as-needed

# Sadly, the program "ivman" used to generate manual pages
# is broken on several architectures.  It looks to me like
# there are assumptions being made about the form of mangled
# identifiers, or maybe some bad assumptions being broken on 64-bit
# architectures.  Whatever. 
#
# The man pages are therefore only generated on certain architectures,
# but since it is an architecture "all" package, we only have to
# ensure that the uploader builds on a favoured architecture, e.g.
# i386.
#
ifneq (,$(findstring $(DEB_BUILD_ARCH),i386 sparc powerpc mips mipsel))
export BUILDMAN=true
endif


build: build-stamp
build-stamp:
	dh_testdir

	install -d $(IVROOT)
	LD_LIBRARY_PATH=$(IVROOT)/usr/lib $(MAKE) install
	# Fix weird permissions in upstream source.
	chmod -x apps/examples/Toolmaker/08.Manips/README

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	-$(MAKE) -k clobber
	# Clear out symlinks created during build.
	rm -f libFL/ang/flclient.h libFL/freetype lib/libInventor.so.1 libSoXt/libInventorXt.so.1
	# libFL binary archive changed name in CVS version
	rm -f libFL/src/libFL*.a
	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	#dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/tmp.
	# should we re-do make install here?
	$(MAKE) install
	cp -a data/textures debian/tmp/usr/share/inventor/data/textures
	rm -rf debian/tmp/usr/share/inventor/data/textures/CVS
	install -d debian/tmp/usr/share/inventor/fonts
	install debian/link-fonts.sh debian/tmp/usr/share/inventor/fonts

# Ensure the man directories are created
	mkdir -p debian/tmp/usr/share/man/man1
	mkdir -p debian/tmp/usr/share/man/man3

# Remove SceneViewer from the demo install
	rm debian/tmp/usr/lib/inventor/SceneViewer*

	dh_movefiles
# Clean up the directories used as examples.
	-$(MAKE) -C apps/examples clobber
	-$(MAKE) -C apps/nodes clobber
	-$(MAKE) -C apps/samples clobber
	-$(MAKE) -C apps/tools/ivAddVP clobber
	-$(MAKE) -C apps/tools/ivnorm clobber
	-$(MAKE) -C apps/tools/ivperf clobber
	dh_install

# Fix up path names so demo apps can find their data files.
	cd debian/inventor-demo/usr/share/doc/inventor-demo/src/apps/examples/Mentor/CXX \
	  && perl -i -ple 's!/usr/share/src/Inventor/examples/!../../!' *.c++


# This single target is used to build all the packages, all at once, or
# one at a time. So keep in mind: any options passed to commands here will
# affect _all_ packages. Anything you want to only affect one package
# should be put in another target, such as the install target.
binary-common:
	dh_testdir
	dh_testroot
#	dh_installdebconf
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installchangelogs
	dh_lintian
	dh_link
	dh_compress
	dh_fixperms
	dh_strip -XGNUmakefile.libInventorWidget.a
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps -L libinventor1 -l debian/tmp/usr/lib
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture independant packages using the common target.
binary-indep: build install
	 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

build-indep: build

# Build architecture dependant packages using the common target.
binary-arch: build install
	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

build-arch: build

# Any other binary targets build just one binary package at a time.
binary-%: build install
	make -f debian/rules binary-common DH_OPTIONS=-p$*

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install