#!/usr/bin/make -f
# Copyright 1997 by Oliver Elphick.
# Available for use under the same licence terms as the upstream package,
# (mutatis mutandis).

package=	libpgjava
version=	6.3.1

HERE :=		$(shell pwd)
TMPFILE := 	$(shell mktemp /tmp/postgresql.XXXXXX)
debtmp=		$(HERE)/debian/tmp
doctmp=		$(HERE)/debian/postgresql-doc/usr/doc/postgresql-doc

build-stamp:	build

build:	
	cd src/interfaces/jdbc && make all
	touch build-stamp

clean:
	dh_testdir -v
	-cd src/interfaces/jdbc && make clean
	dh_clean -v

binary-indep:	
	echo There is no architecture-independent binary for this package

binary-arch:	build-stamp
	dh_testdir -v
	dh_testroot -v
	dh_clean -k -v
	dh_installdirs -v
	install -m 644 src/interfaces/jdbc/postgresql.jar \
		debian/tmp/usr/lib/postgresql/lib
	dh_installdocs -v src/interfaces/jdbc/README
	dh_installexamples -v src/interfaces/jdbc/example/*
	dh_installchangelogs -v
	dh_strip -v
	dh_compress -v
	dh_fixperms -v
	chmod a-x debian/tmp/usr/lib/postgresql/lib/postgresql.jar
	dh_installdeb -v
	dh_shlibdeps -v
	dh_gencontrol -v
	dh_md5sums -v
	dh_builddeb -v


# Below here is fairly generic really

binary:		binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean
