#!/usr/bin/make -f
# 							-*- makefile -*-
# debian.rules file for the Debian/GNU Linux apmd package
# Copyright 1996-98 by Dirk Eddelbuettel <edd@debian.org>
# And fiddled with by Avery Pennarun for use with netselect

package	= netselect
debtmp	:= $(shell pwd)/debian/tmp

#export DH_VERBOSE=1

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

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	-$(MAKE) clean
	dh_clean

binary-indep: build

binary-arch: build
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_installdebconf
	dh_clean -k
	dh_installdirs
	$(MAKE) PREFIX=`pwd`/debian/tmp/usr \
		MANDEST=`pwd`/debian/tmp/usr/share/man install
	dh_installdocs	README README.OS2 README.traceroute HISTORY
#	dh_installmenu
#	dh_installinit	--noscripts
#	dh_installcron
#	dh_installmanpages
	dh_undocumented
	#dh_installexamples		debian-ftp-mirrors
	dh_installchangelogs		ChangeLog
	dh_strip
	dh_link
	dh_compress
	echo x1; ls -l debian/tmp/usr/bin
	#dh_suidregister
	echo x2; ls -l debian/tmp/usr/bin
	dh_fixperms
	chmod u+s debian/tmp/usr/bin/netselect
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
#	dh_makeshlibs
#	dh_md5sums
	echo x3; ls -l debian/tmp/usr/bin
	dh_builddeb
	echo x4; ls -l debian/tmp/usr/bin

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

