File: rules

package info (click to toggle)
libslow5lib 0.7.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,092 kB
  • sloc: ansic: 11,825; python: 1,179; sh: 547; makefile: 91; cpp: 40
file content (59 lines) | stat: -rwxr-xr-x 1,706 bytes parent folder | download
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
#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

export PYBUILD_NAME=slow5

DEFPY3 := $(shell py3versions -v -d)
PY_PLATFORM := $(shell python3 -c 'from distutils.util import get_platform; print(get_platform())')

# for hardening you might like to uncomment this:
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@ --with python3 --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- \
                -DSLOW5_USE_ZSTD="ON"
	dh_auto_configure --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	for py in `py3versions -s`; do \
		$$py setup.py build; \
	done

override_dh_auto_test:
	mkdir -p lib
	cp -a obj-$(DEB_HOST_GNU_TYPE)/libslow5_static.a lib/libslow5.a
	$(MAKE) -C test zstd=1
	for pys in `py3versions -s`; do \
                echo $$pys; \
                pydir=`$$pys debian/get-pyver-dir.py`; \
                echo $$pydir; X=0; \
                PYTHONPATH=`pwd`/build/$$pydir $$pys -m unittest -v python/test.py || X=$$?; \
		if [ "$X" != 0 ]; then exit $$X; fi; \
        done

override_dh_install:
	mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libslow5_static.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libslow5.a
	d-shlibmove --commit \
		    --t64 \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
		    --movedev include usr \
		    debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libslow5.so
	dh_install
	dh_install -plibslow5-dev src/*.h usr/include/slow5/
	dh_install -ppython3-slow5 build/lib.*-*/* usr/lib/python3/dist-packages/

execute_after_dh_install:
	dh_numpy3

override_dh_installexamples:
	dh_installexamples
	dh_installexamples -ppython3-slow5 python/example.py
	dh_installexamples -ppython3-slow5 examples/*.slow5