~ubuntu-branches/ubuntu/oneiric/enigmail/oneiric-updates

« back to all changes in this revision

Viewing changes to build/package/debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2010-04-10 01:42:24 UTC
  • Revision ID: james.westby@ubuntu.com-20100410014224-fbq9ui5x3b0h2t36
Tags: 2:1.0.1-0ubuntu1
* First releaase of enigmail 1.0.1 for tbird/icedove 3
  (LP: #527138)
* redo packaging from scratch 
  + add debian/make-orig target that uses xulrunner provided
    buildsystem + enigmail tarball to produce a proper orig.tar.gz
  + use debhelper 7 with mozilla-devscripts
  + use debian source format 3.0 (quilt)
  + patch enigmail to use frozen API only
    - add debian/patches/frozen_api.diff
  + patch build system to not link against -lxul - which isnt
    available for sdks produced by all-static apps like tbird
    - add debian/patches/build_system_dont_link_libxul.diff
  + add minimal build-depends to control

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# Derived from debhelper/dh_make example.
 
3
 
 
4
#export DH_VERBOSE=1
 
5
 
 
6
# Set by configure (plus USE_AUTOCONF=1), but useful for NSPR
 
7
export MOZILLA_CLIENT=1
 
8
export BUILD_OPT=1
 
9
export NO_STATIC_LIB=1
 
10
# untested upstream - export USE_IPV6=$(shell cpp debian/testipv6 | sh -)
 
11
export USE_PTHREADS=1
 
12
 
 
13
nspr = libnspr3
 
14
nsprdev = libnspr3-dev
 
15
mailnews = mozilla-mailnews
 
16
editor = mozilla-editor
 
17
TOP=..
 
18
 
 
19
build: build-stamp
 
20
build-stamp:
 
21
        dh_testdir
 
22
 
 
23
        test -d build-nspr || mkdir build-nspr
 
24
        test -s build-nspr/lib/$(nspr).so || $(MAKE) -C nsprpub DIST=`pwd`/build-nspr 
 
25
 
 
26
        test -d obj-`./build/autoconf/config.guess` || mkdir obj-`./build/autoconf/config.guess`
 
27
        cd obj-`./build/autoconf/config.guess` && \
 
28
        LD_LIBRARY_PATH=`cd ..;pwd`/build-nspr/lib \
 
29
        $(TOP)/configure --verbose --prefix=/usr \
 
30
           --disable-debug --disable-profile --disable-crypto \
 
31
           --disable-netcast --disable-java --disable-oji --disable-static \
 
32
           --disable-tests --disable-smart-mail --enable-mailnews \
 
33
           --enable-editor --enable-ldap --enable-optimize --with-pthreads \
 
34
           --with-jpeg=/usr/include --with-png=/usr/include \
 
35
           --with-zlib=/usr/include --with-nspr=`cd $(TOP);pwd`/build-nspr
 
36
        cd obj-`./build/autoconf/config.guess` && LD_LIBRARY_PATH=`cd $(TOP);pwd`/build-nspr/lib $(MAKE)
 
37
 
 
38
        touch build-stamp
 
39
 
 
40
clean:
 
41
        dh_testdir
 
42
        dh_testroot
 
43
        rm -f build-stamp install-stamp
 
44
 
 
45
        -cd nsprpub ; $(MAKE) realclean
 
46
        rm -rf build-nspr obj-`./build/autoconf/config.guess`
 
47
#       find . -type f -name Makefile ! -path '*nsprpub*' | xargs -r rm
 
48
 
 
49
        dh_clean
 
50
 
 
51
install: install-stamp
 
52
install-stamp: build-stamp
 
53
        dh_testdir
 
54
        dh_testroot
 
55
        dh_clean -k
 
56
        dh_installdirs -a
 
57
 
 
58
        cp -pR build-nspr/lib/*.so* `pwd`/debian/$(nspr)/usr/lib
 
59
        cd `pwd`/debian/$(nspr)/usr/lib ; /sbin/ldconfig -n .
 
60
#       cd `pwd`/debian/$(nspr)/usr/lib ; for i in * ; do ln -s $$i $$i.0 ; done
 
61
 
 
62
        cp -pR build-nspr/include/* `pwd`/debian/$(nsprdev)/usr/include/nspr
 
63
        cp -pR build-nspr/lib/*.a `pwd`/debian/$(nsprdev)/usr/lib
 
64
 
 
65
        # this may fail, but who cares
 
66
        -cp -pR obj-`./build/autoconf/config.guess`/dist/bin/* `pwd`/debian/tmp/usr/lib/mozilla
 
67
        install -m 755 `pwd`/debian/runner `pwd`/debian/tmp/usr/bin/mozilla
 
68
 
 
69
#       # Okay, lets move a bunch of mail-news stuff to its own place
 
70
        # Note:  We have to cd and set sourcedir because the debian directory
 
71
        # now lives in mozilla/build/package and dh_movefiles won't work
 
72
        # across the symlink.
 
73
        cd `pwd`/build/package; \
 
74
            dh_movefiles --sourcedir=debian/tmp -a
 
75
 
 
76
        touch install-stamp
 
77
 
 
78
binary-indep: build
 
79
# We have nothing to do by default, no architecture-independent files here.
 
80
 
 
81
binary-arch: build install
 
82
        dh_testdir -a
 
83
        dh_testroot -a
 
84
        cd debian/ ; cat copyright.short > copyright
 
85
        cat LICENSE >> debian/copyright
 
86
        dh_installdocs -pmozilla LEGAL
 
87
        dh_installdocs -p$(nspr)
 
88
        dh_installmime -pmozilla
 
89
        rm debian/copyright
 
90
#       dh_installexamples `find -name '*.ad'`
 
91
        dh_installmenu -pmozilla
 
92
# Running this is a baaad idea.
 
93
#       dh_installmanpages
 
94
        dh_undocumented -pmozilla mozilla.1
 
95
        dh_installchangelogs -pmozilla
 
96
        dh_installchangelogs -p$(nspr)
 
97
        cd `pwd`/debian/$(nsprdev)/usr/doc ; ln -s /usr/doc/$(nspr) ./$(nsprdev)
 
98
        cd `pwd`/debian/$(mailnews)/usr/doc ; ln -s /usr/doc/mozilla ./$(mailnews)
 
99
        cd `pwd`/debian/$(editor)/usr/doc ; ln -s /usr/doc/mozilla ./$(editor)
 
100
        dh_strip -a
 
101
        dh_compress -a
 
102
        dh_fixperms -a
 
103
        dh_installdeb -a
 
104
        cd debian ; cat $(nspr).shlibs > shlibs.local
 
105
        env LD_LIBRARY_PATH=`pwd`/debian/$(nspr)/usr/lib:`pwd`/debian/tmp/usr/lib/mozilla \
 
106
          dh_shlibdeps -pmozilla -plibnspr3 -p$(mailnews) -p$(editor)
 
107
        rm -f debian/shlibs.local
 
108
        dh_gencontrol -a
 
109
        dh_md5sums -a
 
110
        dh_builddeb -a
 
111
 
 
112
source diff:                                                                  
 
113
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
114
 
 
115
binary: binary-indep binary-arch
 
116
 
 
117
.PHONY: build clean binary-indep binary-arch binary # quicktest make