File: rules

package info (click to toggle)
python-scipy 0.7.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,500 kB
  • ctags: 36,081
  • sloc: cpp: 216,880; fortran: 76,016; python: 71,576; ansic: 62,118; makefile: 243; sh: 17
file content (60 lines) | stat: -rwxr-xr-x 2,397 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

unexport LDFLAGS
export FFLAGS="-fPIC"
export ATLAS=None

PYVERS:= $(shell pyversions -v -r debian/control)
BASE=$(shell pwd)/debian
DVER=$(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | sed 's/-[^-]*$$//')
UVER=$(shell echo $(DVER) | sed "s/+dfsg.*//g")

%:
	dh --with python-central $@

override_dh_auto_clean:
	rm -rf build
	find . -name "*.pyc" -exec rm {} \;

override_dh_auto_install:
	set -e; for v in $(PYVERS); do                                   \
		d=$(BASE)/python-scipy;                                  \
		mkdir -m 755 -p $$d/usr/share/doc/python-scipy;          \
		python$$v setup.py config_fc --noarch build;             \
		python$$v setup.py install --prefix $$d/usr              \
			--no-compile --install-layout=deb;               \
		rm -f $$d/usr/lib/python$$v/*-packages/scipy/LICENSE.txt;\
		python$$v setup.py clean --all;                          \
	done
	set -e; for v in $(PYVERS); do                                   \
		d=$(BASE)/python-scipy-dbg;                              \
		mkdir -m 755 -p $$d/usr/share/doc/python-scipy-dbg;      \
		CFLAGS="-g -ggdb" python$$v-dbg setup.py config_fc       \
					--noarch build;                  \
		python$$v-dbg setup.py install --prefix $$d/usr          \
			--no-compile --install-layout=deb;               \
		rm -f $$d/usr/lib/python$$v/*-packages/scipy/LICENSE.txt;\
		python$$v-dbg setup.py clean --all;                      \
	done
	find debian/python-scipy-dbg ! -type d ! -name '*_d.so' | xargs rm -f
	find debian/python-scipy-dbg -depth -empty -exec rmdir {} \;
	rm -fr $(BASE)/python-scipy*/usr/lib/python*/*-packages/scipy/weave/examples/

        #call dh_numpy
	dh_numpy

override_dh_fixperms:
	dh_fixperms
	set -e; for i in `find debian -mindepth 2 -type f ! -perm 755`; do \
		if head -1 $$i | grep -q '^#!' ; then                      \
	    		chmod +x $$i;                                      \
		fi ;                                                       \
	done
	sed -i '1s|.|#!/usr/bin/python\n&|' $(BASE)/python-scipy/`pycentral pycentraldir python-scipy`/scipy/cluster/tests/vq_test.py
	sed -i '1s|.|#!/usr/bin/python\n&|' $(BASE)/python-scipy/`pycentral pycentraldir python-scipy`/scipy/stats/tests/test_stats.py

override_dh_strip:
	dh_strip --dbg-package=python-scipy-dbg

get-orig-source:
	-uscan --force-download --download-version $(UVER) --rename