File: rules

package info (click to toggle)
python-dmidecode 3.12.2-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,132 kB
  • sloc: ansic: 6,946; xml: 741; python: 595; makefile: 93; sh: 68
file content (44 lines) | stat: -rwxr-xr-x 1,173 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
#!/usr/bin/make -f
P3 = python3-dmidecode
PYTHON3  = $(shell py3versions -s)

# Not to get undefined symbol: dmixml_GetContent
export CFLAGS=${CFLAGS-} -std=gnu89

%:
	dh $@ --with python3

override_dh_auto_clean:
	dh_auto_clean
	$(MAKE) clean

override_dh_auto_build:
	set -e ;\
	for python in $(PYTHON3); do \
		$(MAKE) PY_BIN=$$python ; \
		$(MAKE) PY_BIN=$$python-dbg ; \
	done

override_dh_auto_install:
	set -e ;\
	for python in $(PYTHON3) ; do \
		$$python     src/setup.py     install_lib --install-dir $(CURDIR)/debian/$(P3)/usr/lib/python3/dist-packages/ ; \
		$$python-dbg src/setup-dbg.py install_lib --install-dir $(CURDIR)/debian/$(P3)-dbg/usr/lib/python3/dist-packages/ ; \
	done

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	set -e ;\
	for python in $(PYTHON3); do \
		$(MAKE) PY_BIN=$$python -C unit-tests test; \
		#$(MAKE) PY_BIN=$$python-dbg -C unit-tests test; \
	done
endif

override_dh_installdocs:
	dh_installdocs -A README doc/AUTHORS doc/changelog doc/README.types doc/AUTHORS.upstream doc/README.upstream

override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
	dh_strip -p$(P3) --dbg-package=$(P3)-dbg
endif