~ubuntu-branches/ubuntu/karmic/seamonkey/karmic

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Fabien Tassin, Fabien Tassin
  • Date: 2007-12-02 19:27:42 UTC
  • Revision ID: james.westby@ubuntu.com-20071202192742-llg1mzf5cg021i7y
Tags: 1.1.6+nobinonly-0ubuntu1
[ Fabien Tassin ]
* Remove unused patches:
  - drop debian/patches/20_visibility.dpatch,
    debian/patches/28_ppc64_build.dpatch,
    debian/patches/38_unsupported_arch_build.dpatch,
    debian/patches/80_calendar_locale.dpatch,
    debian/patches/82_prefs_ubuntu.dpatch
* Migrate from dpatch to quilt
  - update debian/control: build-depends on quilt
  - debian/rules: update patching rules
  - drop debian/patches/80_config.dpatch: done by quilt
  - rename and update debian/patches/00list => debian/patches/series
  - rename and update debian/patches/*.dpatch => debian/patches/*.patch
* Fix unclean distclean leaving dist/ behind
  - update debian/patches/60_distclean.patch
* Migrate to CDBS
  - update debian/rules and debian/control
* Revert the Iceape unbranding to Seamonkey
  - drop debian/patches/80_app_name.patch and update
    debian/patches/series
  - update debian/patches/82_prefs.patch and
    debian/patches/99_configure.patch
  - drop iceape's icons:
    - update debian/rules
    - drop debian/extras/iceape* and debian/extras/Throbber*
    - drop debian/extras/license.txt
    - update wording
    - update debian/copyright  
  - rename packages to seamonkey-*
    - update debian/control
    - rename debian/iceape-*.{dirs,install,links,postinst,postrm,preinst}
      to debian/seamonkey-*.{dirs,install,links,postinst,postrm,preinst}
    - rename debian/iceape-*.{menu,mime,manpages}
      to debian/seamonkey-*.{menu,mime,manpages}
  - rename and update debian/menu_dir/iceape-*.desktop to
    debian/menu_dir/seamonkey-*.desktop
  - rename and update debian/{iceape.cfg,iceaperc,iceape-runner} to
    debian/{seamonkey.cfg,seamonkeyrc,seamonkey-runner}
  - update debian/about_debian.js, debian/base.js and debian/homepagereset.js
* Drop leftovers from calendar
  - drop debian/iceape-calendar.*
  - drop debian/extras/calendar.svg
  - drop debian/menu_dir/iceape-calendar.desktop
  - update debian/control
* Clean-up
  - drop debian/README.source (no longer useful)
  - drop debian/mozconfig (leftover from previous commit)
* Drop debian/patches/81_free_art_improvements.patch (was part of
  the unbranding)
  - update debian/patches/series
* Make seamonkey build at last
  - fix FTBFS with new libnss (since bz399589 landed)
    - add debian/patches/11_bz399589_fix_missing_symbol_with_new_nss.patch
    - update debian/patches/series
  - fix another FTBFS with libnss (caused by bad linking order with libcrmf)
    - add debian/patches/12_fix_ftbfs_with_nss.patch
    - update debian/patches/99_configure.patch
    - update debian/patches/series
  - fix bad syntax for --enable-extensions
    - update debian/rules
  - fix FTBFS with dh_install needing DEB_DH_INSTALL_SOURCEDIR
    - update debian/rules
  - fix install of additionnal searchplugins
    - update debian/rules
  - don't install hicolor icons (we don't have any)
    - update debian/seamonkey-browser.install
* Install libnssckbi.so in seamonkey-browser and drop other libnss links
  - update debian/rules and debian/seamonkey-browser.links
* Fix broken chrome.d files and clean-up install rules
  - update debian/rules
  - update debian/seamonkey-browser.{install,dirs}
  - update debian/seamonkey-chatzilla.install
  - update debian/seamonkey-dom-inspector.install
  - update debian/seamonkey-mailnews.install
* Update bug link and README to point Seamonkey toward Ubuntu 
  - update debian/about_debian.js
  - debian/README.Debian
* Fix FTBFS on amd64 (don't depend on arch indep rules for binary
  packages
  - update debian/rules
  - update debian/seamonkey-browser.install
  - update debian/seamonkey-chatzilla.install
  - update debian/seamonkey-dom-inspector.install
  - update debian/seamonkey-mailnews.install
* Update to upstream release 1.1.6 (from 1.1.4)
  - update debian/control
  - Security fixes provided by 1.1.5:
    MFSA 2007-36, MFSA 2007-35, MFSA 2007-34, MFSA 2007-33, MFSA 2007-32,
    MFSA 2007-31, MFSA 2007-30, MFSA 2007-29 and MFSA 2007-28.
* Update diverged patches:
  - update debian/patches/35_theme_switch.patch
  - debian/patches/38_kbsd.patch
  - debian/patches/68_mips_performance.patch
  - debian/patches/99_configure.patch
* Update Maintainer to Ubuntu Mozilla Team
  - update debian/control
* Conflicts/Replaces iceape
  - update debian/control
* Fix nss links not installed where CDBS would have done it
  - update debian/rules
* Remove bin-only files from upstream tarball using debian/remove.binonly.sh.
  Add a nobinonly target in debian/rules to clean up the current tarball,
  preserve logs in mozilla/REMOVED+nobinonly.txt.
  - rename and update debian/remove.nonfree => debian/remove.binonly.sh
  - update debian/rules
* Fix desktop files to make desktop-file-validate happy
  - update debian/menu_dir/*.desktop
* Disable all desktop files except seamonkey.desktop, using the icon
  from branding (instead of the old style Mozilla one)
  - update debian/menu_dir/*.desktop
  - update debian/rules
* Add dummy packages for migration of iceape and mozilla packages:
  mozilla, mozilla-browser, mozilla-dev, mozilla-mailnews, mozilla-chatzilla,
  mozilla-psm, mozilla-dom-inspector, mozilla-js-debugger, mozilla-calendar,
  iceape, iceape-browser, iceape-gnome-support, iceape-dev, iceape-dbg,
  iceape-mailnews, iceape-chatzilla, iceape-calendar and iceape-dom-inspector
  - update debian/control
* Merge DSP settings from previously installed /etc/iceape/iceaperc or
  /etc/mozilla/mozillarc into /etc/seamonkey/seamonkeyrc
  - update debian/seamonkey-browser.preinst
* Remove leftovers from iceape packages
  - add debian/iceape-browser.postrm
  - add debian/iceape-browser.preinst
* Re-install /etc/seamonkey files previously disabled
  - update debian/seamonkey-browser.install
* Add missing 'upgrade' target to preinst script
  - update debian/iceape-browser.preinst
* Exclude CVS stuff when doing nobinonly tarballs
  - update debian/rules
* Fix a recent FTBFS in hardy where gtk+ is no longer bringing
  some X libs in build-deps
  - add debian/patches/13_bz344818_att264996.patch
  - update debian/patches/99_configure.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
 
 
3
# Uncomment this to turn on verbose mode.
 
4
#export DH_VERBOSE=1
 
5
 
 
6
# These are used for cross-compiling and for saving the configure script
 
7
# from having to guess our platform (since we know it already)
 
8
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
9
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
10
DEB_BUILD_ARCH  ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
11
 
 
12
DEB_MOZ_APPLICATION=seamonkey
 
13
NOBINONLY=nobinonly
 
14
 
 
15
EXCLUDE := --exclude=CVS --exclude=.cvsignore
 
16
 
 
17
DEBIAN_VERSION  := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\(.*\)$$/\1/ p')
 
18
DEBIAN_REV_CODE := $(shell echo $(DEBIAN_VERSION) | sed 's/^.*-\([0-9]*\)[^-]*$$/0\1/ ; s/^.*\(..\)$$/\1/')
 
19
MOZILLA_VERSION := $(shell echo $(DEBIAN_VERSION) | sed 's/-.*//; s/\+$(NOBINONLY)//')
 
20
 
 
21
BUILD_DATE=$(shell perl -e '($$s,$$m,$$h,$$d,$$M,$$y) = gmtime((stat("client.mk"))[9]); printf "%04d%02d%02d\n",$$y + 1900,$$M + 1,$$d;')
 
22
 
 
23
export BUILD_OFFICIAL=1
 
24
export MOZ_BUILD_DATE=$(BUILD_DATE)$(DEBIAN_REV_CODE)
 
25
 
 
26
CFLAGS = -Wall -pipe
 
27
 
 
28
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
29
        OPTFLAGS = -O0
 
30
else
 
31
        OPTFLAGS = -O2 -fno-strict-aliasing
 
32
endif
 
33
 
 
34
# we are modern and build with 4.2 everywhere
 
35
CXX=g++-4.2
 
36
CC=gcc-4.2
 
37
export CXX CC
 
38
 
 
39
OPTFLAGS += -g
 
40
 
 
41
DEB_DH_INSTALL_SOURCEDIR := debian/tmp
 
42
 
 
43
include /usr/share/cdbs/1/rules/debhelper.mk
 
44
include /usr/share/cdbs/1/class/autotools.mk
 
45
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 
46
 
 
47
ifeq ($(DEB_BUILD_ARCH),ppc64)
 
48
       OPTFLAGS = -mminimal-toc
 
49
endif
 
50
 
 
51
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 
52
        DEBUGFLAGS = --enable-debug
 
53
endif
 
54
 
 
55
# Let's give it a try without that
 
56
#ifneq ($(DEB_BUILD_ARCH),mips)
 
57
#ifneq ($(DEB_BUILD_ARCH),mipsel)
 
58
#       CONFIGURE_OPTIONS = --enable-static --disable-shared
 
59
#endif
 
60
#endif
 
61
 
 
62
SHELL=/bin/bash # I use bashisms
 
63
 
 
64
DEB_MAKE_BUILD_TARGET = BUILD_MODULES=all
 
65
# DEB_MAKE_CLEAN_TARGET = clean distclean
 
66
 
 
67
DEB_SRCDIR := .
 
68
 
 
69
TMP_DIR  = $(DEB_SRCDIR)/debian/tmp
 
70
APPLICATIONS_DIR = $(TMP_DIR)/usr/share/applications
 
71
DIST = $(DEB_SRCDIR)/dist
 
72
 
 
73
LDFLAGS = -Wl,--as-needed
 
74
 
 
75
DEB_CONFIGURE_USER_FLAGS= \
 
76
        --enable-application=suite \
 
77
        --with-distribution-id=org.debian \
 
78
        --prefix=/usr \
 
79
        --with-default-mozilla-five-home=/usr/lib/$(DEB_MOZ_APPLICATION) \
 
80
        --enable-default-toolkit=gtk2 \
 
81
        --enable-pango \
 
82
        --enable-xft \
 
83
        --disable-freetype2 \
 
84
        --enable-system-cairo \
 
85
        --with-system-png \
 
86
        --with-system-jpeg \
 
87
        --with-system-zlib \
 
88
        --with-system-nss \
 
89
        --with-system-nspr \
 
90
        --enable-xinerama \
 
91
        --enable-svg \
 
92
        --enable-svg-renderer=cairo \
 
93
        --enable-mathml \
 
94
        --disable-pedantic \
 
95
        --disable-long-long-warning \
 
96
        --enable-gnomevfs \
 
97
        --enable-gnomeui \
 
98
        --disable-tests \
 
99
        --disable-debug \
 
100
        --enable-canvas \
 
101
        --enable-extensions=default,-venkman \
 
102
        --disable-installer \
 
103
        --disable-javaxpcom \
 
104
        --disable-elf-dynstr-gc \
 
105
        --disable-strip \
 
106
        --disable-xprint \
 
107
        --enable-system-myspell \
 
108
        --enable-crypto \
 
109
        $(NULL)
 
110
 
 
111
clean::
 
112
        rm -f MPL
 
113
 
 
114
define DO_CHROME
 
115
        install -d -m 755 $(DEB_SRCDIR)/debian/$(1)/var/lib/$(DEB_MOZ_APPLICATION)/chrome.d ;
 
116
        JARS=`grep -E 'usr/share/$(DEB_MOZ_APPLICATION)/chrome$$' debian/$(1).install | grep -v ^# | awk '{ print $$1 }'` ; \
 
117
        ( for file in `(cd $(TMP_DIR) ; ls $$JARS)` ; do \
 
118
         APP=chrome/`basename $$file` ; \
 
119
         grep $$APP $(TMP_DIR)/usr/lib/$(DEB_MOZ_APPLICATION)/chrome/installed-chrome.txt ; \
 
120
        done ) > $(DEB_SRCDIR)/debian/$(1)/var/lib/$(DEB_MOZ_APPLICATION)/chrome.d/00$(subst $(DEB_MOZ_APPLICATION)-,,$(1)) 
 
121
endef
 
122
 
 
123
install/$(DEB_MOZ_APPLICATION)-browser::
 
124
        install -d -m 755 $(TMP_DIR)/usr/share/applications
 
125
        install -m 644 $(DEB_SRCDIR)/debian/menu_dir/$(DEB_MOZ_APPLICATION).desktop $(TMP_DIR)/usr/share/applications
 
126
        install -m 644 $(DEB_SRCDIR)/debian/menu_dir/$(DEB_MOZ_APPLICATION)-navigator.desktop $(TMP_DIR)/usr/share/applications
 
127
        install -m 644 $(DEB_SRCDIR)/debian/menu_dir/$(DEB_MOZ_APPLICATION)-composer.desktop $(TMP_DIR)/usr/share/applications
 
128
 
 
129
        install -d -m 755 $(TMP_DIR)/usr/share/pixmaps
 
130
        install -m 644 $(DEB_SRCDIR)/suite/branding/icons/gtk/default.xpm $(TMP_DIR)/usr/share/pixmaps/$(DEB_MOZ_APPLICATION).xpm
 
131
        install -m 644 $(DEB_SRCDIR)/xpfe/bootstrap/icons/gtk/editorWindow.xpm $(TMP_DIR)/usr/share/pixmaps/$(DEB_MOZ_APPLICATION)-composer.xpm
 
132
        
 
133
        ( cd debian/extras && uudecode *.uue )
 
134
        install -d -m 755 $(TMP_DIR)/usr/share/$(DEB_MOZ_APPLICATION)/searchplugins
 
135
        install -m 644 $(DEB_SRCDIR)/debian/extras/*.src $(DEB_SRCDIR)/debian/extras/*.gif $(TMP_DIR)/usr/share/$(DEB_MOZ_APPLICATION)/searchplugins
 
136
 
 
137
        install -d -m 755 $(TMP_DIR)/usr/bin
 
138
        install -m 755 $(DEB_SRCDIR)/debian/$(DEB_MOZ_APPLICATION)-runner $(TMP_DIR)/usr/bin/$(DEB_MOZ_APPLICATION)
 
139
 
 
140
        install -d -m 755 $(TMP_DIR)/usr/sbin
 
141
        install -m 755 $(DEB_SRCDIR)/debian/update-*-chrome $(TMP_DIR)/usr/sbin
 
142
 
 
143
        install -d -m 755 $(TMP_DIR)/usr/lib/$(DEB_MOZ_APPLICATION)
 
144
        install -m 644 $(DEB_SRCDIR)/dist/bin/.autoreg $(DEB_SRCDIR)/debian/$(DEB_MOZ_APPLICATION).cfg $(TMP_DIR)/usr/lib/$(DEB_MOZ_APPLICATION)
 
145
 
 
146
        install -d -m 755 $(TMP_DIR)/etc/$(DEB_MOZ_APPLICATION)/pref
 
147
        install -m 644 $(DEB_SRCDIR)/debian/base.js $(TMP_DIR)/etc/$(DEB_MOZ_APPLICATION)/pref
 
148
        install -m 644 $(DEB_SRCDIR)/debian/$(DEB_MOZ_APPLICATION)rc $(TMP_DIR)/etc/$(DEB_MOZ_APPLICATION)
 
149
 
 
150
        install -d -m 755 $(TMP_DIR)/usr/share/$(DEB_MOZ_APPLICATION)/defaults/pref
 
151
        (echo "// Debian package version" ; \
 
152
         echo "pref(\"general.useragent.product\",\"Gecko\");" ; \
 
153
         echo "pref(\"general.useragent.productSub\",\"$(BUILD_DATE)\");" ; \
 
154
         echo "pref(\"general.useragent.extra.$(DEB_MOZ_APPLICATION)Comment\",\"(Ubuntu-$(DEBIAN_VERSION))\");" ; \
 
155
        ) > $(TMP_DIR)/usr/lib/$(DEB_MOZ_APPLICATION)/defaults/pref/vendor.js
 
156
 
 
157
        install -d -m 755 $(TMP_DIR)/usr/lib/$(DEB_MOZ_APPLICATION)/components
 
158
        install -m 644 $(DEB_SRCDIR)/debian/homepagereset.js $(DEB_SRCDIR)/debian/about_debian.js $(TMP_DIR)/usr/lib/$(DEB_MOZ_APPLICATION)/components
 
159
        
 
160
        $(call DO_CHROME,$(DEB_MOZ_APPLICATION)-browser) 
 
161
        grep -v \\.jar $(TMP_DIR)/usr/lib/$(DEB_MOZ_APPLICATION)/chrome/installed-chrome.txt >> $(DEB_SRCDIR)/debian/$(DEB_MOZ_APPLICATION)-browser/var/lib/$(DEB_MOZ_APPLICATION)/chrome.d/00browser
 
162
        
 
163
        cp -f LICENSE MPL
 
164
 
 
165
install/$(DEB_MOZ_APPLICATION)-chatzilla::
 
166
        install -d -m 755 $(TMP_DIR)/usr/share/applications
 
167
        install -m 644 $(DEB_SRCDIR)/debian/menu_dir/chatzilla.desktop $(TMP_DIR)/usr/share/applications
 
168
 
 
169
        install -d -m 755 $(TMP_DIR)/usr/share/pixmaps
 
170
        install -m 644 $(DEB_SRCDIR)/xpfe/bootstrap/icons/gtk/chatzilla-window.xpm $(TMP_DIR)/usr/share/pixmaps/chatzilla.xpm
 
171
 
 
172
        $(call DO_CHROME,$(DEB_MOZ_APPLICATION)-chatzilla)
 
173
 
 
174
install/$(DEB_MOZ_APPLICATION)-mailnews::
 
175
        install -d -m 755 $(TMP_DIR)/usr/share/applications
 
176
        install -m 644 $(DEB_SRCDIR)/debian/menu_dir/$(DEB_MOZ_APPLICATION)-mail-compose.desktop $(TMP_DIR)/usr/share/applications
 
177
        install -m 644 $(DEB_SRCDIR)/debian/menu_dir/$(DEB_MOZ_APPLICATION)-mailnews.desktop $(TMP_DIR)/usr/share/applications
 
178
        install -m 644 $(DEB_SRCDIR)/debian/menu_dir/$(DEB_MOZ_APPLICATION)-addressbook.desktop $(TMP_DIR)/usr/share/applications
 
179
 
 
180
        install -d -m 755 $(TMP_DIR)/usr/share/pixmaps
 
181
        install -m 644 $(DEB_SRCDIR)/xpfe/bootstrap/icons/gtk/addressbookWindow.xpm $(TMP_DIR)/usr/share/pixmaps/$(DEB_MOZ_APPLICATION)-addressbook.xpm
 
182
        install -m 644 $(DEB_SRCDIR)/xpfe/bootstrap/icons/gtk/messengerWindow.xpm $(TMP_DIR)/usr/share/pixmaps/$(DEB_MOZ_APPLICATION)-mailnews.xpm
 
183
        install -m 644 $(DEB_SRCDIR)/xpfe/bootstrap/icons/gtk/msgcomposeWindow.xpm $(TMP_DIR)/usr/share/pixmaps/$(DEB_MOZ_APPLICATION)-mail-compose.xpm
 
184
 
 
185
        $(call DO_CHROME,$(DEB_MOZ_APPLICATION)-mailnews)
 
186
 
 
187
install/$(DEB_MOZ_APPLICATION)-dom-inspector::
 
188
        $(call DO_CHROME,$(DEB_MOZ_APPLICATION)-dom-inspector)
 
189
 
 
190
binary-install/$(DEB_MOZ_APPLICATION)-browser::
 
191
        dh_link -p$(DEB_MOZ_APPLICATION)-browser usr/lib/nss/libnssckbi.so /usr/lib/$(DEB_MOZ_APPLICATION)/libnssckbi.so
 
192
        for lib in ssl3 softokn3 smime3 nss3 nspr4 plc4 plds4; do \
 
193
         dh_link -p$(DEB_MOZ_APPLICATION)-browser usr/lib/lib$$lib.so.0d /usr/lib/$(DEB_MOZ_APPLICATION)/lib$$lib.so ; \
 
194
        done
 
195
 
 
196
$(NOBINONLY): ../tarballs/$(DEB_MOZ_APPLICATION)_$(MOZILLA_VERSION).orig.tar.gz
 
197
        @set -e ; \
 
198
        echo "Cleaning $(DEB_MOZ_APPLICATION)_$(MOZILLA_VERSION).orig.tar.gz using remove.binonly.sh ..." ; \
 
199
        rm -f ../tarballs/$(DEB_MOZ_APPLICATION)_$(MOZILLA_VERSION)+$(NOBINONLY).orig.tar.gz ; \
 
200
        mkdir $(NOBINONLY).tmp ; \
 
201
        ( cd $(NOBINONLY).tmp ; \
 
202
          tar zxf ../../tarballs/$(DEB_MOZ_APPLICATION)_$(MOZILLA_VERSION).orig.tar.gz ; \
 
203
          sh ../debian/remove.binonly.sh > mozilla/REMOVED+$(NOBINONLY).txt 2>&1 ; \
 
204
          tar zcf ../../tarballs/$(DEB_MOZ_APPLICATION)_$(MOZILLA_VERSION)+$(NOBINONLY).orig.tar.gz $(EXCLUDE) mozilla ) ; \
 
205
        rm -rf $(NOBINONLY).tmp ; \
 
206
        ls -l ../tarballs/$(DEB_MOZ_APPLICATION)_$(MOZILLA_VERSION).orig.tar.gz ; \
 
207
        ls -l ../tarballs/$(DEB_MOZ_APPLICATION)_$(MOZILLA_VERSION)+$(NOBINONLY).orig.tar.gz
 
208
 
 
209
.PHONY: source