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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
#!/usr/bin/make -f
# -*- makefile -*-
#
# Based on dh-make template containing work of Joey Hess, Craig Small
# and Bill Allombert.
#
# Include dpatch
include /usr/share/dpatch/dpatch.make
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
setup: patch-stamp
dh_testdir
ghc --make Setup -o setup -package Cabal
build: build-stamp
build-stamp: setup
touch $@
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
if [ -x setup ] && [ -e .setup-config ]; then ./setup clean ; fi
rm -rf setup Setup.hi Setup.ho Setup.o .*config* dist html
dh_clean
install: install-arch install-indep
install-arch: build-stamp
dh_testdir
dh_testroot
dh_clean -k -s
dh_installdirs -s
dh_haskell -s
dh_install -s
install-indep: build-stamp
dh_testdir
dh_testroot
dh_clean -k -i
dh_installdirs -i
dh_haskell -i
dh_install -i
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
binary-common:
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_compress -X.haddock
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_haskell_depends
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: install-indep
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
# Build architecture dependant packages using the common target.
binary-arch: install-arch
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
binary: binary-arch binary-indep
.PHONY: binary binary-arch binary-indep build clean clean-patched install install-arch install-indep
|