File: rules

package info (click to toggle)
pyqwt5 5.2.1~cvs20091107+dfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 2,004 kB
  • sloc: python: 8,762; cpp: 1,217; makefile: 120
file content (141 lines) | stat: -rwxr-xr-x 4,076 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#!/usr/bin/make -f
# -*- makefile -*-

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

PYTHONS	:= $(shell pyversions -vr)
QTS=4

py_qt_version = $(shell dpkg -s python-qt$(strip $(1)) | grep '^Version' | sed 's,Version: \(.*\)-[^-]*$$,\1,')
libqwt5_version = $(shell dpkg -s libqwt5-qt$(strip $(1)) | grep '^Version' | sed 's,Version: \(.*\)-[^-]*$$,\1,')

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

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	chmod ugo+x qt4lib/PyQt4/Qwt5/grace.py
	set -e; for pyvers in ${PYTHONS};\
	do\
		for qtvers in ${QTS};\
		do\
			mkdir -p build/py$$pyvers-qt$$qtvers;\
			cp -Rl `ls . |grep -v build|grep -v debian` build/py$$pyvers-qt$$qtvers;\
			(set -e; cd build/py$$pyvers-qt$$qtvers/configure;\
			python$$pyvers configure.py -$$qtvers -I /usr/include/qwt-qt$$qtvers/ --extra-libs=qwt-qt$$qtvers --disable-numarray --disable-numeric);\
		done;\
	done
	touch configure-stamp

build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: configure-stamp
	dh_testdir
	set -e; for pyvers in ${PYTHONS};\
	do\
		for qtvers in ${QTS};\
		do\
			(set -e; cd build/py$$pyvers-qt$$qtvers/configure;\
			$(MAKE));\
		done;\
	done
	touch $@

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

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	rm -f sip/qwt5qt4/QwtTypes.sip
	rm -rf build
	dh_clean

install: install-indep install-arch
install-indep: build-indep-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs -i
	mkdir -p debian/tmp/usr/share/doc/python-qwt5-doc
	cp -a qt4examples debian/tmp/usr/share/doc/python-qwt5-doc


install-arch: build-arch-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs -s
	for pyvers in ${PYTHONS};\
	do\
		for qtvers in ${QTS};\
		do\
			export QTDIR=/usr/share/qt$$qtvers;\
			(cd build/py$$pyvers-qt$$qtvers/configure;\
			$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install);\
		done;\
	done

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

binary-arch: install-arch
	dh_testdir -a
	dh_testroot -a
	dh_installchangelogs -a ANNOUNCEMENT-$(DEB_UPSTREAM_VERSION)
	dh_installdocs -a
	dh_install -a --sourcedir=debian/tmp
	dh_strip -a
	dh_compress -a --exclude=.py --exclude=.resX
	dh_python2 -a
	dh_sip -a
	echo 'pythonqt4:Depends=python-qt4 (>= $(call py_qt_version, 4))' >> debian/python-qwt5-qt4.substvars
	echo 'libqwt5qt4:Depends=libqwt5-qt4 (>= $(call libqwt5_version, 4))' >> debian/python-qwt5-qt4.substvars
	dh_numpy -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

get-orig-source:
	REV_DATE=$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*cvs([0-9]+).*,\1,p'); \
	VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-+~]+).*,\1,p'); \
	if [ x$$REV_DATE = x ]; then \
	 uscan --force-download --rename --download-version=$$VER --destdir=. && (\
	 tar -xz --exclude 'Doc/html' --exclude 'qwt-[0-9\.]*' -f pyqwt5_$$VER.orig.tar.gz && \
	 tar -czf pyqwt5_$$VER+dfsg.orig.tar.gz PyQwt-$$VER; \
	 rm -f pyqwt5_$$VER.orig.tar.gz;\
	 rm -rf PyQwt-$$VER); \
	else \
	 cvs -rQz5 -d:pserver:anonymous@pyqwt.cvs.sourceforge.net:/cvsroot/pyqwt export \
		-D $$REV_DATE -d pyqwt5-$$VER~cvs$$REV_DATE+dfsg pyqwt5 && (\
	 find pyqwt5-$$VER~cvs$$REV_DATE+dfsg -name .cvsignore -type f -delete; \
	 rm -rf pyqwt5-$$VER~cvs$$REV_DATE+dfsg/Doc/html ;\
	 tar -zcf ./pyqwt5_$$VER~cvs$$REV_DATE+dfsg.orig.tar.gz pyqwt5-$$VER~cvs$$REV_DATE+dfsg; \
	 rm -rf pyqwt5-$$VER~cvs$$REV_DATE+dfsg); \
	fi

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