File: rules

package info (click to toggle)
dballe 7.21-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 10,008 kB
  • sloc: cpp: 52,936; sh: 4,367; python: 3,558; f90: 1,861; makefile: 690; perl: 26
file content (42 lines) | stat: -rwxr-xr-x 1,336 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
#!/usr/bin/make -f

VERSION=$(shell debian/vercheck)
RELEASE_PACKAGE=dballe

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

# #DEB_MAKE_CHECK_TARGET := check
# 
# # From http://wiki.debian.org/DebianPython/NewPolicy
# binary-install/python-dballe::
# 	rm -f $(CURDIR)/debian/python-dballe/usr/share/pyshared/_dballe.la
# 	rm -f $(CURDIR)/debian/python-dballe/usr/lib/python?.?/dist-packages/_dballe.la

override_dh_auto_install:
	dh_auto_install
	# Build and install the python bindings for each different python version
	for ver in `pyversions -vr`; do \
		dh_auto_configure -- PYTHON=/usr/bin/python$$ver ; \
		make clean -C python ; \
		make install -C python DESTDIR=`pwd`/debian/tmp ; \
	done
	# Build and install the python bindings for each different python version
	for ver in `py3versions -vr`; do \
		dh_auto_configure -- PYTHON=/usr/bin/python$$ver ; \
		make clean -C python ; \
		make install -C python DESTDIR=`pwd`/debian/tmp ; \
	done
	# Remove python modules .la files
	rm -f debian/tmp/usr/lib/python*/dist-packages/*.la

vercheck:
	debian/vercheck > /dev/null

debsrc: vercheck
	if [ ! -f ../$(RELEASE_PACKAGE)_$(VERSION).orig.tar.gz ]; then \
		test -f Makefile || ./configure; \
		make dist; \
		mv $(RELEASE_PACKAGE)-$(VERSION).tar.gz ../$(RELEASE_PACKAGE)_$(VERSION).orig.tar.gz; \
	fi
	gbp buildpackage -S -us -uc