#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all export PYBUILD_NAME = postorius %: dh $@ --with python3,sphinxdoc --buildsystem=pybuild override_dh_auto_test: override_dh_auto_build: cd src && PYTHONPATH=. sphinx-build -b html -E -N postorius/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-postorius', so run mkdir manually. mkdir -p debian/python3-django-postorius/usr/share/python3-django-postorius # Move static files outside of the lib directory mv debian/python3-django-postorius/usr/lib/python3/dist-packages/postorius/static \ debian/python3-django-postorius/usr/share/python3-django-postorius/ dh_link usr/share/python3-django-postorius/static \ usr/lib/python3/dist-packages/postorius/static # Don't embed jquery JS scripts find debian/python3-django-postorius -name 'jquery-3.6.0.min.js' -type f -exec \ ln -sf /usr/share/javascript/jquery/jquery.min.js {} \; find debian/python3-django-postorius -name 'jquery-3.6.0.js' -type f -exec \ ln -sf /usr/share/javascript/jquery/jquery.js {} \; # Don't embed jquery Bootstrap scripts and CSS find debian/python3-django-postorius -name 'bootstrap.bundle.js' -type f -exec \ ln -sf /usr/share/bootstrap-html/js/bootstrap.bundle.js {} \; find debian/python3-django-postorius -name 'bootstrap.bundle.js.map' -type f -exec \ ln -sf /usr/share/bootstrap-html/js/bootstrap.bundle.js.map {} \; find debian/python3-django-postorius -name 'bootstrap.bundle.min.js' -type f -exec \ ln -sf /usr/share/bootstrap-html/js/bootstrap.bundle.min.js {} \; find debian/python3-django-postorius -name 'bootstrap.bundle.min.js.map' -type f -exec \ ln -sf /usr/share/bootstrap-html/js/bootstrap.bundle.min.js.map {} \; find debian/python3-django-postorius -name 'bootstrap.min.css' -type f -exec \ ln -sf /usr/share/bootstrap-html/css/bootstrap.min.css {} \; find debian/python3-django-postorius -name 'bootstrap.min.css.map' -type f -exec \ ln -sf /usr/share/bootstrap-html/css/bootstrap.min.css.map {} \; # Don't embed fonts find debian/python3-django-postorius -name 'FontAwesome.otf' -type f -exec \ ln -sf /usr/share/fonts-font-awesome/fonts/FontAwesome.otf {} \; for type in eot svg ttf woff woff2; do \ find debian/python3-django-postorius -name "fontawesome-webfont.$$type" -type f -exec \ ln -sf /usr/share/fonts-font-awesome/fonts/fontawesome-webfont.$$type {} \; ; \ done for type in eot svg ttf woff woff2; do \ find debian/python3-django-postorius -name "glyphicons-halflings-regular.$$type" -type f -exec \ ln -sf /usr/share/fonts-glyphicons/glyphicons-halflings-regular.$$type {} \; ; \ done # # Compile django LC messages cd debian/python3-django-postorius/usr/lib/python3/dist-packages/postorius && django-admin compilemessages # Remove the docs from /usr/lib/python3 rm -rf debian/python3-django-postorius/usr/lib/python3/dist-packages/postorius/doc override_dh_installchangelogs: dh_installchangelogs src/postorius/doc/news.rst