#!/usr/bin/make -f
# -*- makefile -*-


build: build-stamp build-arch build-indep

build-arch:
# nothing to be done here

build-indep:
	debconf-updatepo

build-stamp:  
	dh_testdir
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	[ ! -f Makefile ] || $(MAKE) clean
	dh_quilt_unpatch
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_quilt_patch
	-$(MAKE) mo-files
	dh_installdirs
	$(MAKE) install DESTDIR=$(CURDIR)/debian/slbackup-php prefix=/usr


binary-arch: 

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs ./ChangeLog 
	#dh_installdocs 
	mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog
	dh_installcron
	dh_installdebconf
	dh_installman
	dh_link
	dh_compress
	dh_fixperms 
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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