File: rules

package info (click to toggle)
grpc 1.30.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 66,812 kB
  • sloc: cpp: 251,387; python: 54,309; ansic: 28,701; cs: 23,982; makefile: 13,627; objc: 12,064; ruby: 11,026; php: 5,329; sh: 5,012; xml: 2,258; javascript: 1,575; java: 266; sql: 159; pascal: 134
file content (96 lines) | stat: -rwxr-xr-x 2,838 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
#!/usr/bin/make -f
# -*- makefile -*-

# output every command that modifies files on the build system.
#DH_VERBOSE = 1

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

include /usr/share/dpkg/architecture.mk

export PYBUILD_NAME = grpcio

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Flags for Python build
export GRPC_PYTHON_BUILD_WITH_CYTHON = 1
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1
export GRPC_PYTHON_BUILD_SYSTEM_CARES = 1
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1
export GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD = 1

# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# package maintainers to append LDFLAGS
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

ifneq (,$(filter $(DEB_HOST_ARCH), armel mips mipsel powerpc))
  export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-as-needed -latomic -Wl,--as-needed
endif

export GEM2DEB_TEST_RUNNER = --check-dependencies
export DH_RUBY = --gem-install
export DH_RUBY_GEM_INSTALL_WHITELIST_APPEND = platform_check.rb version.rb

export DH_RUBY_IGNORE_TESTS = all

export V = 1

override_dh_auto_clean:
	dh_auto_clean
	dh_auto_clean -O--buildsystem=pybuild
	find $(CURDIR)/src/python/grpcio/ -name \*.so -delete
	$(RM) -r $(CURDIR)/src/python/grpcio/grpcio.egg-info/ \
		$(CURDIR)/.eggs/
	$(RM) \
		$(CURDIR)/src/python/grpcio/grpc/_cython/_credentials/roots.pem \
		$(CURDIR)/src/python/grpcio/grpc/_cython/cygrpc.cpp \
		$(CURDIR)/src/python/grpcio/grpc/_grpcio_metadata.py
	$(RM) a.out

override_dh_auto_configure:
	dh_auto_configure
	dh_auto_configure -O--buildsystem=pybuild

override_dh_auto_build:
	# Fake included protobuf .proto files
	mkdir -p $(CURDIR)/Ithird_party/protobuf/
	ln -s /usr/include $(CURDIR)/third_party/protobuf/src
	$(MAKE) shared prefix=/usr
	dh_auto_build -O--buildsystem=pybuild
	dh_auto_build -O--buildsystem=ruby

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
#	make test_c
endif
	dh_auto_test -O--buildsystem=pybuild

override_dh_auto_install:
	$(MAKE) INSTALL_LIBDIR=/lib/$(DEB_HOST_MULTIARCH) \
		install prefix=$(CURDIR)/debian/tmp/usr
	dh_auto_install -O--buildsystem=pybuild
	chmod a-x $(CURDIR)/debian/tmp/usr/share/grpc/roots.pem
	TOPDIR=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
		dh_auto_install -O--buildsystem=ruby
	echo Run Ruby tests with proper settings
	# run tests by hand
	LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
	CONFIG=. \
	gem2deb-test-runner || true
	find $(CURDIR)/debian/ruby-grpc/ \
		\( -name ca.pem \
			-o -name server1.key \
			-o -name server1.pem \) \
		-exec chmod a-x {} \;

override_dh_missing:
	dh_missing --list-missing

%:
	dh $@ --with=python3

.PHONY: override_dh_auto_clean override_dh_auto_configure \
	override_dh_auto_build override_dh_auto_test \
	override_dh_auto_install override_dh_missing