File: rules

package info (click to toggle)
android-cuttlefish 1.0.1-0~exp2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,192 kB
  • sloc: cpp: 39,149; sh: 2,523; javascript: 242; exp: 152; python: 125; makefile: 88
file content (63 lines) | stat: -rwxr-xr-x 2,413 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
#!/usr/bin/make -f

# Start build by executing:
# $ debuild --prepend-path /usr/local/bin --no-tgz-check -us -uc

# Uncomment this line out to make installation process more chatty.
# Keep it on until we know there's no outstanding problems with installation.
# export DH_VERBOSE=1

# There's a bug here
export DEB_BUILD_MAINT_OPTIONS=hardening=-format

include /usr/share/dpkg/buildflags.mk


%:
	dh $@ --with=config-package

override_dh_installinit:
	dh_installinit --name=cuttlefish-host-resources
	dh_installinit

override_dh_auto_build:
	echo "#WORKSPACE" > $(CURDIR)/base/cvd/WORKSPACE
	mkdir -p $(CURDIR)/debian/bazel_cache1
	mkdir -p $(CURDIR)/debian/bazel_cache2
	cd base/cvd && \
	env HOME=$(CURDIR)/debian/bazel_cache2 bazel build --linkopt="-Wl,--build-id=sha1" --spawn_strategy=local \
		--verbose_failures \
		--sandbox_debug \
		--repository_cache=$(CURDIR)/debian/bazel_cache1 \
		--strip=never \
		--copt="-g" \
		--copt="-I/usr/include/jsoncpp" \
		--linkopt="-L/usr/lib/$(DEB_HOST_MULTIARCH)/android" \
		--linkopt="-Wl,-rpath,/usr/lib/$(DEB_HOST_MULTIARCH)/android" \
		--linkopt="-z muldefs" \
		--override_repository=bazel_skylib=$(CURDIR)/debian/mock_repos/bazel_skylib \
		--override_repository=rules_cc=$(CURDIR)/debian/mock_repos/rules_cc \
		--override_repository=rules_java=$(CURDIR)/debian/mock_repos/rules_java \
		--override_repository=rules_proto=$(CURDIR)/debian/mock_repos/rules_proto \
		--override_repository=boringssl=$(CURDIR)/debian/mock_repos/boringssl \
		--override_repository=curl=$(CURDIR)/debian/mock_repos/curl \
		--override_repository=fmt=$(CURDIR)/debian/mock_repos/fmt \
		--override_repository=gflags=$(CURDIR)/debian/mock_repos/gflags \
		--override_repository=jsoncpp=$(CURDIR)/debian/mock_repos/jsoncpp \
		--override_repository=tinyxml2=$(CURDIR)/debian/mock_repos/tinyxml2 \
		--override_repository=zlib=$(CURDIR)/debian/mock_repos/zlib \
		--override_repository=protobuf=$(CURDIR)/debian/mock_repos/protobuf \
		--override_repository=com_google_protobuf=$(CURDIR)/debian/mock_repos/com_google_protobuf \
		cuttlefish/host/commands/cvd:cvd

	dh_auto_build
	rm -f $(CURDIR)/base/cvd/WORKSPACE

override_dh_auto_clean:
	dh_auto_clean
	rm -f $(CURDIR)/base/cvd/bazel-bin
	rm -f $(CURDIR)/base/cvd/bazel-cvd
	rm -f $(CURDIR)/base/cvd/bazel-out
	rm -f $(CURDIR)/base/cvd/bazel-testlogs
	rm -rf $(CURDIR)/debian/bazel_cache1
	rm -rf $(CURDIR)/debian/bazel_cache2