#!/usr/bin/make -f DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/architecture.mk version = 3.0 cprefix = 08570046 checkout = $(cprefix)d5f162d27b206b4479f7b27bc56e7ddd tclversions = 8.6 lib_so = libBLT.$(v).so.$(tclv) tcl_only_lib_so = libBLTlite.$(v).so.$(tclv) dtmp = $(CURDIR)/debian/tmp %: dh $@ override_dh_auto_configure: set -e ; \ for v in $(tclversions) ; do \ dh_auto_configure -B$(CURDIR)/debian/$$v -- \ --host=$(DEB_HOST_GNU_TYPE) \ --with-blt=/usr/lib/tcltk/$(DEB_HOST_MULTIARCH) \ --with-tcl=/usr/lib/$(DEB_HOST_MULTIARCH)/tcl$$v \ --with-tk=/usr/lib/$(DEB_HOST_MULTIARCH)/tk$$v \ --with-tcllibdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --with-tklibdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --enable-shared \ --enable-xshm \ --enable-stubs \ --enable-symbols \ ; \ done override_dh_auto_install: set -e ; \ for v in $(tclversions) ; do \ dh_auto_install -B$(CURDIR)/debian/$$v --destdir=$(dtmp)/$$v -- \ libdir=/usr/lib/$(DEB_HOST_MULTIARCH) ; \ sed -i -e "s:BLT_LIB_DIR='/usr/lib':BLT_LIB_DIR='/usr/lib/$(DEB_HOST_MULTIARCH)':" \ $(dtmp)/$$v/usr/lib/$(DEB_HOST_MULTIARCH)/bltConfig.sh ; \ chmod a-x $(dtmp)/$$v/usr/lib/$(DEB_HOST_MULTIARCH)/bltConfig.sh ; \ mv $(dtmp)/$$v/usr/share/man/mann/BLT.n $(dtmp)/$$v/usr/share/man/mann/intro.n ; \ rm $(dtmp)/$$v/usr/share/man/mann/bitmap.n ; \ (cd $(dtmp)/$$v/usr/share/man/mann ; \ for i in *.n ; do \ sed -e's/^\.TH \+\([^ ]*\) \+n/.TH blt::\1 3tcl/' $$i >../man3/blt::`basename $$i .n`.3tcl ; \ done) ; \ rm -r $(dtmp)/$$v/usr/share/man/mann ; \ done override_dh_makeshlibs: dh_makeshlibs -X/usr/lib/tcltk override_dh_compress: dh_compress -X.tcl -X.csv -X.tab -X.xbm -X.txt override_dh_clean: set -e ; \ for v in $(tclversions) ; do \ rm -rf $(CURDIR)/debian/$$v ; \ done dh_clean get-orig-source: CURDIR=$$(pwd) && TMPDIR=$$(mktemp -d /tmp/blt.XXXXXX) && \ cd $$TMPDIR && \ wget -O tmp.zip \ https://sourceforge.net/code-snapshots/git/b/bl/blt/src.git/blt-src-$(checkout).zip && \ unzip tmp.zip && \ rm -rv blt-src-$(checkout)/library/dd_protocols && \ sed -i -e 's/dd_protocols//' blt-src-$(checkout)/library/Makefile.in && \ sed -i -e '/dd_protocols/d' blt-src-$(checkout)/configure.in && \ tar -Jcf $$CURDIR/blt_$(version)~1+$(cprefix)+dfsg.orig.tar.xz blt-src-$(checkout) && \ rm -rf $$TMPDIR .PHONY: override_dh_auto_configure override_dh_auto_install override_dh_makeshlibs \ override_dh_compress override_dh_clean get-orig-source