summaryrefslogtreecommitdiff
path: root/p/haskell-shake/debian/rules
blob: 75ebe3415518fcec8bc4614df39555e6d86a3731 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/make -f

DEB_UPSTREAM_URL = http://hackage.haskell.org/package/shake-$(DEB_UPSTREAM_TARBALL_VERSION)
DEB_UPSTREAM_PACKAGE := shake
DEB_UPSTREAM_REPACKAGE_EXCLUDES := ./html/viz.js
DEB_UPSTREAM_REPACKAGE_DELIMITER := +
DEB_SETUP_GHC_CONFIGURE_ARGS := --datasubdir=/usr/share/shake

# tests fail on powerpc, due to ghc’s #789458
DEB_BUILD_ARCH     ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifeq (,$(filter $(DEB_BUILD_ARCH),powerpc))
DEB_ENABLE_TESTS := $(shell test -e /usr/bin/ghci && echo yes)
else
DEB_ENABLE_TESTS := no
endif

DEB_GHC_EXTRA_PACKAGES := libghc-shake-data (>= $(CABAL_VERSION))

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/class/hlibrary.mk

html/viz.js:
	touch $@

# Create versions of the files we stripped from the upstream tarball that
# are good enough to pass tests.
check-ghc-stamp: html/viz.js

install/libghc-shake-data:: debian/tmp-inst-ghc
	mv debian/tmp-inst-ghc/usr/share/shake debian/libghc-shake-data/usr/share
	dh_haskell_depends -plibghc-shake-data # for haskell:Extra-Depends substvar