~ubuntu-branches/debian/lenny/haskell-utils/lenny

« back to all changes in this revision

Viewing changes to scripts/6/rules

  • Committer: Bazaar Package Importer
  • Author(s): Ian Lynagh (wibble)
  • Date: 2008-02-21 02:30:03 UTC
  • mfrom: (2.1.8 hardy)
  • Revision ID: james.westby@ubuntu.com-20080221023003-x73ww9m1rjpbiewh
Tags: 1.11
* We now make tight (build-)deps for the Cabal packages we depend on.
  This means that we can't have problems caused by cross-module
  inlining, or even Cabal version numbers becoming mismatched.
  Closes: #432799.
* Ignore dotfiles in varfile directories.
  In particular, this means that we ignore things like vim swapfiles.
  Closes: #445627.
* Fix the doc directory used in libghc6-PACKAGE-doc.postrm.
  Closes: #463998.
* Move the ghc6 version dependency logic into this package, and
  ignore what the ghc6 package tells us. This allows us to vary it,
  in particular make changes to the supported arches list, without
  having to do another ghc6 build on all platforms.
* All platforms now support ghc6, so make library build-deps just
      ghc6 (>= 6.8.2),                ghc6 (<< 6.8.2+)
  rather than
      ghc6 (>= 6.8.2) [$ghc6_arches], ghc6 (<< 6.8.2+) [$ghc6_arches]
* Changes in Debian packaging scripts 10 over 9:
  * We now use ${impl:ghc6:lib_build_deps} rather than ${ghc6_lib_bdeps}.
    Closes: #460077.
  * We now use ${impl:ghc6:*_deps} rather than ${ghc6_*_deps} and
    hardcoded, unversioned deps.
  * Call canonicalise-comma-list on the depends and suggests fields in
    control.in. This works around bugs in lintian, where it gets
    confused and starts giving spurious warnings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
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.
 
5
 
 
6
# Uncomment this to turn on verbose mode.
 
7
#export DH_VERBOSE=1
 
8
 
 
9
GHC=$(firstword $(shell bash -c "type -p ghc6 ghc"))
 
10
 
 
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
 
16
endif
 
17
 
 
18
build: build-stamp
 
19
build-stamp:
 
20
        dh_testdir
 
21
 
 
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)
 
25
        ./setup-ghc build
 
26
 
 
27
        touch build-stamp
 
28
 
 
29
clean:
 
30
        dh_testdir
 
31
        dh_testroot
 
32
        rm -f build-stamp
 
33
 
 
34
        -./setup-ghc clean
 
35
        rm -f Setup.o Setup.hi setup-ghc
 
36
 
 
37
        dh_clean
 
38
 
 
39
install: build
 
40
        dh_testdir
 
41
        dh_testroot
 
42
        dh_clean -k
 
43
        dh_installdirs
 
44
 
 
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`
 
51
 
 
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
 
60
 
 
61
# Build architecture-independent files here.
 
62
binary-indep: build install
 
63
# We have nothing to do by default.
 
64
 
 
65
# Build architecture-dependent files here.
 
66
binary-arch: build install
 
67
        dh_testdir
 
68
        dh_testroot
 
69
        dh_installchangelogs
 
70
        dh_installdocs
 
71
        dh_installexamples
 
72
#       dh_install
 
73
#       dh_installmenu
 
74
#       dh_installdebconf       
 
75
#       dh_installlogrotate
 
76
#       dh_installemacsen
 
77
#       dh_installcatalogs
 
78
#       dh_installpam
 
79
#       dh_installmime
 
80
#       dh_installinit
 
81
#       dh_installcron
 
82
#       dh_installinfo
 
83
#       dh_undocumented
 
84
        dh_installman
 
85
        dh_link
 
86
        dh_strip
 
87
        dh_compress
 
88
        dh_fixperms
 
89
#       dh_perl
 
90
#       dh_python
 
91
#       dh_makeshlibs
 
92
        dh_installdeb
 
93
        dh_shlibdeps
 
94
        dh_gencontrol
 
95
        dh_md5sums
 
96
        dh_builddeb
 
97
 
 
98
binary: binary-indep binary-arch
 
99
.PHONY: build clean binary-indep binary-arch binary install