File: rules

package info (click to toggle)
staden 2.0.0%2Bb11-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, trixie
  • size: 21,556 kB
  • sloc: ansic: 240,603; tcl: 65,360; cpp: 12,854; makefile: 11,201; sh: 2,952; fortran: 2,033; perl: 63; awk: 46
file content (63 lines) | stat: -rwxr-xr-x 2,348 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

## DEB_BUILD_ARCH or DEB_BUILD_ARCH_BITS ??
BITARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifeq ($(BITARCH),64)
    enable64bit:=--enable-64bit
else
    enable64bit:=
endif

%:
	dh $@

## Try to deal with multi-arch libraries ... this does not help
# override_dh_auto_build:
#	env LD_LIBRARY_PATH="$(CURDIR)/lib/$(DEB_HOST_MULTIARCH)" dh_auto_build

## Try to deal with multi-arch libraries by disabling rpath ... which does not work as expected
#override_dh_auto_configure:
#	dh_auto_configure -- --disable-rpath

override_dh_auto_configure:
	dh_auto_configure -- $(enable64bit) \
		--with-itcl=/usr/lib/tcltk/$(DEB_HOST_MULTIARCH) \
		--with-itk=/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)

override_dh_auto_install:
	dh_auto_install
	# Remove file causing lintian errors that is targeting at windows
	find debian -name help_windows.tcl -delete
	# Remove some empty directories
	find debian -type d -empty -name acdtcl -delete
	find debian -type d -empty -name templates -delete
	# Build system is not prepared for multi-arch
	mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/* $(CURDIR)/debian/tmp/usr/lib
	rmdir $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_clean:
	make spotless || true
	rm -f config.log config.status
	rm -f Makefile shlib.conf staden_config.h system.mk
	find -name debian -prune -o -name .dir -exec rm '{}' ';'

override_dh_installman-arch:
	dh_installman
	# due to a file name conflict spin.1 is moved out of the way #826684
	mkdir -p debian/staden/usr/lib/debian-med/share/man/man1/
	mv debian/staden/usr/share/man/man1/spin.1 debian/staden/usr/lib/debian-med/share/man/man1/
	gzip -9 debian/staden/usr/lib/debian-med/share/man/man1/spin.1

override_dh_fixperms:
	dh_fixperms
	# scripts should be executable
	chmod a+x debian/*/usr/share/staden/tcl/gap5/contig_graph.tcl
	chmod a+x debian/*/usr/share/staden/tcl/gap5/gap5_cmd.tcl
	chmod a+x debian/*/usr/share/staden/tcl/prefinish/add_stops.tcl
	chmod a+x debian/*/usr/share/staden/tcl/prefinish/finish_sanger.tcl
	chmod a+x debian/*/usr/share/staden/tcl/tk_utils/help_ext.tcl
	chmod a+x debian/*/usr/share/staden/tcl/tk_utils/help_galeon.tcl
	chmod a+x debian/*/usr/share/staden/tcl/tk_utils/help_int.tcl
	chmod a+x debian/*/usr/share/staden/tcl/tk_utils/help_netscape.tcl