File: rules

package info (click to toggle)
hyperkitty 1.2.2-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,280 kB
  • sloc: javascript: 21,311; python: 9,944; makefile: 141
file content (54 lines) | stat: -rwxr-xr-x 2,273 bytes parent folder | download
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
50
51
52
53
54
#!/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-postorius', 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 fontawesome fonts. Use fonts-glewlwyd shipped ones instead.
#	find debian/python3-django-hyperkitty -name 'fontawesome-webfont.ttf' -type f -exec \
		ln -sf /usr/share/glewlwyd/webapp/fonts/fontawesome-webfont.ttf {} \;
#	find debian/python3-django-hyperkitty -name 'FontAwesome.otf' -type f -exec \
		ln -sf /usr/share/glewlwyd/webapp/fonts/FontAwesome.otf {} \;
	# Don't embed glewlwyd glyphicons as they're also shipped into debian.
	find debian/python3-django-hyperkitty -name 'glyphicons-halflings-regular.ttf' -type f -exec \
		ln -sf /usr/share/glewlwyd/webapp/fonts/glyphicons-halflings-regular.ttf {} \;
	# Don't embed bootstrap JS scripts
	find debian/python3-django-hyperkitty -name 'bootstrap.js' -type f -exec \
		ln -sf /usr/share/javascript/bootstrap/js/bootstrap.js {} \;
	find debian/python3-django-hyperkitty -name 'bootstrap.min.js' -type f -exec \
		ln -sf /usr/share/javascript/bootstrap/js/bootstrap.min.js {} \;

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