File: rules

package info (click to toggle)
libvcflib 1.0.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 70,520 kB
  • sloc: cpp: 39,837; python: 532; perl: 474; ansic: 317; ruby: 295; sh: 254; lisp: 148; makefile: 123; javascript: 94
file content (82 lines) | stat: -rwxr-xr-x 3,262 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/make -f

DH_VERBOSE := 1

include /usr/share/dpkg/default.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
export HTS_LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
export GIT_VERSION=$(DEB_VERSION)

%:
	dh $@ --buildsystem cmake

override_dh_clean:
	dh_clean
	find . -name "*.o" -delete
	rm -f README.html build/
	rm -rf contrib/filevercmp contrib/multichoose contrib/intervaltree

override_dh_auto_clean:
	dh_auto_clean || true

override_dh_auto_configure:
	cp -a debian/ext/* contrib/
	dh_auto_configure -- -DOPENMP=ON -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON -DZIG=OFF -DWFA_GITMODULE=OFF -DHTSLIB_FOUND=ON -DTABIX_FOUND=ON

override_dh_auto_build:
	dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	markdown README.md > README.html
endif

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cp obj-${DEB_HOST_GNU_TYPE}/CTestTestfile.cmake test/
	ln -sf obj-${DEB_HOST_GNU_TYPE}/ build
	cd test && ctest .
	cd .. && rm -f build
endif

override_dh_install:
	dh_install
	find debian/lib* -name filevercmp.h -delete
	cp -a debian/ext/filevercmp/filevercmp.h debian/libvcflib-dev/usr/include/vcflib/
	mkdir -p debian/libvcflib-dev/usr/include/intervaltree
	mv debian/libvcflib-dev/usr/include/vcflib/IntervalTree.h debian/libvcflib-dev/usr/include/intervaltree
	# Remove un-needed py so, install in separate binary package when needed
	find debian/ -name 'pyvcflib.cpython*.so' -delete
	# install pkg-config file
	mkdir -p $(CURDIR)/debian/libvcflib-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
	mv libvcflib.pc $(CURDIR)/debian/libvcflib-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
	rm -rf debian/*/usr/lib/vcflib/bin/*.R
# Argh, we can't use d-shlibmove since there is no static library
# Use this once this might be available.
#       d-shlibmove --commit \
#                   --multiarch \
#                   --devunversioned \
#                   --exclude-la \
#                   --override s/libdisorder[0-9]*-dev/libdisorder-dev/ \
#                   --override s/libfastahack[0-9]*-dev/libfastahack-dev/ \
#                   --override s/libsmithwaterman[0-9]*-dev/libsmithwaterman-dev/ \
#                   --override s/libtabixpp[0-9]*-dev/libtabixpp-dev/ \
#                   --override s/libwfa2-[0-9]*-dev/libwfa2-dev/ \
#                   --movedev debian/ext/filevercmp/filevercmp.h debian/libvcflib-dev/usr/include/vcflib/ \
#                   --movedev debian/libvcflib-dev/usr/include/vcflib/IntervalTree.h debian/libvcflib-dev/usr/include/intervaltree \
#                   --movedev libvcflib.pc usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
#                   debian/tmp/usr/lib/*/*.so
#       find debian -name "lib*.la" -delete
	for pl in `grep -Rl '#!/usr/bin/env' debian/*/usr/*` ; do \
	    sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
	done

override_dh_link:
	dh_link
	for rscript in debian/libvcflib-tools/usr/lib/vcflib/scripts/*.R ; do \
	    scriptname=$$(basename $$rscript) ; \
	    dh_link -p libvcflib-tools usr/lib/vcflib/scripts/$$scriptname usr/lib/R/site-library/vcflib/$$scriptname ; \
	done

override_dh_fixperms:
	dh_fixperms
	chmod -x debian/*/usr/lib/vcflib/scripts/*.R