#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) # Reduce debug info to workaround address space limitation ifneq (,$(filter $(DEB_HOST_ARCH), mipsel)) export DEB_CXXFLAGS_MAINT_APPEND += -g1 endif export PYBUILD_NAME=grpcio # Python building should use system libraries export GRPC_BUILD_WITH_BORING_SSL_ASM = 0 export GRPC_PYTHON_BUILD_WITH_CYTHON = 1 export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1 export GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1 export GRPC_PYTHON_BUILD_SYSTEM_CARES = 1 export GRPC_PYTHON_BUILD_SYSTEM_RE2 = 1 export GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD = 1 # Ruby export GEM2DEB_TEST_RUNNER = --check-dependencies export DH_RUBY = --gem-install export DH_RUBY_GEM_INSTALL_INCLUDE = platform_check.rb version.rb export DH_RUBY_IGNORE_TESTS = all BUILD_STATIC_DIR=$(CURDIR)/build-static/ BUILD_SHARED_DIR=$(CURDIR)/build-shared/ # -DCMAKE_BUILD_TYPE=Release COMMON_BUILD_FLAGS= \ -DgRPC_ABSL_PROVIDER=package \ -DgRPC_CARES_PROVIDER=package \ -DgRPC_BENCHMARK_PROVIDER=package \ -DgRPC_PROTOBUF_PROVIDER=package \ -DgRPC_RE2_PROVIDER=package \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_ZLIB_PROVIDER=package \ -DgRPC_BACKWARDS_COMPATIBILITY_MODE=OFF \ -DgRPC_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ -DgRPC_INSTALL_CMAKEDIR=lib/$(DEB_HOST_MULTIARCH)/cmake/grpc \ -DgRPC_INSTALL_PKGCONFIGDIR=lib/$(DEB_HOST_MULTIARCH)/pkgconfig \ -DgRPC_BUILD_GRPC_CPP_PLUGIN=ON \ -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF \ -DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF \ -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF \ -DgRPC_BUILD_GRPC_PHP_PLUGIN=ON \ -DgRPC_BUILD_GRPC_PYTHON_PLUGIN=ON \ -DgRPC_BUILD_GRPC_RUBY_PLUGIN=ON export V=1 override_dh_auto_clean: $(RM) -r $(BUILD_STATIC_DIR) dh_auto_clean -O--buildsystem=cmake \ -O--builddir=$(BUILD_SHARED_DIR) $(RM) $(CURDIR)/src/python/grpcio/grpc/_cython/cygrpc.*.so $(RM) -r $(CURDIR)/__pycache__/ \ $(CURDIR)/src/python/grpcio/__pycache__/ \ $(CURDIR)/python_build/ \ $(CURDIR)/.pybuild/ \ $(CURDIR)/src/python/grpcio/grpcio.egg-info/ $(RM) $(CURDIR)/a.out override_dh_auto_configure: mkdir -p $(CURDIR)/third_party/googletest/ ln -s /usr/src/googletest/googlemock/ \ $(CURDIR)/third_party/googletest/ ln -s /usr/src/googletest/googletest/ \ $(CURDIR)/third_party/googletest/ dh_auto_configure -O--buildsystem=cmake \ -O--builddir=$(BUILD_STATIC_DIR) -- \ -DBUILD_SHARED_LIBS=OFF \ -DgRPC_BUILD_TESTS=OFF \ $(COMMON_BUILD_FLAGS) dh_auto_configure -O--buildsystem=cmake \ -O--builddir=$(BUILD_SHARED_DIR) -- \ -DBUILD_SHARED_LIBS=ON \ -DgRPC_BUILD_TESTS=ON \ $(COMMON_BUILD_FLAGS) dh_auto_configure -O--buildsystem=pybuild override_dh_auto_build: dh_auto_build -O--buildsystem=cmake \ -O--builddir=$(BUILD_STATIC_DIR) dh_auto_build -O--buildsystem=cmake \ -O--builddir=$(BUILD_SHARED_DIR) dh_auto_build -O--buildsystem=pybuild -O--with=python3 dh_auto_build -O--buildsystem=ruby override_dh_auto_install: dh_auto_install -O--buildsystem=cmake \ -O--builddir=$(BUILD_STATIC_DIR) dh_auto_install -O--buildsystem=cmake \ -O--builddir=$(BUILD_SHARED_DIR) dh_auto_install -O--buildsystem=pybuild TOPDIR=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \ dh_auto_install -O--buildsystem=ruby find $(CURDIR)/debian/ruby-grpc -name ca.pem \ -o -name server1.key -o -name server1.pem | xargs chmod a-x %: dh $@ --builddir=$(BUILD_SHARED_DIR) --buildsystem=cmake \ --with=python3 .PHONY: overide_dh_auto_clean override_dh_auto_configure \ override_dh_auto_build override_dh_auto_install