4
# Based on dh-make template containing work of Joey Hess, Craig Small
9
include /usr/share/dpatch/dpatch.make
11
# Uncomment this to turn on verbose mode.
14
# This has to be exported to make some magic below work.
17
# These are used for cross-compiling and for saving the configure
19
# from having to guess our platform (since we know it already)
20
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
21
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
22
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
24
# ghc -split-objs only works on i386 and amd64
25
# but seems to break the profiling build
26
ifneq (,$(findstring $(DEB_HOST_ARCH),"i386 amd64"))
27
# CONFIGURE_FLAGS += enable-split-objs
30
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31
CONFIGURE_FLAGS += disable-optimization
33
ifneq (,$(findstring $(DEB_HOST_ARCH),"arm"))
34
CONFIGURE_FLAGS += disable-optimization
41
# ./configure --prefix=/usr
42
ghc --make Setup -o setup -package Cabal
44
configure: configure-arch configure-indep
45
configure-arch: configure-arch-stamo
46
configure-arch-stamp: setup
47
dh_haskell_configure -s $(CONFIGURE_FLAGS)
49
configure-indep: configure-indep-stamp
50
configure-indep-stamp: setup
51
dh_haskell_configure -i
55
build-arch: build-arch-stamp
56
build-arch-stamp: configure-arch-stamp
60
build-indep: build-indep-stamp
61
build-indep-stamp: configure-indep-stamp
65
clean: clean-patched unpatch
69
rm -f configure-stamp build-stamp
70
if [ -x setup ] && [ -e .setup-config ]; then ./setup clean ; fi
72
# rm -f Makefile uulib.cabal
73
dh_clean setup Setup.hi Setup.o .*config* config.log config.status
75
install: install-arch install-indep
76
install-arch: build-arch-stamp
79
dh_clean -k -s -Xdebian/tmp
85
install-indep: build-indep-stamp
88
dh_clean -k -i -Xdebian/tmp
93
# Must not depend on anything. This is to be called by
94
# binary-arch/binary-indep
95
# in another 'make' thread.
101
dh_compress -X.haddock
110
# Build architecture independant packages using the common target.
111
binary-indep: install-indep
112
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
114
# Build architecture dependant packages using the common target.
115
binary-arch: install-arch
116
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
118
binary: binary-arch binary-indep
119
.PHONY: binary binary-arch binary-indep build build-arch build-indep clean clean-patched configure configure-arch configure-indep install install-arch install-indep
3
include /usr/share/cdbs/1/rules/debhelper.mk
4
include /usr/share/cdbs/1/class/hlibrary.mk