#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

override_dh_auto_configure:
	# Add here commands to configure the package.
	#cp /usr/share/misc/config.sub .
	#cp /usr/share/misc/config.guess .
	#autoreconf
	#./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info LDFLAGS="-Wl,-z,defs" --enable-ncursesw --enable-extfs --enable-static
	dh_auto_configure -- --enable-ncursesw --enable-all

override_dh_auto_install:
	$(MAKE) DESTDIR=$$(pwd)/debian/partclone prefix=/usr install

override_dh_auto_clean:
	dh_auto_clean
	rm -f get_lib_version
	rm -f config.sub configure Makefile.in aclocal.m4 config.guess
	rm -f src/Makefile.in docs/Makefile.in

override_dh_clean:
	dh_clean -X fail-mbr/fail-mbr.bin.orig

override_dh_strip:
	dh_strip --dbg-package=partclone-dbg

%:
	dh $@ --with autoreconf --with autotools-dev
