#!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- export PYBUILD_NAME=mlpy MLPY_VERSION = $(shell awk -F\' '/version *=/{print $$2;}' setup.py) BUILD_DIR=$(shell pybuild --print build_dir --interpreter python3) export DEB_BUILD_MAINT_OPTIONS=hardening=+all %: dh $@ --with python3 --buildsystem=pybuild override_dh_install: ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) $(MAKE) -C docs html latex $(MAKE) -C docs/build/latex all-pdf -rm docs/build/html/_static/jquery.js -rm docs/build/html/_static/underscore.js endif dh_install # move libraries into the python-mlpy-lib package for lib in $$(find debian/python3-mlpy/usr -name '*.so'); do \ sdir=$$(dirname $$lib) ; \ tdir=debian/python3-mlpy-lib/$${sdir#*python3-mlpy/} ; \ mkdir -p $$tdir ; \ echo "Moving '$$lib' into '$$tdir'." ; \ mv $$lib $$tdir ; \ done override_dh_clean: dh_clean $(MAKE) clean -C docs/ rm -f mlpy/adatron/adatron.c rm -f mlpy/canberra/canberra.c rm -f mlpy/dtw/dtw.c rm -f mlpy/findpeaks/findpeaks.c rm -f mlpy/gsl/gsl.c rm -f mlpy/kernel/kernel.c rm -f mlpy/kmeans/kmeans.c rm -f mlpy/lcs/lcs.c rm -f mlpy/liblinear/liblinear.c rm -f mlpy/libml/libml.c rm -f mlpy/libsvm/libsvm.c override_dh_shlibdeps: dh_shlibdeps dh_numpy3 # immediately useable documentation # and exemplar data (they are small excerpts anyways) override_dh_compress: dh_compress \ --exclude .py \ --exclude .pdf \ --exclude .html \ --exclude .css \ --exclude .jpg \ --exclude .txt \ --exclude .js \ --exclude .json \ --exclude .rtc \ --exclude .par \ --exclude .bin