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
|
#!/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
|