#!/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