~mozillateam/firefox/firefox-3.0.dev

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Alexander Sack
  • Date: 2008-09-02 11:40:55 UTC
  • mfrom: (117.8.10 firefox-3.0.head)
  • Revision ID: asac@jwsdot.com-20080902114055-0s1ic9y7b3x8u4r6
MERGE: RELEASE 3.0.2+build3+nobinonly-0ubuntu1 to ubuntu/intrepid from firefox-3.0.head branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
FORCE_OFFICIAL_BRANDING = 1
27
27
 
 
28
BRANDING_NAME_OTHER := awesome-browser
 
29
DEBIAN_NAME_OTHER := webbrowser-3.0
 
30
 
 
31
DESKTOP  = $(DEBIAN_NAME_OTHER).desktop
28
32
ifneq (,$(FORCE_OFFICIAL_BRANDING))
29
33
        # official branding for beta, final and final RCs builds
30
34
        BRANDING = --enable-official-branding
31
 
        DESKTOP  = $(DEBIAN_NAME)-final.desktop
 
35
        DESKTOP_BRANDED  = $(DEBIAN_NAME)-final.desktop
32
36
else
33
37
# Change branding based on Version
34
38
ifneq (,$(findstring ~cvs,$(DEBIAN_VERSION)))
35
39
        # minefield branding for cvs snapshots
36
40
        BRANDING = $(NULL)
37
 
        DESKTOP  = $(DEBIAN_NAME)-minefield.desktop
 
41
        DESKTOP_BRANDED  = $(DEBIAN_NAME)-minefield.desktop
38
42
else
39
43
ifneq (,$(findstring ~a,$(DEBIAN_VERSION)))
40
44
        # codename branding for alpha builds
41
45
        BRANDING = --with-branding=browser/branding/unofficial
42
 
        DESKTOP  = $(DEBIAN_NAME)-granparadiso.desktop
 
46
        DESKTOP_BRANDED  = $(DEBIAN_NAME)-granparadiso.desktop
43
47
else
44
48
        # official branding for beta, final and final RCs builds
45
49
        BRANDING = --enable-official-branding
46
 
        DESKTOP  = $(DEBIAN_NAME)-final.desktop
 
50
        DESKTOP_BRANDED  = $(DEBIAN_NAME)-final.desktop
47
51
endif
48
52
endif
49
53
endif
53
57
MOZ_TRANSLATION_AUTO_XPI_SEARCHDIRS := debian/$(DEBIAN_NAME)
54
58
MOZ_TRANSLATION_AUTO_XPI_LOCALE := en-US
55
59
 
56
 
# workaround multiple crashes in Intrepid caused by Intrepid shipping gcc 4.3
57
 
# with -D_FORTIFY_SOURCE=2 by default
58
 
CPPFLAGS=-U_FORTIFY_SOURCE
59
 
export CPPFLAGS
60
 
$(warning export CPPFLAGS=$(CPPFLAGS))
61
 
 
62
60
DEB_AUTO_UPDATE_AUTOCONF=2.13
63
61
 
64
62
include /usr/share/cdbs/1/rules/tarball.mk
159
157
debian/migrator/ffox-3-beta-profile-migration-dialog: debian/migrator/main.c
160
158
        $(CC) $(CFLAGS) -o $@ $< $(shell pkg-config --cflags --libs gtk+-2.0)
161
159
 
 
160
BRANDING_MAKEFILES = ../../browser/branding/$(BRANDING_NAME_OTHER)/Makefile \
 
161
        ../../browser/branding/$(BRANDING_NAME_OTHER)/locales/Makefile \
 
162
        ../../browser/branding/$(BRANDING_NAME_OTHER)/content/Makefile \
 
163
        $(NULL)
 
164
 
 
165
common-build-arch::
 
166
        cd build-tree/mozilla/browser/locales/; \
 
167
                $(MAKE) SUBMAKEFILES="$(BRANDING_MAKEFILES)" $(BRANDING_MAKEFILES)
 
168
        cd build-tree/mozilla/browser/locales/; \
 
169
                $(MAKE) -C ../../browser/branding/$(BRANDING_NAME_OTHER)/content/; \
 
170
                $(MAKE) -C ../../browser/branding/$(BRANDING_NAME_OTHER)/locales/
 
171
 
 
172
common-post-build-arch::
 
173
        cd build-tree/mozilla/; \
 
174
                mkdir -p $(CURDIR)/debian/tmp-$(DEBIAN_NAME)-branding/; \
 
175
                $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp-$(DEBIAN_NAME)-branding/
 
176
        cd build-tree/mozilla/browser/locales/; \
 
177
                $(MAKE) -C ../../browser/branding/$(BRANDING_NAME_OTHER)/
 
178
        cd build-tree/mozilla/; \
 
179
                mkdir -p $(CURDIR)/debian/tmp-$(DEBIAN_NAME_OTHER)-branding/; \
 
180
                $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp-$(DEBIAN_NAME_OTHER)-branding/
 
181
        
162
182
binary-install/$(DEBIAN_NAME)::
 
183
        rm -rf debian/$(DEBIAN_NAME)/$(DEBIAN_FF3_DIR)/icons
 
184
        rm -rf debian/$(DEBIAN_NAME)/$(DEBIAN_FF3_DIR)/chrome/icons
 
185
        dh_install -p$(DEBIAN_NAME) \
 
186
                debian/tmp-$(DEBIAN_NAME_OTHER)-branding/$(DEBIAN_FF3_DIR)/chrome/classic.* \
 
187
                debian/tmp-$(DEBIAN_NAME_OTHER)-branding/$(DEBIAN_FF3_DIR)/chrome/en-US.* \
 
188
                debian/tmp-$(DEBIAN_NAME_OTHER)-branding/$(DEBIAN_FF3_DIR)/chrome/browser.* \
 
189
                        $(DEBIAN_FF3_DIR)/chrome
163
190
        touch debian/$(DEBIAN_NAME)/$(DEBIAN_FF3_DIR)/.autoreg
164
191
        if [ -d debian/$(DEBIAN_NAME)/usr/lib/xulrunner-addons/extensions ] ; then \
165
192
          touch $(foreach dir,$(wildcard debian/$(DEBIAN_NAME)/usr/lib/xulrunner-addons/extensions/*),$(dir)/chrome.manifest) ; \
175
202
        dh_link etc/$(DEBIAN_NAME)/pref $(DEBIAN_FF3_DIR)/defaults/syspref
176
203
        dh_link etc/$(DEBIAN_NAME)/profile $(DEBIAN_FF3_DIR)/defaults/profile
177
204
        dh_link $(DEBIAN_FF3_DIR)/icons/mozicon128.png usr/share/pixmaps/$(DEBIAN_NAME).png
 
205
        dh_link $(DEBIAN_FF3_DIR)/icons/mozicon128.png usr/share/pixmaps/$(DEBIAN_NAME_OTHER).png
178
206
        dh_link usr/share/myspell/dicts $(DEBIAN_FF3_DIR)/dictionaries
179
 
 
180
 
binary-install/firefox-3.0::
181
 
        cat debian/ubuntu-useragent.js.tmpl | sed \
 
207
        rm -f debian/$(DEBIAN_NAME)/$(DEBIAN_FF3_DIR)/chrome/browser-branding*
 
208
 
 
209
binary-install/$(DEBIAN_NAME_OTHER)-branding::
 
210
        dh_install -p$(DEBIAN_NAME_OTHER)-branding \
 
211
                debian/tmp-$(DEBIAN_NAME_OTHER)-branding/$(DEBIAN_FF3_DIR)/icons $(DEBIAN_FF3_DIR)
 
212
        dh_install -p$(DEBIAN_NAME_OTHER)-branding \
 
213
                debian/tmp-$(DEBIAN_NAME_OTHER)-branding/$(DEBIAN_FF3_DIR)/chrome/icons $(DEBIAN_FF3_DIR)/chrome
 
214
        dh_install -p$(DEBIAN_NAME_OTHER)-branding \
 
215
                debian/tmp-$(DEBIAN_NAME_OTHER)-branding/$(DEBIAN_FF3_DIR)/chrome/awesome-* $(DEBIAN_FF3_DIR)/chrome/
 
216
        mkdir -p debian/$(DEBIAN_NAME_OTHER)-branding/usr/share/applications/
 
217
        cp -f debian/$(DESKTOP) \
 
218
                debian/$(DEBIAN_NAME_OTHER)-branding/usr/share/applications/$(DEBIAN_APP_NAME).desktop
 
219
 
 
220
binary-install/$(DEBIAN_NAME)-branding::
 
221
        rm -rf debian/$(DEBIAN_NAME)-branding/$(DEBIAN_FF3_DIR)/icons
 
222
        rm -rf debian/$(DEBIAN_NAME)-branding/$(DEBIAN_FF3_DIR)/chrome/icons
 
223
        dh_install -p$(DEBIAN_NAME)-branding \
 
224
                debian/tmp-$(DEBIAN_NAME)-branding/$(DEBIAN_FF3_DIR)/chrome/browser-branding* $(DEBIAN_FF3_DIR)/chrome
 
225
        dh_install -p$(DEBIAN_NAME)-branding \
 
226
                debian/tmp-$(DEBIAN_NAME)-branding/$(DEBIAN_FF3_DIR)/icons $(DEBIAN_FF3_DIR)
 
227
        dh_install -p$(DEBIAN_NAME)-branding \
 
228
                debian/tmp-$(DEBIAN_NAME)-branding/$(DEBIAN_FF3_DIR)/chrome/icons $(DEBIAN_FF3_DIR)/chrome
 
229
        mkdir -p debian/$(DEBIAN_NAME)-branding/usr/share/applications/
 
230
        cp -f debian/$(DESKTOP_BRANDED) \
 
231
                debian/$(DEBIAN_NAME)-branding/usr/share/applications/$(DEBIAN_APP_NAME).desktop
 
232
 
 
233
binary-install/$(DEBIAN_NAME):: debian/$(DEBIAN_NAME)/$(DEBIAN_FF3_DIR)/defaults/preferences/ubuntu-useragent.js
 
234
 
 
235
debian/$(DEBIAN_NAME)/$(DEBIAN_FF3_DIR)/defaults/preferences/ubuntu-useragent.js: debian/ubuntu-useragent.js.tmpl
 
236
        sed \
182
237
                -e 's/@VENDOR@/'`lsb_release -i -s`'/g' \
183
238
                -e 's/@VENDOR_SUB@/'`lsb_release -r -s`'/g' \
184
239
                -e 's/@VENDOR_COMMENT@/'`lsb_release -c -s`'/g' \
185
 
        > debian/firefox-3.0/$(DEBIAN_FF3_DIR)/defaults/preferences/ubuntu-useragent.js
 
240
                < $< > $@
186
241
 
187
242
LOCALE_VERSION = $(shell echo $(DEBIAN_VERSION) | sed -e 's/~cvs.*/pre/' | tr -d '~')
188
243
 
197
252
        $(error EM_TRANSLATION_VERSION=$(EM_TRANSLATION_VERSION) LOCALE_VERSION=$(LOCALE_VERSION). You need to explicitly adjust the translation version and min/max bounds.)
198
253
endif
199
254
 
200
 
binary-post-install/firefox-3.0::
201
 
        sed -i -e 's/^MaxVersion=.*/MaxVersion=1.9.0.*/' debian/firefox-3.0/$(DEBIAN_FF3_DIR)/application.ini
202
 
        sed -i -e 's/^MinVersion=.*/MinVersion=1.9.0.1/' debian/firefox-3.0/$(DEBIAN_FF3_DIR)/application.ini
 
255
binary-post-install/$(DEBIAN_NAME)::
 
256
        sed -i \
 
257
                -e 's/^MaxVersion=.*/MaxVersion=1.9.0.*/' \
 
258
                -e 's/^MinVersion=.*/MinVersion=1.9.0.1/' \
 
259
                debian/$(DEBIAN_NAME)/$(DEBIAN_FF3_DIR)/application.ini
203
260
 
204
261
pre-build:: $(subst_files) debian/migrator/ffox-3-beta-profile-migration-dialog
205
262
        set -e; for i in $(UUDECODE); do \