#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package=pwgen

build: build-stamp
build-stamp:
	dh_testdir
	./configure --prefix=/usr --mandir=/usr/share/man
	$(MAKE) CFLAGS="-O2 -g -Wall"
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	if test -f Makefile ; then $(MAKE) distclean ; fi
	-rm -f `find . -name "*~"` pwgen *.o

	dh_clean

install: build 
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) install DESTDIR=`pwd`/debian/pwgen
	dh_install -ppwgen-udeb pwgen /usr/bin

binary-indep: build install
	dh_testdir
	dh_testroot
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: build install
	dh_testdir
	dh_testroot
#	dh_installdebconf	
	dh_installdocs
	dh_installexamples
	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
#	dh_installcron
	dh_installman
#	dh_installinfo 
#	dh_undocumented
	dh_installchangelogs ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	# You may want to make some executables suid here.
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean
