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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export PYBUILD_NAME=ethtool
override_dh_auto_build:
dh $@ --with=python3 --buildsystem=pybuild
a2x -d manpage -f manpage man/pethtool.8.asciidoc
a2x -d manpage -f manpage man/pifconfig.8.asciidoc
# Make python2/3 versions of each file so packages won't conflict
cp -p man/pethtool.8 man/pethtool3.8
cp -p man/pifconfig.8 man/pifconfig3.8
cp -p scripts/pethtool scripts/pethtool3
cp -p scripts/pifconfig scripts/pifconfig3
sed -i -e 's/python/python3/' scripts/pethtool3
sed -i -e 's/python/python3/' scripts/pifconfig3
override_dh_auto_install:
dh_auto_install
# Remove original scripts, installed by setup.py. We will update-alternatives later
rm -rf debian/python3-ethtool/usr/bin
override_dh_auto_test:
clean:
dh $@ --with=python3 --buildsystem=pybuild
rm -f \
man/pethtool.8 man/pifconfig.8 \
man/pethtool3.8 man/pifconfig3.8 \
scripts/pethtool3 scripts/pifconfig3
rm -rf build ethtool.egg-info
%:
dh $@ --with=python3 --buildsystem=pybuild
|