#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all export PYBUILD_NAME = hyperkitty %: dh $@ --with python3,sphinxdoc --buildsystem=pybuild override_dh_clean: dh_clean -X.txt.orig override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) set -e; \ for python3 in $(shell py3versions -r); do \ $$python3 $(shell which django-admin) test -v 3 --pythonpath=. --settings=hyperkitty.tests.settings_test hyperkitty; \ done endif override_dh_auto_build: PYTHONPATH=. sphinx-build -b html -E -N doc build/sphinx/html dh_auto_build override_dh_python3: dh_python3 # Due to bug #908999, dh_python3 removes the empty directory # 'usr/share/python3-django-hyperkitty', so run mkdir manually. mkdir -p debian/python3-django-hyperkitty/usr/share/python3-django-hyperkitty # Move static files outside of the lib directory mv debian/python3-django-hyperkitty/usr/lib/python3/dist-packages/hyperkitty/static \ debian/python3-django-hyperkitty/usr/share/python3-django-hyperkitty/ dh_link usr/share/python3-django-hyperkitty/static \ usr/lib/python3/dist-packages/hyperkitty/static # Don't embed fonts find debian/python3-django-hyperkitty -name 'fontawesome-webfont.eot' -type f -exec \ ln -sf /usr/share/fonts-font-awesome/fonts/fontawesome-webfont.eot {} \; find debian/python3-django-hyperkitty -name 'fontawesome-webfont.woff' -type f -exec \ ln -sf /usr/share/fonts-font-awesome/fonts/fontawesome-webfont.woff {} \; find debian/python3-django-hyperkitty -name 'fontawesome-webfont.woff2' -type f -exec \ ln -sf /usr/share/fonts-font-awesome/fonts/fontawesome-webfont.woff2 {} \; # Don't embed glewlwyd glyphicons as they're also shipped into debian. for type in eot ttf woff woff2; do \ find debian/python3-django-hyperkitty -name "glyphicons-halflings-regular.$$type" -type f -exec \ ln -sf /usr/share/fonts-glyphicons/glyphicons-halflings-regular.$$type {} \; ; \ done # Don't embed JQuery stuff find debian/python3-django-hyperkitty -name 'jquery-3.6.0.min.map' -type f -exec \ ln -sf /usr/share/javascript/jquery/jquery.min.map {} \; find debian/python3-django-hyperkitty -name 'jquery-3.6.0.min.js' -type f -exec \ ln -sf /usr/share/javascript/jquery/jquery.min.js {} \; find debian/python3-django-hyperkitty -name 'jquery-3.6.0.js' -type f -exec \ ln -sf /usr/share/javascript/jquery/jquery.js {} \; find debian/python3-django-hyperkitty -name 'jquery-ui-1.13.1.min.js' -type f -exec \ ln -sf /usr/share/javascript/jquery-ui/jquery-ui.min.js {} \; find debian/python3-django-hyperkitty -name 'jquery-ui-1.13.1.js' -type f -exec \ ln -sf /usr/share/javascript/jquery-ui/jquery-ui.js {} \; # Don't embed bootstrap JS scripts rm -rf debian/python3-django-hyperkitty/usr/share/python3-django-hyperkitty/static/hyperkitty/libs/bootstrap/stylesheets # Compile scss + css files using sassc sassc hyperkitty/static/hyperkitty/sass/hyperkitty.scss \ debian/python3-django-hyperkitty/usr/share/python3-django-hyperkitty/static/hyperkitty/libs/hyperkitty.css # Compile django LC messages cd debian/python3-django-hyperkitty/usr/lib/python3/dist-packages/hyperkitty && django-admin compilemessages override_dh_installchangelogs: dh_installchangelogs doc/news.rst override_dh_fixperms: dh_fixperms chmod 644 debian/python3-django-hyperkitty/usr/share/doc/python3-django-hyperkitty/examples/wsgi.py