File: rules

package info (click to toggle)
postorius 1.3.4-2%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,304 kB
  • sloc: javascript: 11,237; python: 8,667; makefile: 135; sh: 4
file content (44 lines) | stat: -rwxr-xr-x 1,904 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
#!/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:
	PYTHONPATH=. sphinx-build -b html -E -N src/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 bootstrap/jquery JS scripts
	find debian/python3-django-postorius -name 'jquery-1.11.3.min.js' -type f -exec \
		ln -sf /usr/share/javascript/jquery/jquery.min.js {} \;
	find debian/python3-django-postorius -name 'bootstrap.min.js' -type f -exec \
		ln -sf /usr/share/javascript/bootstrap4/js/bootstrap.min.js {} \;
	find debian/python3-django-postorius -name 'html5shiv.min.js' -type f -exec \
		ln -sf /usr/share/nodejs/html5shiv/dist/html5shiv.min.js {} \;
	find debian/python3-django-postorius -name 'html5shiv.js' -type f -exec \
		ln -sf /usr/share/nodejs/html5shiv/dist/html5shiv.js {} \;
	for type in eot 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

override_dh_installchangelogs:
	dh_installchangelogs src/postorius/doc/news.rst