#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --no-parallel

override_dh_autoreconf:
	for i in . filter fitsy util wcs; do \
	  cp -a /usr/share/misc/config.* $$i ; done
	dh_autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --enable-shared --with-zlib=-lz --with-wcslib=-lwcstools  --with-tcl=/usr/lib --enable-dl

override_dh_auto_build:
	dh_auto_build -- all shtclfun

override_dh_installman:
	dh_installman
	for t in  FunClose FunImageGet FunInfoPut FunRef FunColumnActivate \
	 FunImagePut FunLib FunTableRowGet FunColumnLookup FunImageRowGet \
	 FunOpen FunTableRowPut FunColumnSelect FunImageRowPut FunParamGet \
	 FunFlush FunInfoGet FunParamPut ; do \
	  s=$$(echo $$t | tr [A-Z] [a-z]) ; \
	  mv debian/libfuntools-dev/usr/share/man/man3/$$s.3 \
	     debian/libfuntools-dev/usr/share/man/man3/$$t.3 ; \
	done

override_dh_auto_clean:
	rm -f Makefile
	dh_auto_clean

override_dh_installchangelogs:
	dh_installchangelogs doc/changelog.html

override_dh_makeshlibs:
	dh_makeshlibs -Xlibtclfun.so

override_dh_missing:
	dh_missing --list-missing
