File: rules

package info (click to toggle)
alljoyn-core-1509 15.09a+dfsg.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 31,572 kB
  • sloc: cpp: 221,314; java: 40,806; objc: 17,659; ansic: 5,152; xml: 4,203; cs: 3,417; python: 1,775; sh: 1,139; makefile: 210; perl: 72
file content (128 lines) | stat: -rwxr-xr-x 4,840 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
#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
#export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export JAVA_HOME=/usr/lib/jvm/default-java
export CLASSPATH=/usr/share/java/csv.jar:/usr/share/java/debug-disable.jar:/usr/share/java/itext.jar
#XXX deactivate test for now: export GTEST_DIR=/usr/src/gtest

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# mapping all i.86 to x86 for Alljoyn
CPU=$(shell dpkg-architecture -qDEB_HOST_GNU_CPU | sed -e 's/i.86/x86/')
BUILDARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
# in case of X32, we might want to set x86 as well
ifeq ($(BUILDARCH),x32)
  export CPU = "x86"
endif
OS=linux

export VERSION := 15.09a
export SONAME := 1509
export VARIANT := release
#XXX deactivate test for now: export SCONS_ARGS := CPU=$(CPU) OS=$(OS) VARIANT=$(VARIANT) V=1 GTEST_DIR=$(GTEST_DIR) CRYPTO=builtin
export SCONS_ARGS := CPU=$(CPU) OS=$(OS) VARIANT=$(VARIANT) V=1 CRYPTO=builtin
export BUILD_DIR := $(CURDIR)/build/$(OS)/$(CPU)/$(VARIANT)/dist
export OBJ_DIR := $(CURDIR)/build/$(OS)/$(CPU)/$(VARIANT)/obj

%:
#	dh $@ --with javahelper
#	dh $@ --with systemd
	dh $@

override_dh_auto_build:
#XXX does not build yet
#	scons BINDINGS=java $(SCONS_ARGS) \
#		WS=off BT=off ICE=off

	dpkg-architecture -l

	scons BINDINGS=c $(SCONS_ARGS) \
		WS=off BT=off ICE=off

	scons BINDINGS=cpp $(SCONS_ARGS) \
		WS=off BT=off ICE=off

# not able to build js bindings yet:
# "Must specify either GECKO_BASE or CORDOVA_BASE build variable"
#	scons BINDINGS=js $(SCONS_ARGS) \
#		WS=off BT=off ICE=off

#	scons BINDINGS=c $(SCONS_ARGS) \
#		WS=off BT=off ICE=off DOCS=html
#	scons BINDINGS=c $(SCONS_ARGS) \
#		WS=off BT=off ICE=off DOCS=pdf

	touch ./to-be.removed-now.md5
	find ./* |grep '\.md5'|xargs rm
	dh_auto_build

override_dh_auto_clean:
	# see explanation of -I for dpkg-source
	# as this dir contains an {arch}, dpkg-source ignores it
	# "arm" in Alljoyn world means openWRT+cross compiling
	# so this is not needed for Debian
	rm -rf build_core/conf/linux/arm
	# these files are created during build
	rm -f .sconsign.dblite
	rm -rf .sconf_temp
	rm -f config.log
	rm -rf build
	touch ./build_core/to-be-removed-now.pyc
	find ./build_core/* -print|grep "\.pyc"|xargs rm
	touch ./to-be.removed-now.md5
	find ./* |grep '\.md5'|xargs rm
	rm -f alljoyn_c/inc/alljoyn_c/DBusStdDefines.h
	rm -f alljoyn_c/inc/alljoyn_c/Status.h
	rm -f alljoyn_c/inc/qcc/posix/platform_types.h
	rm -rf build
	dh_auto_clean

override_dh_auto_test:
	#XXX deactivate test for now: ./build/$(OS)/$(CPU)/$(VARIANT)/test/cpp/bin/cmtest
	dh_auto_test

override_dh_installchangelogs:
	dh_installchangelogs alljoyn_core/docs/ReleaseNotes.txt
	dh_installchangelogs

override_dh_install:
	dh_install
	find
	# we put build_core into the common package but
	# don't need any compiled or other stuff, so byebye
	touch ./debian/liballjoyn-common-dev-1509/to-be-removed-now.pyc
	find ./debian/liballjoyn-common-dev-1509/* -print|grep "\.pyc"|xargs rm
	rm -f ./debian/liballjoyn-common-dev-1509/usr/share/alljoyn/build_core/tools/bin/.gitignore
	rm -f ./debian/liballjoyn-common-dev-1509/usr/share/alljoyn/build_core/tools/scons/.gitignore
	rm -f ./debian/liballjoyn-common-dev-1509/usr/share/alljoyn/build_core/tools/bin/whitespace.py


blubber:
	rm -f alljoyn_java/bin/jar/alljoyn.jar
	rm -f alljoyn_java/bin/libs/liballjoyn_java.so
	rm -f alljoyn_java/bin/libs/liballjoyn_java.so
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocIntrospectWithDescriptionClient/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocIntrospectWithDescriptionService/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocMethodsClient/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocMethodsService/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocPropertiesClient/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocPropertiesService/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocSecurityLogonClient/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocSecurityLogonService/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocSecuritySRPClient/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocSecuritySRPService/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocSignalClient/MANIFEST.MF
	rm -f alljoyn_java/samples/java/JavaSDKDoc/JavaSDKDocSignalService/MANIFEST.MF
	rm -f alljoyn_java/src/org/alljoyn/bus/Status.java
	touch ./to-be.removed-now.pdf
	find ./* |grep '\.pdf'|xargs rm
	touch ./to-be.removed-now.md5
	find ./* |grep '\.md5'|xargs rm
	rm -rf alljoyn_core/docs/latex/*
	rm -rf alljoyn_core/docs/pdf/*

	dh_auto_clean