File: rules

package info (click to toggle)
python-django-treebeard 4.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 972 kB
  • sloc: python: 4,947; javascript: 269; makefile: 177
file content (29 lines) | stat: -rwxr-xr-x 1,085 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
#!/usr/bin/make -f

export PYBUILD_NAME=django-treebeard

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

execute_before_dh_auto_clean:
	rm -rf $(CURDIR)/docs/.build

execute_after_dh_auto_build:
	set -e; \
	for loc in $(CURDIR)/treebeard/locale/*; do \
		test -r $$loc/LC_MESSAGES/django.po && \
			python3 -m babel.messages.frontend compile --directory=$(CURDIR)/treebeard/locale/ --locale=$$(basename $$loc) --domain=django; \
		test -r $$loc/LC_MESSAGES/djangojs.po && \
			python3 -m babel.messages.frontend compile --directory=$(CURDIR)/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

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

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