File: rules

package info (click to toggle)
libtorrent-rasterbar 1.1.11-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 17,412 kB
  • sloc: cpp: 134,554; sh: 4,695; python: 2,514; ansic: 1,754; makefile: 916
file content (66 lines) | stat: -rwxr-xr-x 1,856 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

export DEB_LDFLAGS_MAINT_APPEND  = -Wl,--as-needed

PYTHON2=$(shell pyversions -vr)
PYTHON3=$(shell py3versions -vr)
ALLPY=$(PYTHON2) $(PYTHON3) $(PYTHON2:%=%-dbg) $(PYTHON3:%=%-dbg)

CONFIGURE_ARGS = --with-libiconv --with-boost-libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

%:
	dh $@ --with python2,python3

override_dh_auto_configure-nopy:
	dh_auto_configure --builddirectory build -- $(CONFIGURE_ARGS)

override_dh_auto_configure-%:
	CPPFLAGS="$(CPPFLAGS) $(shell python$*-config --includes)" \
	PYTHON_LDFLAGS="$(shell python$*-config --libs)" \
	dh_auto_configure --builddirectory build-py$* -- \
		PYTHON=/usr/bin/python$* \
		PYTHON_INSTALL_PARAMS="--root=$(CURDIR)/debian/tmp \
		--install-layout=deb" \
		--enable-python-binding \
		--with-boost-python=boost_python$(subst .,,$(subst -dbg,,$*)) \
		$(CONFIGURE_ARGS)
	mv build-py$*/bindings/python build/bindings/python$*
	cp -r bindings/python/* build/bindings/python$*

override_dh_auto_configure: override_dh_auto_configure-nopy $(ALLPY:%=override_dh_auto_configure-%)


override_dh_auto_build-nopy:
	dh_auto_build --builddirectory build
	$(MAKE) -C docs/ -f makefile

override_dh_auto_build-%:
	dh_auto_build --builddirectory build/bindings/python$*

override_dh_auto_build: override_dh_auto_build-nopy $(ALLPY:%=override_dh_auto_build-%)


override_dh_auto_install-nopy:
	dh_auto_install --builddirectory build

override_dh_auto_install-%:
	dh_auto_install --builddirectory build/bindings/python$*

override_dh_auto_install: override_dh_auto_install-nopy $(ALLPY:%=override_dh_auto_install-%)


override_dh_auto_clean:
	rm -rf build build-py*
	dh_auto_clean

override_dh_compress:
	dh_compress -Xcpp

override_dh_strip:
	dh_strip --dbg-package=libtorrent-rasterbar-dbg

override_dh_makeshlibs:
	dh_makeshlibs -V