#!/usr/bin/make -f

#export DH_VERBOSE=1

SCONS := scons
SCONSFLAGS := --cache-disable

%:
	dh $@

override_dh_auto_build:
	$(SCONS) $(SCONSFLAGS) \
	  VERBOSE=1
#	  WITH_HTTPD=1 \
	  WITH_ORILOCAL=1 \
	  WITH_MDNS=1 \
	  WITH_LIBS3=1

override_dh_auto_install:
	$(SCONS) $(SCONSFLAGS) DESTDIR=$(CURDIR)/debian/ori PREFIX=/usr install

# Tests require the fuse kernel module to be loaded and so can't be
# run at build-time
override_dh_auto_test:

override_dh_auto_clean:
	$(SCONS) $(SCONSFLAGS) -c
	rm -f config.log ori_test_results.txt
	rm -rf build

get-orig-source:
	uscan --verbose --force-download --repack --compression xz

.PHONY: override_dh_auto_build override_dh_auto_install \
	override_dh_auto_test override_dh_auto_clean
