#!/usr/bin/make -f


# Standard way of building Haskell libraries .
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/hlibrary.mk

# If no threaded RTS is found, disable it
DEB_SETUP_GHC6_CONFIGURE_ARGS := $(shell test -e /usr/lib/ghc-$(GHC6_VERSION)/libHSrts_thr.a || echo --flags=-threaded)

build/$(CABAL_PACKAGE) :: build-ghc6-stamp

install/$(CABAL_PACKAGE) :: build/$(CABAL_PACKAGE)
	$(DEB_SETUP_BIN_NAME) copy --builddir=dist-ghc6 --destdir=debian/$(CABAL_PACKAGE)
	rm -rf debian/$(CABAL_PACKAGE)/usr/share/doc
	install -Dm 644 hlint.htm debian/$(CABAL_PACKAGE)/usr/share/doc/$(CABAL_PACKAGE)/hlint.html

