#!/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