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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export PYBUILD_NAME=glances
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
# Split package and documentation
override_dh_sphinxdoc:
python3 -m sphinx -b html -d debian/tmp/doctrees docs \
debian/glances-doc/usr/share/doc/glances/html
# Fonts
rm -rf $(CURDIR)/debian/glances-doc/usr/share/doc/glances/html/_static/fonts/Lato-*
rm -rf $(CURDIR)/debian/glances-doc/usr/share/doc/glances/html/_static/fonts/RobotoSlab-*
rm -rf $(CURDIR)/debian/glances-doc/usr/share/doc/glances/html/_static/fonts/fontawesome-*
# Split package and documentation
override_dh_auto_install:
dh_auto_install --destdir $(CURDIR)/debian/glances
# Remove embedded code copies
rm -f $(CURDIR)/debian/glances/usr/lib/python3/dist-packages/glances/outputs/static/css/normalize.css
rm -f $(CURDIR)/debian/glances/usr/lib/python3/dist-packages/glances/outputs/static/public/css/normalize.min.css
rm -f $(CURDIR)/debian/glances/usr/share/doc/glances/html/_static/jquery.js
rm -f $(CURDIR)/debian/glances/usr/share/doc/glances/html/_static/underscore.js
rm -f $(CURDIR)/debian/glances/usr/lib/python3/dist-packages/glances/outputs/static/public/images/glances.png
rm -f $(CURDIR)/debian/glances/usr/lib/python3/dist-packages/glances/outputs/static/images/glances.png
rm -f $(CURDIR)/debian/glances/usr/lib/python*/dist-packages/glances/outputs/static/README.md
rm -f $(CURDIR)/debian/glances/usr/lib/python3/dist-packages/glances/outputs/static/public/9a360c92ce9bda60a8da6389741dcfbf.png
# Overriding test to prevent FTBS (cf. #733168) http://bugs.debian.org/733168
# disable tests as they require /etc/mtab and fail in chroots
override_dh_auto_test:
# Fix lintian warning (duplicates files Copying, News; and remove authors, glances.conf)
override_dh_installdocs:
set -e && for docs in COPYING AUTHORS NEWS glances.conf; do \
rm -f $(CURDIR)/debian/glances/usr/share/doc/glances/$$docs ; \
done
dh_installdocs
override_dh_installchangelogs:
dh_installchangelogs NEWS
override_dh_clean:
rm -rf ./Glances.egg-info
dh_clean
|