~ubuntu-branches/ubuntu/utopic/haskell-uulib/utopic

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Marco Túlio Gontijo e Silva
  • Date: 2009-04-08 20:01:10 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090408200110-96hu9fr918e1wsr1
Tags: 0.9.10-0.1
* Non-maintainer upload.
* New upstream version.  Closes: #523214.
* Use new version of haskell-devscripts.
* debian/control:
  - Use new Standards-Version.
  - cpphs is not Indep.
* debian/patches: Remove directory.
* debian/haskell-uulib-doc.doc-base: haddock's file are stored now in
  /usr/share/libghc6-uulib-doc/html/.
* debian/haskell-uulib-doc.examples: Create file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# -*- makefile -*-
3
 
#
4
 
# Based on dh-make template containing work of Joey Hess, Craig Small
5
 
# and Bill Allombert. 
6
 
#
7
 
 
8
 
# Include dpatch
9
 
include /usr/share/dpatch/dpatch.make
10
 
 
11
 
# Uncomment this to turn on verbose mode.
12
 
#export DH_VERBOSE=1
13
 
 
14
 
# This has to be exported to make some magic below work.
15
 
export DH_OPTIONS
16
 
 
17
 
# These are used for cross-compiling and for saving the configure
18
 
# script
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)
23
 
 
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
28
 
endif
29
 
 
30
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31
 
  CONFIGURE_FLAGS += disable-optimization
32
 
else
33
 
  ifneq (,$(findstring $(DEB_HOST_ARCH),"arm"))
34
 
    CONFIGURE_FLAGS += disable-optimization
35
 
  endif
36
 
endif
37
 
 
38
 
setup: patch-stamp
39
 
        dh_testdir
40
 
#       chmod a+x configure
41
 
#       ./configure --prefix=/usr
42
 
        ghc --make Setup -o setup -package Cabal 
43
 
 
44
 
configure: configure-arch configure-indep
45
 
configure-arch: configure-arch-stamo
46
 
configure-arch-stamp: setup
47
 
        dh_haskell_configure -s $(CONFIGURE_FLAGS)
48
 
        touch $@
49
 
configure-indep: configure-indep-stamp
50
 
configure-indep-stamp: setup
51
 
        dh_haskell_configure -i
52
 
        touch $@
53
 
 
54
 
build: build-arch
55
 
build-arch: build-arch-stamp
56
 
build-arch-stamp: configure-arch-stamp
57
 
        dh_haskell_build -s
58
 
        touch $@
59
 
 
60
 
build-indep: build-indep-stamp
61
 
build-indep-stamp: configure-indep-stamp
62
 
        dh_haskell_build -i
63
 
        touch $@
64
 
 
65
 
clean: clean-patched unpatch
66
 
clean-patched:
67
 
        dh_testdir
68
 
        dh_testroot
69
 
        rm -f configure-stamp build-stamp
70
 
        if [ -x setup ] && [ -e .setup-config ]; then ./setup clean ; fi
71
 
        rm -rf dist html
72
 
#       rm -f Makefile uulib.cabal
73
 
        dh_clean setup Setup.hi Setup.o .*config* config.log config.status
74
 
 
75
 
install: install-arch install-indep
76
 
install-arch: build-arch-stamp
77
 
        dh_testdir 
78
 
        dh_testroot
79
 
        dh_clean -k -s -Xdebian/tmp
80
 
        dh_installdirs -s
81
 
        dh_haskell_install -s
82
 
        dh_haskell_prep
83
 
        dh_install -s
84
 
 
85
 
install-indep: build-indep-stamp
86
 
        dh_testdir 
87
 
        dh_testroot
88
 
        dh_clean -k -i -Xdebian/tmp
89
 
        dh_installdirs -i
90
 
        dh_haskell_install -i
91
 
        dh_install -i
92
 
 
93
 
# Must not depend on anything. This is to be called by
94
 
# binary-arch/binary-indep
95
 
# in another 'make' thread.
96
 
binary-common:
97
 
        dh_testdir
98
 
        dh_testroot
99
 
        dh_installchangelogs 
100
 
        dh_installdocs
101
 
        dh_compress -X.haddock 
102
 
        dh_fixperms
103
 
        dh_installdeb
104
 
        dh_shlibdeps
105
 
        dh_haskell_depends
106
 
        dh_gencontrol
107
 
        dh_md5sums
108
 
        dh_builddeb
109
 
 
110
 
# Build architecture independant packages using the common target.
111
 
binary-indep: install-indep
112
 
        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
113
 
 
114
 
# Build architecture dependant packages using the common target.
115
 
binary-arch: install-arch
116
 
        $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
117
 
 
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 
 
2
 
 
3
include /usr/share/cdbs/1/rules/debhelper.mk
 
4
include /usr/share/cdbs/1/class/hlibrary.mk