File: rules

package info (click to toggle)
google-compute-image-packages 20190124-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,344 kB
  • sloc: python: 6,338; sh: 1,748; cpp: 1,535; ansic: 404; makefile: 160
file content (36 lines) | stat: -rwxr-xr-x 1,018 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
#!/usr/bin/make -f

export PYBUILD_NAME=google-compute-engine
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS={dir}/google_compute_engine/
export PYBUILD_SYSTEM=distutils

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

OSLOGIN_DIR=google_compute_engine_oslogin

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

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C $(OSLOGIN_DIR) all

override_dh_auto_install:
	dh_auto_install
	
	$(MAKE) -C $(OSLOGIN_DIR) \
		DESTDIR=$(CURDIR)/debian/tmp \
		NSS_INSTALL_PATH=/lib/$(DEB_HOST_MULTIARCH) \
		PAM_INSTALL_PATH=/lib/$(DEB_HOST_MULTIARCH)/security \
		BIN_INSTALL_PATH=/usr/bin install
	
	cd $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH) && \
               ln -s libnss_cache_google-compute-engine-oslogin-*.so libnss_cache_oslogin.so.2 && \
               ln -s libnss_google-compute-engine-oslogin-*.so libnss_oslogin.so.2

override_dh_clean:
	dh_clean
	rm -rf google_compute_engine.egg-info