2
# Generic Haskell cabal library debian/rules v0.6 by Ian Lynagh,
3
# based on the example by Joey Hess.
4
# This file is public domain software.
6
# Uncomment this to turn on verbose mode.
9
GHC=$(firstword $(shell bash -c "type -p ghc6 ghc"))
11
CONFIGURE_OPTS = --enable-library-vanilla \
12
--enable-library-profiling \
13
--enable-library-for-ghci
14
ifneq '$(findstring $(shell dpkg-architecture -qDEB_HOST_ARCH), i386 amd64)' ''
15
CONFIGURE_OPTS += --enable-split-objs
22
update-haskell-control --check
23
$(GHC) --make Setup.hs -o setup-ghc
24
./setup-ghc configure --ghc --with-compiler=$(GHC) --prefix=/usr $(CONFIGURE_OPTS)
35
rm -f Setup.o Setup.hi setup-ghc
45
./setup-ghc copy --copy-prefix=`pwd`/debian/`dh_listpackages`/usr
46
./setup-ghc register --gen-script
47
./setup-ghc unregister --gen-script
48
mkdir -p `pwd`/debian/`dh_listpackages`/usr/lib/`dh_listpackages`
49
mv register.sh `pwd`/debian/`dh_listpackages`/usr/lib/`dh_listpackages`
50
mv unregister.sh `pwd`/debian/`dh_listpackages`/usr/lib/`dh_listpackages`
52
update-generated-files:
53
update-haskell-control
54
sed "s/@PACKAGE@/`dh_listpackages`/g" \
55
debian/`dh_listpackages`.prerm.in \
56
> debian/`dh_listpackages`.prerm
57
sed "s/@PACKAGE@/`dh_listpackages`/g" \
58
debian/`dh_listpackages`.postinst.in \
59
> debian/`dh_listpackages`.postinst
61
# Build architecture-independent files here.
62
binary-indep: build install
63
# We have nothing to do by default.
65
# Build architecture-dependent files here.
66
binary-arch: build install
98
binary: binary-indep binary-arch
99
.PHONY: build clean binary-indep binary-arch binary install