#!/usr/bin/make -f
# -*- makefile -*-

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

PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))

%:
	dh $@

override_dh_auto_clean:
	$(RM) -r app tmp

override_dh_auto_configure:
	innoextract setup_freespace2_2*.exe

#DD=$(CURDIR)/debian/$(PKG)/usr/share/games/freespace2-open
#M=/data/movies
override_dh_auto_build:
	@echo "## checking integrity..."
	sha1sum --strict --check debian/files_sha1.txt
	#[ -d "$(DD)$(M)" ] || mkdir -v -p "$(DD)$(M)"
	#mv app/data?/*.MVE "$(DD)$(M)"

override_dh_builddeb:
	dh_builddeb -- -Zxz

get-orig-source:
	sha1sum --binary app/data2/* app/data3/* app/*.vp app/MANUAL.PDF app/ReadMe.txt app/refcard.pdf | tee debian/files_sha1.txt~NEW
