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
|
#!/usr/bin/make -f
# -*- makefile -*-
#export DH_VERBOSE = 1
SPHINXOPTS := -E -N
export PYBUILD_NAME=django-captcha
%:
dh $@ --buildsystem=pybuild
override_dh_clean:
dh_clean
rm -rf .mypy_cache
override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
PYTHONPATH=. python3 -m sphinx -b html $(SPHINXOPTS) docs/ $(CURDIR)/debian/python-django-captcha-doc/usr/share/doc/python-django-captcha-doc/html
dh_sphinxdoc
endif
.PHONY: override_dh_auto_test
override_dh_auto_test:
dh_auto_test -- --system=custom --test-args="cd testproject && {interpreter} manage.py test captcha"
override_dh_install:
dh_install
find debian/python3-django-captcha -name Vera.ttf -exec \
ln -sf /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf {} \;;
# Remove these *.TXT files, we link to the used font any way.
rm debian/python3-django-captcha/usr/lib/python3*/dist-packages/captcha/fonts/*.TXT
override_dh_auto_build: rebuild-locale
dh_auto_build
rebuild-locale:
@echo
@echo "Rebuild the GNU message catalogs..."
@echo
for lang in `find captcha/locale/ -maxdepth 1 -type d | sort`; do \
if [ -f $${lang}/LC_MESSAGES/django.po ]; then \
LANG=`basename $${lang}` ;\
echo "Create message catalog for '$${LANG}'" ;\
msgfmt -v $${lang}/LC_MESSAGES/django.po -o $${lang}/LC_MESSAGES/django.mo ;\
fi ;\
done
|