#!/usr/bin/make -f
# Work around #481592 (Closes: #485631).  Remove when #481592 closes!
CFLAGS := $(filter-out -g,$(CFLAGS))

%:
	+dh --with bash-completion $@
override_dh_auto_build: Setup
	./Setup build
override_dh_auto_clean: Setup
	./Setup clean
override_dh_auto_configure: Setup
	./Setup configure --prefix=/usr -fcurl-pipelining --constraint=parsec\<3 $(if $(wildcard /usr/lib/*/libHSrts_thr.a),,-f-threaded)
override_dh_auto_install: Setup
	./Setup copy --destdir=$(CURDIR)/debian/darcs
override_dh_auto_test: Setup
ifneq (nocheck,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	./Setup test
endif
Setup:
	ghc --make Setup
