| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
#export DH_VERBOSE = 1 |
| 5 |
|
| 6 |
export PYBUILD_NAME=django-taggit |
| 7 |
|
| 8 |
%: |
| 9 |
dh $@ --buildsystem=pybuild |
| 10 |
|
| 11 |
override_dh_clean: |
| 12 |
dh_clean |
| 13 |
rm -rf .mypy_cache |
| 14 |
|
| 15 |
override_dh_sphinxdoc: |
| 16 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 17 |
PYTHONPATH=. python3 -m sphinx -b html -N docs/ $(CURDIR)/debian/python-django-taggit-doc/usr/share/doc/python-django-taggit-doc/html |
| 18 |
dh_sphinxdoc |
| 19 |
endif |
| 20 |
|
| 21 |
override_dh_auto_test: |
| 22 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 23 |
python3 -m django test --settings=tests.settings |
| 24 |
endif |
| 25 |
|
| 26 |
override_dh_auto_build: rebuild-locale |
| 27 |
dh_auto_build |
| 28 |
|
| 29 |
rebuild-locale: |
| 30 |
@echo |
| 31 |
@echo "Rebuild the GNU message catalogs..." |
| 32 |
@echo |
| 33 |
for lang in `find taggit/locale/ -maxdepth 1 -type d | sort`; do \ |
| 34 |
if [ -f $${lang}/LC_MESSAGES/django.po ]; then \ |
| 35 |
LANG=`basename $${lang}` ;\ |
| 36 |
echo "Create message catalog for '$${LANG}'" ;\ |
| 37 |
msgfmt -v $${lang}/LC_MESSAGES/django.po -o $${lang}/LC_MESSAGES/django.mo ;\ |
| 38 |
fi ;\ |
| 39 |
done |