#!/usr/bin/make -f
export DH_COMPAT=10

DESTDIR = $(CURDIR)/debian/tei-xsl/usr

configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.

	touch configure-stamp


build: build-stamp

build-stamp: configure-stamp 
	dh_testdir

	# Add here commands to compile the package.
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	(cd ..; make PREFIX=$(DESTDIR) install )
	(cd ..; make PREFIX=$(DESTDIR) doc oxygendoc )
	perl -p -i -e 's+http://www.tei-c.org/release+/usr/share+' $(DESTDIR)/share/doc/tei-xsl/style.xml
	perl -p -i -e 's+.ID=+#+' $(DESTDIR)/share/doc/tei-xsl/style.xml


# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
#	dh_installexamples config-dist.php
#	dh_installinit
#	dh_installcron
	dh_installchangelogs 
	dh_compress  --exclude=.xml --exclude=.xsl
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
