File: rules

package info (click to toggle)
python-dmidecode 3.12.2-9
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,140 kB
  • sloc: ansic: 6,946; xml: 741; python: 595; makefile: 97; sh: 68
file content (47 lines) | stat: -rwxr-xr-x 1,447 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
#!/usr/bin/make -f
P2 = python-dmidecode
P3 = python3-dmidecode
PYTHON2  = $(shell pyversions -r)
PYTHON3  = $(shell py3versions -s)

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

%:
	dh $@ --with python2,python3

override_dh_auto_clean:
	dh_auto_clean
	$(MAKE) clean

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

override_dh_auto_install:
	set -e ;\
	for python in $(PYTHON2) ; do \
		$$python     src/setup.py     install_lib --install-dir $(CURDIR)/debian/$(P2)/usr/lib/python2.7/dist-packages/ ; \
		$$python-dbg src/setup-dbg.py install_lib --install-dir $(CURDIR)/debian/$(P2)-dbg/usr/lib/python2.7/dist-packages/ ; \
	done
	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)),)
	$(MAKE) -C unit-tests test
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$(P2) --dbg-package=$(P2)-dbg
	dh_strip -p$(P3) --dbg-package=$(P3)-dbg
endif