File: rules

package info (click to toggle)
staden-io-lib 1.14.8-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,372 kB
  • ctags: 3,853
  • sloc: ansic: 44,411; sh: 11,616; makefile: 318; perl: 188
file content (56 lines) | stat: -rwxr-xr-x 1,942 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
#!/usr/bin/make -f

libpkg=libstaden-read
devpkg=$(libpkg)-dev
#version=$(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- )
srcname=staden-io-lib
testdir=debian/$(srcname)-examples/usr/share/doc/$(srcname)/test
#mandir=$(CURDIR)/debian/$(utils)/usr/share/man/man1/

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with autoreconf

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 \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
		    --movedev "debian/tmp/usr/include" usr \
		    debian/tmp/usr/lib/*/$(libpkg).so
	#
	# 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_installman:
	#dh_installman
	# manpages need some post editing but in case it could be automated, this code would help
	# mkdir -p $(mandir)
	# help2man --no-discard-stderr --no-info --help-option='""' \
	#	 --name='filter SRF files for various purposes' \
	#	 --version-string="$(version)" \
	#	 $(CURDIR)/debian/$(utils)/usr/bin/srf_filter > $(mandir)/srf_filter.1

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_auto_clean:
	dh_auto_clean
	rm -f tests/.done tests/data/ce\#sorted.sam tests/data/ce\#unsorted.sam