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
|
#!/usr/bin/make -f
build_dir = build
install_dir = $(CURDIR)/debian/tmp
pkgname = rtslib-fb
name = rtslib
#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
%:
dh $@ --with python2,python3
build-python%:
python$* setup.py build
override_dh_auto_build: $(PYTHON3:%=build-python%)
dh_auto_build
install-python%:
python$* setup.py install --root=$(install_dir) --install-layout=deb
override_dh_auto_install: $(PYTHON3:%=install-python%)
dh_auto_install
# for using python 3 for targetctl
# even though it is overwritten by python2 setup
sed -i '1s|/usr/bin/python$$|/usr/bin/python3|' $(install_dir)/usr/bin/targetctl
override_dh_installdocs:
cd $(build_dir); epydoc --no-sourcecode --html -n $(pkgname) \
--exclude configobj ../$(name)/*.py
dh_installdocs $(build_dir)/html
override_dh_installinit:
dh_installinit --name target
override_dh_auto_clean:
dh_auto_clean
rm -rf build
rm -rf *.egg-info
|