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


build: build-arch build-indep

build-arch:
# nothing to do for build-arch

build-indep: build-stamp

build-stamp:
	debconf-updatepo

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

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

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

binary-arch: 

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs ./ChangeLog 
	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
