| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/pkg-info.mk |
| 4 |
|
| 5 |
# Needed for cross-building: |
| 6 |
# |
| 7 |
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853881 |
| 8 |
# |
| 9 |
# According to the report, debhelper 10 supports this already, but I'd like to |
| 10 |
# be compatible with older distros for now, so I still set this manually |
| 11 |
export PKG_CONFIG := $(DEB_HOST_GNU_TYPE)-pkg-config |
| 12 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 13 |
|
| 14 |
%: |
| 15 |
dh $@ --with python3 |
| 16 |
|
| 17 |
# I build everything, including the default python libraries |
| 18 |
# |
| 19 |
# And then I build the python libraries for all the available python versions, |
| 20 |
# which could be more than just the default. The default one won't be rebuilt, |
| 21 |
# because the build system will see it's done already |
| 22 |
override_dh_auto_build: |
| 23 |
export VERSION=$(shell echo $(DEB_VERSION) | sed "s/-.*//"); \ |
| 24 |
for v in `py3versions -s | sed s/python//g`; do \ |
| 25 |
rm -f *pywrap*.o; \ |
| 26 |
PYTHON_VERSION_FOR_EXTENSIONS=$$v dh_auto_build; \ |
| 27 |
done |
| 28 |
|
| 29 |
# Similarly, I install everything, looping through all the available python |
| 30 |
# versions, which could be more than just the default. All the non-python stuff |
| 31 |
# will be installed multiple times, but it's the same files going to the same |
| 32 |
# paths, so it hurts nothing |
| 33 |
override_dh_auto_install: |
| 34 |
export VERSION=$(shell echo $(DEB_VERSION) | sed "s/-.*//"); \ |
| 35 |
for v in `py3versions -s | sed s/python//g`; do \ |
| 36 |
PYTHON_VERSION_FOR_EXTENSIONS=$$v dh_auto_install; \ |
| 37 |
done |
| 38 |
|
| 39 |
override_dh_python3: |
| 40 |
dh_numpy3 |
| 41 |
dh_python3 |
| 42 |
|
| 43 |
# don't compress docs |
| 44 |
override_dh_compress: |
| 45 |
dh_compress -X.org -X.fig |