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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all # ,-pie
include /usr/share/dpkg/pkg-info.mk
# SOURCE_DATE_EPOCH ?= $(shell date -d "$$(dpkg-parsechangelog -S Date)" +%s)
BUILD_DATE=$(shell LC_ALL=C date --utc --date="@$(SOURCE_DATE_EPOCH)" "+%B %d, %Y")
SPHINXOPTS := -D today="$(BUILD_DATE)"
SPHINXOPTS += -D html_last_updated_fmt="$(BUILD_DATE)"
ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial/libhdf5.so),)
export HDF5_DIR := /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
endif
export PYBUILD_INSTALL_ARGS_python3-dbg=--install-scripts=/usr/bin-dbg/
export DISABLE_AVX2=1
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9
override_dh_auto_build:
$(MAKE) ANNOUNCE.txt
$(MAKE) -C src all
dh_auto_build --buildsystem=pybuild
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
cd $(shell ls -1d $(CURDIR)/.pybuild/cpython3_3.?/build | tail -n 1) && \
env PYTHONPATH=. python3 -m sphinx -M html $(CURDIR)/doc/source $(CURDIR)/doc/build -N $(SPHINXOPTS)
cd $(shell ls -1d $(CURDIR)/.pybuild/cpython3_3.?/build | tail -n 1) && \
env PYTHONPATH=. python3 -m sphinx -M latexpdf $(CURDIR)/doc/source $(CURDIR)/doc/build -N $(SPHINXOPTS)
mv doc/build/html doc/html
mv doc/build/latex/usersguide-*.pdf doc/usersguide.pdf
else
mkdir -p doc/html
touch doc/usersguide.pdf
endif
override_dh_python3:
dh_python3
dh_numpy3
override_dh_strip:
dh_strip -ppython3-tables-lib --dbg-package=python3-tables-dbg
override_dh_auto_clean:
# Avoid unnecessary cythonization (see
# https://github.com/PyTables/PyTables/issues/122)
#dh_auto_clean --buildsystem=pybuild
$(MAKE) distclean
$(RM) -r doc/*.pdf tables.egg-info tmp-locales
$(RM) -r .pybuild
override_dh_installchangelogs:
dh_installchangelogs -k RELEASE_NOTES.txt
override_dh_compress:
dh_compress -X.txt -X.pdf -X.py -X.h5
|