Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # DH_VERBOSE := 1
4 export LC_ALL=C.UTF-8
5
6 export PYBUILD_NAME=slow5
7
8 DEFPY3 := $(shell py3versions -v -d)
9 PY_PLATFORM := $(shell python3 -c 'from distutils.util import get_platform; print(get_platform())')
10
11 # for hardening you might like to uncomment this:
12 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
13
14 %:
15 dh $@ --buildsystem=cmake
16
17 override_dh_auto_configure:
18 dh_auto_configure -- \
19 -DSLOW5_USE_ZSTD="ON"
20 dh_auto_configure --buildsystem=pybuild
21
22 override_dh_auto_build:
23 dh_auto_build
24 for py in `py3versions -s`; do \
25 $$py setup.py build; \
26 done
27
28 override_dh_auto_test:
29 mkdir -p lib
30 cp -a obj-$(DEB_HOST_GNU_TYPE)/libslow5_static.a lib/libslow5.a
31 $(MAKE) -C test zstd=1
32 for pys in `py3versions -s`; do \
33 echo $$pys; \
34 pydir=`$$pys debian/get-pyver-dir.py`; \
35 echo $$pydir; X=0; \
36 PYTHONPATH=`pwd`/build/$$pydir $$pys -m unittest -v python/test.py || X=$$?; \
37 if [ "$X" != 0 ]; then exit $$X; fi; \
38 done
39
40 override_dh_install:
41 cp -r include include.orig
42 mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libslow5_static.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libslow5.a
43 d-shlibmove --commit \
44 --t64 \
45 --multiarch \
46 --devunversioned \
47 --exclude-la \
48 --movedev include usr \
49 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libslow5.so
50 dh_install
51 dh_install -plibslow5-dev src/*.h usr/include/slow5/
52 dh_install -ppython3-slow5 build/lib.*-*/* usr/lib/python3/dist-packages/
53 mv -vf include.orig include
54
55 execute_after_dh_install:
56 dh_numpy3
57
58 SLOW5_EXAMPLES_DIR = debian/python3-slow5/usr/share/doc/python3-slow5/examples
59 execute_after_dh_fixperms:
60 chmod -x $(SLOW5_EXAMPLES_DIR)/README.md
61 chmod -x $(SLOW5_EXAMPLES_DIR)/adv/README.md
62 chmod -x $(SLOW5_EXAMPLES_DIR)/mt/README.md
63
64 override_dh_installexamples:
65 dh_installexamples
66 dh_installexamples -ppython3-slow5 python/example.py
67 dh_installexamples -ppython3-slow5 examples/*