#!/usr/bin/make -f
# Based on the sample debian/rules that uses debhelper,
# which is "GNU copyright 1997 by Joey Hess".

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

package=cdda2wav

build:	build-stamp
build-stamp:
	dh_testdir
	-./configure
	-make
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	-make distclean
	rm -f scsilib/align_test
	dh_clean

# Build architecture-independent files here.
binary-indep:	build

# 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
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the files into debian/tmp
	if [ -x configure ]; then make install prefix=`pwd`/debian/tmp/usr ;\
	else \
		make install DESTDIR=`pwd`/debian/tmp; \
	fi
	#Remove extras
	rm -rf `pwd`/debian/tmp/usr/bin/cdda2mp3*
	
	dh_installdocs README HOWTOUSE THANKS README.2_0_33 README.GoldstarR580B README.paranoia TODO
	dh_installexamples
	dh_installmenu
	#dh_installcron
	dh_installmanpages
	dh_undocumented pitchplay.1 readmult.1 scan_scsi.linux.1
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_suidregister
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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

