~ubuntu-branches/ubuntu/precise/firefox/precise-security

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-03-13 14:05:38 UTC
  • mfrom: (1.1.80)
  • Revision ID: package-import@ubuntu.com-20120313140538-ph22lhmwrd037tw5
Tags: 11.0+build1-0ubuntu1
* New upstream stable release (FIREFOX_11_0_BUILD1)

* Clean up search plugin installation now that we build our own
  language packs:
  - Drop the recursive symlink from /usr/lib/firefox-addons/searchplugins,
    which lintian kept complaining about
  - Don't effectively symlink distribution/searchplugins to searchplugins,
    as they have different layouts and this avoids the same data being
    iterated over twice
  - Revert to the upstream layout in distribution/searchplugins
  - Simplify distro-locale-searchplugins.patch, as we don't need to swap the
    loading order of common / locale-specific searchplugin paths now.
    $LIBDIR/distribution/searchplugins/common is no longer a symlink
    to $LIBDIR/searchplugins, so there is no need to have the ability for
    locale-specific plugins to override common ones. They already override
    those in $LIBDIR/searchplugins
    - add debian/firefox-locale.preinst.in, which will end up in all
      language packs to assist the symlink -> folder transition
    - update debian/firefox.dirs.in
    - update debian/firefox.install.in
    - update debian/firefox.links.in
    - update debian/firefox.preinst.in
    - update debian/patches/distro-locale-searchplugins.patch
    - update debian/rules
* Fix LP: #807733 - Firefox doesn't restart after upgrades where the version
  changes. Don't include the version number in the install path, as Firefox
  cannot re-exec itself. In doing this, we also move the distribution.ini
  back in to our installation directory, as that never made sense in
  /usr/lib/firefox-addons
  - update debian/firefox-dev.install.in
  - update debian/firefox-dev.links.in
  - update debian/firefox-locale.preinst.in
  - update debian/firefox.lintian-overrides.in
  - update debian/firefox.preinst.in
  - update debian/rules
* Expose distribution/extensions in /usr/lib/firefox-addons, to allow
  administrators to add extensions that they want to add to default user
  profiles, and that they want the addon manager to keep updated. We lost
  this functionality when upgrading from Firefox 3.6, due to the loss of
  /etc/firefox/profile
  - update debian/firefox.dirs.in
  - update debian/firefox.install.in
  - update debian/firefox.links.in
  - update debian/firefox.postinst.in

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
 
96
96
MOZ_VERSION             = $(shell cat $(DEB_BUILDDIR)/browser/config/version.txt)
97
97
MOZ_PREFIX              := /usr
98
 
MOZ_LIBDIR              = $(MOZ_PREFIX)/lib/$(MOZ_APP_NAME)-$(MOZ_VERSION)
99
 
MOZ_INCDIR              = $(MOZ_PREFIX)/include/$(MOZ_APP_NAME)-$(MOZ_VERSION)
100
 
MOZ_IDLDIR              = $(MOZ_PREFIX)/share/idl/$(MOZ_APP_NAME)-$(MOZ_VERSION)
101
 
MOZ_SDKDIR              = $(MOZ_PREFIX)/lib/$(MOZ_APP_NAME)-devel-$(MOZ_VERSION)
 
98
MOZ_LIBDIR              = $(MOZ_PREFIX)/lib/$(MOZ_APP_NAME)
 
99
MOZ_INCDIR              = $(MOZ_PREFIX)/include/$(MOZ_APP_NAME)
 
100
MOZ_IDLDIR              = $(MOZ_PREFIX)/share/idl/$(MOZ_APP_NAME)
 
101
MOZ_SDKDIR              = $(MOZ_PREFIX)/lib/$(MOZ_APP_NAME)-devel
102
102
 
103
103
NSPR_DEPENDS            := $(NULL)
104
104
NSS_DEPENDS             := $(NULL)
189
189
else
190
190
        MOZ_SYSTEM_DICTDIR = /usr/share/myspell/dicts
191
191
endif
 
192
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -eq "1110" && echo "1"))
 
193
        DIST_SEARCHPLUGIN_DIR = usr/lib/$(MOZ_APP_NAME)-addons/distribution/searchplugins
 
194
else
 
195
        DIST_SEARCHPLUGIN_DIR = usr/lib/$(MOZ_APP_NAME)/distribution/searchplugins
 
196
endif
192
197
export MOZCONFIG=$(CURDIR)/debian/config/mozconfig
193
198
ifneq (1,$(MOZ_BUILD_UNOFFICIAL))
194
199
        export BUILD_OFFICIAL=1
199
204
endif
200
205
 
201
206
ifeq ($(MOZ_APP_BASENAME), $(MOZ_APP_NAME))
 
207
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -eq "1004" && echo "1"))
 
208
PLUGIN_BREAKS := flashplugin-installer (<= 11.1.102.63ubuntu0.10.04.1), adobe-flashplugin (<= 11.1.102.63-0lucid1)
 
209
PLUGIN_CONFLICTS := gcu-plugin (<= 0.10.12-2ubuntu1), gecko-mediaplayer (<= 0.9.9.2-1ubuntu0.10.04.1), \
 
210
                    mozilla-gtk-vnc (<= 0.3.10-2ubuntu2.1), mozilla-opensc  (<= 0.11.12-1ubuntu3.2), \
 
211
                    mozilla-plugin-pcmanx (<= 0.3.9-2ubuntu2), mozplugger (<= 1.13.3-1ubuntu1), \
 
212
                    xine-plugin (<= 1.0.2-1ubuntu2), mozilla-virt-viewer (<= 0.0.3-6ubuntu7.xul191.1)
 
213
else
 
214
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -eq "1010" && echo "1"))
 
215
PLUGIN_BREAKS := flashplugin-installer (<= 11.1.102.63ubuntu0.10.10.1), adobe-flashplugin (<= 11.1.102.63-0maverick1)
 
216
PLUGIN_CONFLICTS := gcu-plugin (<= 0.12.3-1), gecko-mediaplayer (<= 0.9.9.2-1ubuntu0.10.10.1), \
 
217
                    mozilla-gtk-vnc (<= 0.4.1-3ubuntu2), mozilla-opensc (<= 0.11.13-1ubuntu2.1), \
 
218
                    mozilla-plugin-pcmanx (<= 0.3.9-2ubuntu2), mozplugger (<= 1.14.1-2~exp3ubuntu1), \
 
219
                    xine-plugin (<= 1.0.2-2ubuntu1)
 
220
else
 
221
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -eq "1104" && echo "1"))
 
222
PLUGIN_BREAKS := flashplugin-installer (<= 11.1.102.63ubuntu0.11.04.1), adobe-flashplugin (<= 11.1.102.63-0natty1)
 
223
PLUGIN_CONFLICTS := gcu-plugin (<=  0.12.7-1ubuntu1)
 
224
else
 
225
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -eq "1110" && echo "1"))
 
226
PLUGIN_BREAKS := flashplugin-installer (<= 11.1.102.63ubuntu0.11.10.1), adobe-flashplugin (<= 11.1.102.63-0oneiric1)
 
227
PLUGIN_CONFLICTS := gcu-plugin (<= 0.12.8-1ubuntu3)
 
228
else
 
229
PLUGIN_BREAKS := flashplugin-installer (<= 11.1.102.63ubuntu1), adobe-flashplugin (<= 11.1.102.63-0precise1)
 
230
PLUGIN_CONFLICTS := gcu-plugin (<= 0.12.10-1ubuntu1)
 
231
endif
 
232
endif
 
233
endif
 
234
endif
202
235
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -ge "1010" && echo "1"))
203
236
APP_CONTROL_ARGS := -Vapp:Replaces="abrowser, abrowser-branding, firefox-branding, kubuntu-firefox-installer" \
204
237
                    -Vapp:Breaks="abrowser (<= 4.0~b11+build3+nobinonly-0ubuntu1), abrowser-branding (<= 4.0~b11+build3+nobinonly-0ubuntu1), \
205
 
                                  firefox-branding (<= 4.0~b11+build3+nobinonly-0ubuntu1)"
 
238
                                  firefox-branding (<= 4.0~b11+build3+nobinonly-0ubuntu1), $(PLUGIN_BREAKS)" \
 
239
                    -Vapp:Conflicts="$(PLUGIN_CONFLICTS)"
206
240
else
207
241
APP_CONTROL_ARGS := -Vapp:Provides="firefox-3.6, firefox-3.5, firefox-3.0, firefox-2, firefox-2-dom-inspector, firefox-2-libthai" \
208
242
                    -Vapp:Conflicts="firefox-3.6 (<< 3.6~hg20100117r33523), firefox-3.5 (<< 3.6~hg20100117r33523), \
209
243
                                     firefox-3.0 (<< 3.6~hg20100117r33523), firefox-3.6-gnome-support (<< 3.6~hg20100117r33523), \
210
244
                                     firefox-2 (<< 3), firefox-2-libthai (<< 3), firefox-2-dom-inspector (<< 3), \
211
245
                                     abrowser (<= 4.0~b11+build3+nobinonly-0ubuntu1), abrowser-branding (<= 4.0~b11+build3+nobinonly-0ubuntu1), \
212
 
                                     firefox-branding (<= 4.0~b11+build3+nobinonly-0ubuntu1)" \
 
246
                                     firefox-branding (<= 4.0~b11+build3+nobinonly-0ubuntu1), $(PLUGIN_CONFLICTS)" \
213
247
                    -Vapp:Replaces="firefox-3.6, firefox-3.5, firefox-3.0, firefox-3.6-gnome-support, firefox-2, firefox-2-libthai, \
214
 
                                    firefox-2-dom-inspector, abrowser, abrowser-branding, firefox-branding, kubuntu-firefox-installer"
 
248
                                    firefox-2-dom-inspector, abrowser, abrowser-branding, firefox-branding, kubuntu-firefox-installer" \
 
249
                    -Vapp:Breaks="(PLUGIN_BREAKS)"
215
250
DEV_CONTROL_ARGS := -Vdev:Provides="firefox-3.6-dev, firefox-3.5-dev, firefox-3.0-dev, firefox-2-dev" \
216
251
                    -Vdev:Replaces="firefox-3.6-dev, firefox-3.5-dev, firefox-3.0-dev, firefox-2-dev" \
217
252
                    -Vdev:Conflicts="firefox-3.6-dev (<< 3.6~hg20100117r33523+nobinonly), firefox-3.5-dev (<< 3.6~hg20100117r33523), \
300
335
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -ge "1104" && echo "1"))
301
336
        DEB_DEFINES += -DMOZ_NEW_SYSPREF
302
337
endif
303
 
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -ge "1110" && echo "1"))
 
338
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -eq "1110" && echo "1"))
304
339
        DEB_DEFINES += -DMOZ_SYMLINKED_DIST
 
340
else
 
341
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -ge "1204" && echo "1"))
 
342
        DEB_DEFINES += -DMOZ_NO_MORE_SYMLINKED_DIST
 
343
endif
305
344
endif
306
345
ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -lt "1204" && echo "1"))
307
346
        DEB_DEFINES += -DMOZ_LIBXUL_PKGCONFIG
344
383
        debian/$(MOZ_APP_NAME).lintian-overrides \
345
384
        debian/$(MOZ_APP_NAME)-globalmenu.dirs \
346
385
        debian/config/mozconfig \
 
386
        debian/$(MOZ_APP_NAME)-locale.preinst \
347
387
        $(NULL)
348
388
 
349
389
pkgconfig_files = \
399
439
                cp $(CURDIR)/debian/usr.bin.firefox.apparmor.9.10 $(CURDIR)/debian/usr.bin.firefox.in ; \
400
440
        fi
401
441
 
402
 
debian/stamp-buildsymbols: debian/stamp-makefile-build
 
442
make-buildsymbols: debian/stamp-makebuildsymbols
 
443
debian/stamp-makebuildsymbols: debian/stamp-makefile-build
403
444
ifeq (1, $(MOZ_ENABLE_BREAKPAD))
404
445
        # create build symbols
405
446
        cd $(MOZ_OBJDIR); \
411
452
        cp -r $(CURDIR)/debian/compare-locales $(CURDIR)
412
453
        chmod +x $(CURDIR)/compare-locales/scripts/*
413
454
 
414
 
debian/stamp-langpack-xpi-build: compare-locales/scripts/compare-locales
 
455
make-langpack-xpis: debian/stamp-make-langpack-xpis
 
456
debian/stamp-make-langpack-xpis: compare-locales/scripts/compare-locales
415
457
        @echo ""
416
458
        @echo "********************************"
417
459
        @echo "* Building language pack xpi's *"
441
483
 
442
484
        touch $@
443
485
 
444
 
common-build-arch:: debian/stamp-testsuite $(pkgconfig_files)
445
 
 
446
 
common-build-indep:: debian/stamp-langpack-xpi-build
447
 
 
448
 
common-binary-arch:: debian/stamp-buildsymbols
449
 
 
450
 
common-binary-post-install-indep::
451
 
        @echo ""
452
 
        @echo "**********************************"
453
 
        @echo "* Installing language pack xpi's *"
454
 
        @echo "**********************************"
455
 
        @echo ""
456
 
 
457
 
        @while read line ; \
458
 
        do \
459
 
                line=`echo $$line | sed 's/#.*//' | sed '/^$$/d'` ; \
460
 
                if [ ! -z "$$line" ] ; \
 
486
common-build-arch:: run-tests $(pkgconfig_files)
 
487
 
 
488
common-build-indep:: make-langpack-xpis
 
489
 
 
490
common-install-arch common-install-indep::
 
491
        $(foreach dir,$(MOZ_LIBDIR) $(MOZ_INCDIR) $(MOZ_IDLDIR) $(MOZ_SDKDIR), \
 
492
                if [ -d debian/tmp$(dir)-$(MOZ_VERSION) ]; \
461
493
                then \
462
 
                        language=`echo $$line | sed 's/\([^:]*\):*\([^:]*\)/\1/'` ; \
463
 
                        pkgname=`echo $$line | sed 's/\([^:]*\):*\([^:]*\)/\2/'` ; \
464
 
                        id=`python $(CURDIR)/debian/build/get-xpi-id.py $(CURDIR)/$(MOZ_DISTDIR)/linux-$(DEB_HOST_GNU_CPU)/xpi/$(MOZ_APP_NAME)-$(MOZ_VERSION).$${language}.langpack.xpi` ; \
465
 
                        [ $$? -eq 0 ] || exit 1 ; \
466
 
                        echo "Installing $(MOZ_APP_NAME)-$(MOZ_VERSION).$${language}.langpack.xpi to $${id}.xpi in $(MOZ_APP_NAME)-locale-$${pkgname}" ; \
467
 
                        dh_installdirs -p$(MOZ_APP_NAME)-locale-$${pkgname} usr/lib/$(MOZ_APP_NAME)-addons/extensions ; \
468
 
                        cp $(CURDIR)/$(MOZ_DISTDIR)/linux-$(DEB_HOST_GNU_CPU)/xpi/$(MOZ_APP_NAME)-$(MOZ_VERSION).$${language}.langpack.xpi \
469
 
                          $(CURDIR)/debian/$(MOZ_APP_NAME)-locale-$${pkgname}/usr/lib/$(MOZ_APP_NAME)-addons/extensions/$${id}.xpi ; \
470
 
                        dh_installdirs -p$(MOZ_APP_NAME)-locale-$${pkgname} usr/lib/$(MOZ_APP_NAME)-addons/searchplugins/$${language} ; \
471
 
                        cp -r $(CURDIR)/$(MOZ_DISTDIR)/xpi-stage/locale-$${language}/searchplugins/*.xml \
472
 
                          $(CURDIR)/debian/$(MOZ_APP_NAME)-locale-$${pkgname}/usr/lib/$(MOZ_APP_NAME)-addons/searchplugins/$${language}/. ; \
473
 
                fi \
474
 
        done < $(CURDIR)/debian/config/locales.shipped
 
494
                        mv debian/tmp$(dir)-$(MOZ_VERSION) debian/tmp$(dir); \
 
495
                fi; )
 
496
 
 
497
common-binary-arch:: make-buildsymbols
475
498
 
476
499
binary-install/$(MOZ_APP_NAME)::
477
500
ifeq (1,$(MOZ_ENABLE_BREAKPAD))
488
511
GNOME_SUPPORT_FILES = libmozgnome.so libnkgnomevfs.so
489
512
 
490
513
binary-post-install/$(MOZ_APP_NAME)::
491
 
        $(foreach file,$(GNOME_SUPPORT_FILES),rm -fv debian/$(MOZ_APP_NAME)/usr/lib/firefox-*/components/$(file);) true
 
514
        $(foreach file,$(GNOME_SUPPORT_FILES),rm -fv debian/$(MOZ_APP_NAME)$(MOZ_LIBDIR)/components/$(file);) true
492
515
 
493
516
ifeq (1, $(MOZ_TREE_NSPR))
494
517
binary-post-install/$(MOZ_APP_NAME)-dev::
496
519
        dh_link -p$(MOZ_APP_NAME)-dev $(MOZ_INCDIR)/nspr/prcpucfg.h $(MOZ_INCDIR)/nspr/md/_linux.cfg
497
520
endif
498
521
 
 
522
common-binary-post-install-indep::
 
523
        @echo ""
 
524
        @echo "**********************************"
 
525
        @echo "* Installing language pack xpi's *"
 
526
        @echo "**********************************"
 
527
        @echo ""
 
528
 
 
529
        @while read line ; \
 
530
        do \
 
531
                line=`echo $$line | sed 's/#.*//' | sed '/^$$/d'` ; \
 
532
                if [ ! -z "$$line" ] ; \
 
533
                then \
 
534
                        language=`echo $$line | sed 's/\([^:]*\):*\([^:]*\)/\1/'` ; \
 
535
                        pkgname=`echo $$line | sed 's/\([^:]*\):*\([^:]*\)/\2/'` ; \
 
536
                        id=`python $(CURDIR)/debian/build/get-xpi-id.py $(CURDIR)/$(MOZ_DISTDIR)/linux-$(DEB_HOST_GNU_CPU)/xpi/$(MOZ_APP_NAME)-$(MOZ_VERSION).$${language}.langpack.xpi` ; \
 
537
                        [ $$? -eq 0 ] || exit 1 ; \
 
538
                        echo "Installing $(MOZ_APP_NAME)-$(MOZ_VERSION).$${language}.langpack.xpi to $${id}.xpi in $(MOZ_APP_NAME)-locale-$${pkgname}" ; \
 
539
                        dh_installdirs -p$(MOZ_APP_NAME)-locale-$${pkgname} usr/lib/$(MOZ_APP_NAME)-addons/extensions ; \
 
540
                        cp $(CURDIR)/$(MOZ_DISTDIR)/linux-$(DEB_HOST_GNU_CPU)/xpi/$(MOZ_APP_NAME)-$(MOZ_VERSION).$${language}.langpack.xpi \
 
541
                          $(CURDIR)/debian/$(MOZ_APP_NAME)-locale-$${pkgname}/usr/lib/$(MOZ_APP_NAME)-addons/extensions/$${id}.xpi ; \
 
542
                        dh_installdirs -p$(MOZ_APP_NAME)-locale-$${pkgname} $(DIST_SEARCHPLUGIN_DIR)/locale/$${language} ; \
 
543
                        cp -r $(CURDIR)/$(MOZ_DISTDIR)/xpi-stage/locale-$${language}/searchplugins/*.xml \
 
544
                          $(CURDIR)/debian/$(MOZ_APP_NAME)-locale-$${pkgname}/$(DIST_SEARCHPLUGIN_DIR)/locale/$${language}/. ; \
 
545
                fi \
 
546
        done < $(CURDIR)/debian/config/locales.shipped
 
547
 
 
548
common-binary-fixup-indep::
 
549
        @while read line ; \
 
550
        do \
 
551
                line=`echo $$line | sed 's/#.*//' | sed '/^$$/d'` ; \
 
552
                if [ ! -z "$$line" ] ; \
 
553
                then \
 
554
                        pkgname=`echo $$line | sed 's/\([^:]*\):*\([^:]*\)/\2/'` ; \
 
555
                        cp $(CURDIR)/debian/$(MOZ_APP_NAME)-locale.preinst $(CURDIR)/debian/$(MOZ_APP_NAME)-locale-$${pkgname}.preinst ; \
 
556
                fi \
 
557
        done < $(CURDIR)/debian/config/locales.shipped
 
558
 
 
559
ifeq (1, $(MOZ_TREE_NSS))
 
560
binary-predeb/$(MOZ_APP_NAME)::
 
561
        $(foreach lib,libsoftokn3.so libfreebl3.so libnssdbm3.so, \
 
562
                LD_LIBRARY_PATH=debian/$(MOZ_APP_NAME)$(MOZ_LIBDIR):$$LD_LIBRARY_PATH \
 
563
                $(MOZ_DISTDIR)/bin/shlibsign -v -i debian/$(MOZ_APP_NAME)$(MOZ_LIBDIR)/$(lib);)
 
564
endif
 
565
 
499
566
common-binary-predeb-arch::
500
567
        $(foreach file,$(DEBIAN_EXECUTABLES),chmod a+x debian/$(file);)
501
568
        # we want the gnome dependencies not to be in the main package at shlibdeps runtime, hence we dont
502
569
        # install them at binary-install/* stage, but copy them over _after_ the shlibdeps had been generated
503
570
        $(foreach file,$(GNOME_SUPPORT_FILES),mv debian/$(MOZ_APP_NAME)-gnome-support$(MOZ_LIBDIR)/components/$(file) debian/$(MOZ_APP_NAME)$(MOZ_LIBDIR)/components/;) true
504
571
 
505
 
ifeq (1, $(MOZ_TREE_NSS))
506
 
binary-predeb/$(MOZ_APP_NAME)::
507
 
        $(foreach lib,libsoftokn3.so libfreebl3.so libnssdbm3.so, \
508
 
                LD_LIBRARY_PATH=debian/$(MOZ_APP_NAME)$(MOZ_LIBDIR):$$LD_LIBRARY_PATH \
509
 
                $(MOZ_DISTDIR)/bin/shlibsign -v -i debian/$(MOZ_APP_NAME)$(MOZ_LIBDIR)/$(lib);)
510
 
endif
511
 
 
512
572
pre-build:: $(subst_files)
513
573
        cp $(CURDIR)/debian/syspref.js $(CURDIR)/debian/$(MOZ_APP_BASENAME).js
514
574
 
630
690
endif
631
691
        perl $(CURDIR)/debian/build/enable-dist-patches.pl --clean $(CURDIR)/debian/patches/series
632
692
        rm -f $(subst_files)
 
693
        rm -f debian/$(MOZ_APP_NAME)-locale-*.preinst
633
694
        rm -f debian/usr.bin.firefox.in
634
695
        rm -f debian/stamp-*
635
696
        rm -rf debian/l10n-mergedirs