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
|
#!/usr/bin/make -f
PYVERS := $(shell pyversions -r)
PY3VERS := $(shell py3versions -r)
%:
dh $@ --with python2,python3
override_dh_auto_build:
set -e -x; \
for py in $(PYVERS) $(PY3VERS); do \
$$py setup.py build; \
done
override_dh_auto_install:
set -e -x; \
for py in $(PYVERS); do \
$$py setup.py install --skip-build --root debian/python-html2text \
--install-layout deb; \
done; \
cd debian/python-html2text/usr/bin; \
mv html2text html2markdown.py2; \
sed -i '1s,#!.*python.*,#!/usr/bin/python,' html2markdown.py2
set -e -x; \
for py in $(PY3VERS); do \
$$py setup.py install --skip-build --root debian/python3-html2text \
--install-layout deb; \
done; \
cd debian/python3-html2text/usr/bin; \
mv html2text html2markdown.py3; \
sed -i '1s,#!.*python.*,#!/usr/bin/python3,' html2markdown.py3
override_dh_installman:
cp debian/html2markdown.1 debian/html2markdown.py2.1
dh_installman -p python-html2text debian/html2markdown.py2.1
cp debian/html2markdown.1 debian/html2markdown.py3.1
dh_installman -p python3-html2text debian/html2markdown.py3.1
override_dh_auto_clean:
rm -rf build *.egg-info
rm -f debian/html2markdown.py2.1 debian/html2markdown.py3.1
|