File: rules

package info (click to toggle)
pycxx 6.2.4-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,156 kB
  • sloc: cpp: 6,093; python: 756; sh: 47; ansic: 43; makefile: 38
file content (48 lines) | stat: -rwxr-xr-x 2,399 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
#!/usr/bin/make -f
export DH_VERBOSE=1

PYVERS=$(shell pyversions -s)
PY3VERS=$(shell py3versions -s)

%:
	dh $@ --with python2,python3

override_dh_auto_build:
	set -e && for i in $(PYVERS); do $${i} setup.py build; done
	set -e && for i in $(PY3VERS); do $${i} setup.py build; done

override_dh_auto_install:
	#should symlink to a common folder, but dh_link takes no wildcards
	# and replacing folders symlinks in upgrades is problematic (policy 6.5)
	# => wasting a little space preferable to more complex logic
	# CXX/ in pythonX.Y_d was a link in << 6.2.3 so there its fine
	set -e && for i in $(PYVERS); do \
		$${i} setup.py install --force --root=$(CURDIR)/debian/tmp --no-compile -O0 --install-layout=deb; \
		dh_install -ppython-cxx-dev CXX/*.hxx        /usr/include/$${i}/CXX/; \
		dh_install -ppython-cxx-dev CXX/*.h          /usr/include/$${i}/CXX/; \
		dh_install -ppython-cxx-dev CXX/Python2/*    /usr/include/$${i}/CXX/Python2; \
		dh_link -ppython-cxx-dev /usr/include/$${i}/CXX/ /usr/include/$${i}_d/CXX; \
		dh_install -ppython-cxx-dev Src/*.c          /usr/share/$${i}/CXX/; \
		dh_install -ppython-cxx-dev Src/*.cxx        /usr/share/$${i}/CXX/; \
		dh_install -ppython-cxx-dev Src/Python2/*    /usr/share/$${i}/CXX/Python2; \
		dh_install -ppython-cxx-dev usr/lib/python2*/dist-packages/CXX/__init__.py; \
	done
	set -e && for i in $(PY3VERS); do \
	  	$${i} setup.py install --force --root=$(CURDIR)/debian/tmp --no-compile -O0 --install-layout=deb; \
		2to3 -w -n $(CURDIR)/debian/tmp/usr/lib; \
		python_inc_dir=$$(readlink -f /usr/include/$$i); \
		pythond_inc_dir=$$(readlink -f /usr/include/$${i}_d); \
		dh_install -ppython3-cxx-dev CXX/*.hxx        $${python_inc_dir}/CXX/; \
		dh_install -ppython3-cxx-dev CXX/*.h          $${python_inc_dir}/CXX/; \
		dh_install -ppython3-cxx-dev CXX/Python3/*    $${python_inc_dir}/CXX/Python3; \
		dh_link -ppython3-cxx-dev $${python_inc_dir}/CXX/ $${pythond_inc_dir}/CXX; \
		dh_install -ppython3-cxx-dev Src/*.c          /usr/share/$${i}/CXX/; \
		dh_install -ppython3-cxx-dev Src/*.cxx        /usr/share/$${i}/CXX/; \
		dh_install -ppython3-cxx-dev Src/Python3/*    /usr/share/$${i}/CXX/Python3; \
		dh_install -ppython3-cxx-dev usr/lib/python3*/dist-packages/CXX/__init__.py; \
	done
	dh_auto_install

override_dh_fixperms:
	chmod 644 $(CURDIR)/debian/python-cxx-dev/usr/share/doc/python-cxx-dev/examples/range.cxx
	dh_fixperms