File: rules

package info (click to toggle)
i2c-tools 3.1.2-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 600 kB
  • ctags: 444
  • sloc: ansic: 3,459; perl: 2,495; makefile: 46; sh: 43; python: 11
file content (24 lines) | stat: -rwxr-xr-x 710 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
#!/usr/bin/make -f

PY2VERS = $(shell pyversions -v -r debian/control)
PY3VERS = $(shell py3versions -v -r debian/control)
PYVERS = $(PY2VERS) $(PY3VERS)

%:
	dh $@ --parallel --with python2,python3

override_dh_auto_build:
	$(MAKE) CFLAGS="$(CPPFLAGS) $(CFLAGS)"
	cd py-smbus && for v in $(PYVERS) ; do \
		CFLAGS="$(CPPFLAGS) $(CFLAGS) -I../include" python$$v setup.py build ; \
	done

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp prefix=/usr
	cd py-smbus && for v in $(PYVERS) ; do \
		CFLAGS="$(CPPFLAGS) $(CFLAGS) -I../include" python$$v setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp ; \
	done

override_dh_auto_clean:
	rm -rf py-smbus/build
	dh_auto_clean