| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export PYBUILD_NAME=geoalchemy2 |
| 4 |
%: |
| 5 |
dh $@ --buildsystem=pybuild |
| 6 |
|
| 7 |
override_dh_auto_clean: |
| 8 |
dh_auto_clean |
| 9 |
rm -rf GeoAlchemy2.egg-info .pytest_cache doc/gallery |
| 10 |
|
| 11 |
override_dh_auto_test: |
| 12 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 13 |
$(eval BUILD_DIR=$(shell pybuild --print '{build_dir}')) |
| 14 |
cp -r tests $(BUILD_DIR) |
| 15 |
python3 $(CURDIR)/debian/tests/setup-db-and-run-tests.py |
| 16 |
endif |
| 17 |
|
| 18 |
override_dh_installdocs: |
| 19 |
dh_installdocs --doc-main-package=python3-geoalchemy2 -p python-geoalchemy2-doc |
| 20 |
dh_installdocs -p python3-geoalchemy2 |
| 21 |
|
| 22 |
override_dh_auto_build: |
| 23 |
dh_auto_build |
| 24 |
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) |
| 25 |
cd doc && PYTHONPATH=$(CURDIR) sphinx-build -bhtml . ../build/html # HTML generator |
| 26 |
# avoid lintian duplicate file warning |
| 27 |
for thumb in build/html/_images/*_thumb.png; do \ |
| 28 |
test -f build/html/_images/thumb.png || cp $$thumb build/html/_images/thumb.png; \ |
| 29 |
ln -sf thumb.png $$thumb; \ |
| 30 |
done |
| 31 |
rm -rf doc/gallery |
| 32 |
endif |
| 33 |
|
| 34 |
override_dh_install: |
| 35 |
dh_install |
| 36 |
rm -rf debian/python3-geoalchemy2/usr/lib/python3/dist-packages/build |