File: rules

package info (click to toggle)
pyqwt3d 0.1.8-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 984 kB
  • sloc: python: 3,932; cpp: 328; makefile: 115; sh: 7
file content (107 lines) | stat: -rwxr-xr-x 3,113 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PY3VERS := $(shell py3versions -vs)
CURDIR  := $(shell pwd)
py_qt_version = $(shell dpkg -s python-qt$(strip $(1))-gl | grep '^Version' | sed 's,Version: \(.*\)-[^-]*$$,\1,')

#DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
DEB_UPSTREAM_VERSION=0.1.8

export DEB_BUILD_MAINT_OPTIONS=hardening=+pie,-fortify
export CFLAGS   := $(shell dpkg-buildflags --get CFLAGS)   $(shell dpkg-buildflags --get CPPFLAGS)
export CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export CPPFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS  := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed


configure: configure-stamp
configure-stamp:
	dh_testdir
	export QTDIR=/usr/share/qt5
	set -e ;\
	for py in $(PY3VERS) ; do \
		mkdir -p build/py$$py-qt5; \
		cp -Rl `ls . |grep -v build|grep -v debian` build/py$$py-qt5; \
		(cd build/py$$py-qt5/configure;\
		python$$py configure-qt5.py -5 -I /usr/include/qwtplot3d --extra-libs=qwtplot3d-qt5 \
			--sip-include-dirs=/usr/lib/python3/dist-packages/PyQt5/bindings/ \
			-D GL2PS_HAVE_ZLIB); \
	done
	touch $@

build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: configure-stamp
	dh_testdir
	export QTDIR=/usr/share/qt5
	set -e ;\
	for py in $(PY3VERS) ; do \
		mkdir -p build/py$$py-qt5; \
		cp -Rl `ls . |grep -v build|grep -v debian` build/py$$py-qt5; \
		(cd build/py$$py-qt5/configure && $(MAKE)); \
	done
	touch $@

build-indep: build-indep-stamp
build-indep-stamp: configure-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	rm -rf build
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_installdirs
	export QTDIR=/usr/share/qt5
	set -e ;\
	for py in $(PY3VERS) ; do \
		mkdir -p build/py$$py-qt5; \
		cp -Rl `ls . |grep -v build|grep -v debian` build/py$$py-qt5; \
		(cd build/py$$py-qt5/configure && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install); \
	done
	mkdir -p debian/tmp/usr/share/doc/python-qwt3d-doc/
	cp -a qt5examples debian/tmp/usr/share/doc/python-qwt3d-doc/
	cp -a Doc/html debian/tmp/usr/share/doc/python-qwt3d-doc/

binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installchangelogs -i #ANNOUNCEMENT-$(DEB_UPSTREAM_VERSION).TXT
	dh_installdocs -i
	dh_install -i --sourcedir=debian/tmp
	dh_link -i
	dh_compress -i --exclude=.py --exclude=.resX
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installchangelogs -a #ANNOUNCEMENT-$(DEB_UPSTREAM_VERSION).TXT
	dh_installdocs -a
	dh_install -a --sourcedir=debian/tmp
	dh_link -a
	dh_strip -a --no-automatic-dbgsym
	dh_compress -a --exclude=.cpp --exclude=.h --exclude=.resX
	dh_python3 -a
	dh_sip3 -a
	dh_installdeb -a
	dh_fixperms -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure