#!/usr/bin/make -f

PACKAGE = lrzip
PKGDIR	= $(CURDIR)/debian/$(PACKAGE)
DOCDIR	= $(PKGDIR)/usr/share/doc/lrzip

override_dh_auto_configure:
	# With pristine tarballa from version control, there is no ./configure
	if [ -f configure ]; then \
	    :  ; \
	else \
	    autoreconf -vfi ; \
	fi
	dh_auto_configure

override_dh_auto_build:
	$(MAKE) NO_ASSEMBLER=1

override_dh_auto_install:
	$(MAKE) DESTDIR=$(PKGDIR) \
		INSTALL_DOC=/usr/share/doc/lrzip \
		INSTALL_DOC_LZMA=/usr/share/doc/lrzip/lzma \
		install
	# Remove extra files
	rm $(DOCDIR)/COPYING
	rm $(DOCDIR)/README.Assembler

%:
	dh $@

# End of file
