summaryrefslogtreecommitdiff
path: root/debian/rules
blob: ce1f43f4bf1b8f74c11b1be5c0930a83b285acee (plain)
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
#!/usr/bin/make -f

build_dir	= build
install_dir	= $(CURDIR)/debian/tmp
pkgname 	= configshell-fb
name 		= configshell

#export DH_VERBOSE=1

PYTHON2=$(shell pyversions -vr)
PYTHON3=$(shell py3versions -vr)

# prevent internet access to use PyPi
export http_proxy = http://127.0.0.1:9


%:
	echo "debug dh: $@"
	dh $@ --with python2,python3


build-python%:
	echo "debug: $@"
	python$* setup.py build

override_dh_auto_build: $(PYTHON3:%=build-python%)
	dh_auto_build


install-python%:
	echo "debug: $@"
	python$* setup.py install --root=$(install_dir) --install-layout=deb

override_dh_auto_install: $(PYTHON3:%=install-python%)
	dh_auto_install


override_dh_installdocs:
	cd $(build_dir); epydoc --no-sourcecode --html -n $(pkgname) \
		--exclude configobj ../$(name)/*.py
	dh_installdocs $(build_dir)/html

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build
	rm -rf *.egg-info