File: rules

package info (click to toggle)
staden-io-lib 1.15.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 13,660 kB
  • sloc: ansic: 48,868; makefile: 344; sh: 234; perl: 213
file content (77 lines) | stat: -rwxr-xr-x 2,742 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
#!/usr/bin/make -f

export LC_ALL=C.UTF-8

libpkg=libstaden-read
devpkg=$(libpkg)-dev
srcname=staden-io-lib
testdir=debian/$(srcname)-examples/usr/share/doc/$(srcname)/test

ifneq (,$(filter $(DEB_HOST_ARCH),armhf mips))
  DEB_CFLAGS_MAINT_APPEND+=-O0
endif

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --no-parallel

override_dh_auto_configure:
	export ac_cv_func_mmap_fixed_mapped=yes && dh_auto_configure

override_dh_install-arch:
	dh_install -a
	mkdir -p $(CURDIR)/debian/$(devpkg)/usr/bin
	mv $(CURDIR)/debian/staden-io-lib-utils/usr/bin/io_lib-config $(CURDIR)/debian/$(devpkg)/usr/bin
	#
	# Call d-shlibmove to comply with library packaging guide
	d-shlibmove --commit \
		    --t64 \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
		    --movedev "debian/tmp/usr/include" usr \
	            --override s/libhtscodecs2-dev/libhtscodecs-dev/ \
		    debian/tmp/usr/lib/*/$(libpkg).so
	mkdir -p $(CURDIR)/debian/$(devpkg)/usr/include/io_lib/
	cp $(CURDIR)/io_lib_config.h $(CURDIR)/debian/$(devpkg)/usr/include/io_lib/
	# make sure io_lib-config --libs will not return -pie (see  #825461)
	find debian/*/usr/bin -name io_lib-config -exec sed -i -e 's/ *-fPIE//' -e 's/ *-pie//' \{\} \;

override_dh_auto_test-indep:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	echo "Do not run test suite for architecture independent builds"
endif

override_dh_install-indep:
	dh_install -i
	mkdir -p $(testdir)
	# fix path to staden-io-lib executable in examples
	for tst in `ls tests/*.test` ; do \
	    sed -e 's#\.\./$$top_builddir/progs/#/usr/bin/#' -e 's#$$top_builddir/progs/#/usr/bin/#' $${tst} > $(testdir)/`basename $${tst}` ; \
	done
	# remove autogenerated big data files
	rm -f $(testdir)/data/ce\#*sorted.sam

override_dh_fixperms-indep:
	dh_fixperms
	chmod +x $(testdir)/*.test $(testdir)/*.pl

override_dh_missing-indep:

override_dh_auto_clean:
	dh_auto_clean
	rm -f tests/.done tests/data/ce\#sorted.sam tests/data/ce\#unsorted.sam
	rm -f config.sub config.guess
	##
	## Try to verify correct ABI version right in the beginning
	## Strangely enough d-shlibmove fails in detecting it in this package
	## Since upstream build system creates libstaden-read.so.11.1.0 this code is not
	## activated but it should be considered in case of future problems with ABI version
	##
	#UPSTREAMABI=`grep ^VERS_CURRENT configure.in | sed 's/^VERS_CURRENT[[:space:]]*=\([0-9]\+\)[[:space:]]*/\1/'` ; \
	#DEBABI=`grep '^Package: libstaden-read[0-9]\+' debian/control | sed 's/Package: libstaden-read\([0-9]\+\)/\1/'` ; \
	#if [ $${UPSTREAMABI} -ne $${DEBABI} ] ; then \
	#   echo "Upstream has bumped ABI to $${UPSTREAMABI} but Debian is using libstaden-read$${DEBABI} (see bug #710225)" ; \
	#   exit 1 ; \
	#fi