#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk

DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
DEB_DH_SHLIBDEPS_ARGS_libgeotranz3.2 := -l`pwd`/debian/libgeotranz3.2/usr/lib/$(DEB_HOST_MULTIARCH)/geotranz

build-indep:
	make makefile-build-indep-target

build-arch:
	make makefile-build-arch-target
	if [ "`dpkg-architecture -qDEB_HOST_ARCH_BITS`" = "64" ] || [ "`dpkg --print-architecture`" = "s390" ]; \
	then \
		ln -sf libgeotranz3.2.symbols.64bit debian/libgeotranz3.2.symbols.bits; \
	else \
		ln -sf libgeotranz3.2.symbols.32bit debian/libgeotranz3.2.symbols.bits; \
	fi

install/geotranz::
	convert GEOTRANS3/java_gui/geotrans3/gui/icons/Geotrans.gif debian/geotranz/usr/share/pixmaps/geotrans.xpm

install/libgeotranz3-dev::
	cd CCS/src/; find . -type f -name '*.h' -print0 | \
		cpio -pmdu0 ../../debian/libgeotranz3-dev/usr/include/geotranz
	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' debian/geotranz.pc.in > debian/geotranz.pc

