File: rules

package info (click to toggle)
python-django-treebeard 4.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,420 kB
  • sloc: python: 5,315; javascript: 270; makefile: 180; sh: 6
file content (32 lines) | stat: -rwxr-xr-x 1,042 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export PYBUILD_NAME=django-treebeard

%:
	dh $@ --with=python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_clean:
	rm -rf docs/.build
	dh_auto_clean

override_dh_auto_build:
	dh_auto_build
	set -e; \
	for loc in treebeard/locale/*; do \
		test -r $$loc/LC_MESSAGES/django.po && \
			python3 setup.py compile_catalog --directory treebeard/locale/ --locale $$(basename $$loc) --domain django; \
		test -r $$loc/LC_MESSAGES/djangojs.po && \
			python3 setup.py compile_catalog --directory treebeard/locale/ --locale $$(basename $$loc) --domain djangojs; \
	done

execute_after_dh_auto_install:
	chmod 644 $(CURDIR)/debian/python3-django-treebeard/usr/lib/python3.*/dist-packages/treebeard/locale/*/LC_MESSAGES/*.po

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html -N docs/source/ $(CURDIR)/debian/python-django-treebeard-doc/usr/share/doc/python-django-treebeard-doc/html
	dh_sphinxdoc
endif

override_dh_compress:
	dh_compress -X.js -X.py -Xobjects.inv