#!/usr/bin/make -f

%:
	dh $@ --with=python2

override_dh_auto_build:
	dh_auto_build
	# build the binary database
	(cd UnifiedDataExtractor;  \
	 ./create-binary-database; \
	  mv *.db ../data/programs.d/)


override_dh_install: 
	dh_install
ifneq (,$(filter command-not-found,$(shell dh_listpackages)))
	# Move our script from /usr/bin to /usr/lib (not meant for end-users)
	install -d $(CURDIR)/debian/command-not-found/usr/lib
	mv $(CURDIR)/debian/command-not-found/usr/bin/command-not-found $(CURDIR)/debian/command-not-found/usr/lib/command-not-found
	rmdir --ignore-fail-on-non-empty $(CURDIR)/debian/command-not-found/usr/bin
	# Get rid of bash integration script, got merged to bash
	rm $(CURDIR)/debian/command-not-found/etc/bash_command_not_found
endif


