File: rules

package info (click to toggle)
pbseqlib 5.3.4%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 7,020 kB
  • sloc: cpp: 77,246; python: 331; sh: 103; makefile: 42
file content (59 lines) | stat: -rwxr-xr-x 2,186 bytes parent folder | download | duplicates (2)
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
include /usr/share/dpkg/default.mk

export HDF5_INC = /usr/include/hdf5/serial
export HDF5_LIB = /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
export GTEST_INC = /usr/include
export GTEST_SRCDIR = /usr/src/gtest

export DEB_CFLAGS_MAINT_APPEND=-O3 -I$(HDF5_INC)
export DEB_CXXFLAGS_MAINT_APPEND=-O3 -std=c++14

export LDLIBS += -lpbbam

# Needed for patch hdf5-1.10.1-support.patch
HDF5_VERSION := $(shell grep 'HDF5 Version' $(HDF5_LIB)/libhdf5.settings | awk '{print $$3}')
ifeq (yes,$(shell dpkg --compare-versions $(HDF5_VERSION) '>=' 1.10.1 && echo yes))
export DEB_CPPFLAGS_MAINT_APPEND+=-DHAVE_HDF5_1_10_1 $(DEB_CFLAGS_MAINT_APPEND)
endif

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# Ignore the return code because some tests
# require data that is not available in the source distribution.
	-$(MAKE) -k gtest
endif

override_dh_install:
	dh_install -p libpbdata-dev usr/include/libblasr/pbdata		usr/include/pbseq
	dh_install -p libpbihdf-dev usr/include/libblasr/hdf		usr/include/pbseq
	dh_install -p libblasr-dev  usr/include/libblasr/alignment	usr/include/pbseq
	find -L debian/*/usr/include/ -type f -regextype posix-egrep -not -regex '.*(hpp|h)$$' -delete
# defines.mk and build.mk files are symlinks and don't
# get removed by the previous command
	find debian/*/usr/include/ -name "*.mk" -delete
	d-shlibmove --commit \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
		    --override s/libhdf5_serial_cpp103-dev/libhdf5-dev/ \
		    --override s/libpbbam1.6.0-dev/libpbbam-dev/ \
		    --override s/libpbcopper1.8.0-dev/libpbcopper-dev/ \
		    --movedev debian/tmp/usr/include/libblasr usr/include \
		    --movedev "debian/tmp/usr/lib/*/pkgconfig/*.pc" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		    debian/tmp/usr/lib/*/libblasr.so
	mv debian/libblasr-dev/usr/include/libblasr debian/libblasr-dev/usr/include/pbseq
	mv debian/libblasr-dev/usr/include/pbseq/libblasr/LibBlasrConfig.h debian/libblasr-dev/usr/include/pbseq
	dh_install

override_dh_auto_clean:
	dh_auto_clean
	find -name defines.mk -delete
	$(RM) pbdata/libconfig.h