Bug 542696 - Consolidate xulrunner and fennec debs [r=blassey]
authorMark Finkle <mfinkle@mozilla.com>
Wed, 10 Feb 2010 14:58:37 -0500
changeset 66005 60230151cf1e91730bd2cd2a7f59edcb93720e2a
parent 66004 9cb6a4e5392440270afd9f320961152a799556fd
child 66006 1dbb2a7031f22d113054564afef0d34994e931ac
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs542696
Bug 542696 - Consolidate xulrunner and fennec debs [r=blassey]
mobile/default-version.txt
mobile/installer/Makefile.in
mobile/installer/debian/control.in
--- a/mobile/default-version.txt
+++ b/mobile/default-version.txt
@@ -1,1 +1,1 @@
-MOZ_APP_VERSION=1.0pre
+MOZ_APP_VERSION=1.1a2pre
--- a/mobile/installer/Makefile.in
+++ b/mobile/installer/Makefile.in
@@ -74,16 +74,18 @@ DEFINES += \
 	-DBASE64_ICON=$(BASE64_ICON) \
 	-DMOZ_DEB_TIMESTAMP=$(MOZ_DEB_TIMESTAMP) \
 	-DDEB_PKG_VERSION=$(DEB_PKG_VERSION) \
 	$(NULL)
 
 NO_PKG_FILES = \
 	$(MOZ_APP_NAME)-config \
 	$(MOZ_APP_NAME)-bin.elf \
+	xulrunner-config \
+	nspr-config \
 	regchrome* \
 	regxpcom* \
 	xpcshell* \
 	xpidl* \
 	xpt_dump* \
 	xpt_link* \
 	bloaturls.txt \
 	run-mozilla.sh \
@@ -101,33 +103,35 @@ endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 _BINPATH = /$(_APPNAME)/Contents/Resources
 endif
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
-PACKAGE_XULRUNNER = 
-UNPACKAGE = 
+PACKAGE_XULRUNNER =
+UNPACKAGE =
 else
 PACKAGE_XULRUNNER = package-xulrunner
 UNPACKAGE = $(LIBXUL_DIST)/xulrunner*$(PKG_SUFFIX)
 endif
 
 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
 
 DEBDESTDIR=debian/$(MOZ_APP_NAME)
 
 package-xulrunner:
 ifndef SYSTEM_LIBXUL
 	@echo "Packaging xulrunner..."
 	@rm -rf $(LIBXUL_DIST)/xulrunner*
 	@$(MAKE) -C $(LIBXUL_DIST)/.. package || echo "Perhaps you're trying to package a prebuilt SDK. See 'https://wiki.mozilla.org/Mobile/Build/Fennec#Build' for more information."
 	@cd $(DIST)/$(MOZ_PKG_DIR); $(UNMAKE_PACKAGE)
+	@echo "Removing unpackaged files... (the ones xulrunner/installer keeps)"
+	@cd $(DIST)/$(MOZ_PKG_DIR)/xulrunner; rm -rf $(NO_PKG_FILES)
 else
 	@echo "Using system xulrunner..."
 endif
 
 ifeq ($(OS_TARGET),Linux)
 PP_DEB_FILES =	debian/control \
 		debian/changelog \
 		debian/$(MOZ_APP_NAME).desktop \
@@ -148,33 +152,41 @@ PP_DEB_FILES =	debian/control \
            src=$(srcdir)/debian/`basename $$f`.in; \
 	   echo $$src ">" $$f ;\
            $(RM) -f $$f; \
            mkdir -p debian;  \
            $(PYTHON) $(topsrcdir)/config/Preprocessor.py \
              $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $$src > $$f; \
          done
 
+$(MOZILLA_VERSION).$(MOZ_APP_NAME).conf: $(topsrcdir)/config/milestone.txt Makefile
+	printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nabi=%s" \
+	  $(MOZILLA_VERSION) $(installdir)/xulrunner $(TARGET_XPCOM_ABI)> $@
+
+# to register xulrunner per-user, override this with $HOME/.gre.d
+regdir = /etc/gre.d
 
 deb: $(PP_DEB_FILES) $(DIST)/branding/$(MOZ_APP_NAME)_scalable.png \
 	$(DIST)/branding/$(MOZ_APP_NAME)_26x26.png \
-	$(DIST)/branding/$(MOZ_APP_NAME)_40x40.png
+	$(DIST)/branding/$(MOZ_APP_NAME)_40x40.png \
+	$(MOZILLA_VERSION).$(MOZ_APP_NAME).conf
 	rm -rf $(DEBDESTDIR)/$(installdir)/*
 	$(NSINSTALL) -D $(DEBDESTDIR)/$(installdir)
 	cp -pRL $(DIST)/$(MOZ_APP_NAME)/* $(DEBDESTDIR)/$(installdir)
-	rm -rf $(DEBDESTDIR)/$(installdir)/xulrunner	
 	$(NSINSTALL)  debian/$(MOZ_APP_NAME).desktop $(DEBDESTDIR)/usr/share/applications/hildon/
 	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/dbus-1/services/
 	cp debian/$(MOZ_APP_NAME).service $(DEBDESTDIR)/usr/share/dbus-1/services/org.mozilla.$(MOZ_APP_NAME).service
 	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/icons/hicolor/scalable/hildon/
 	cp $(DIST)/branding/$(MOZ_APP_NAME)_scalable.png $(DEBDESTDIR)/usr/share/icons/hicolor/scalable/hildon/$(MOZ_APP_NAME).png
 	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/icons/hicolor/26x26/hildon/
 	cp $(DIST)/branding/$(MOZ_APP_NAME)_26x26.png $(DEBDESTDIR)/usr/share/icons/hicolor/26x26/hildon/$(MOZ_APP_NAME).png
 	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/icons/hicolor/40x40/hildon/
 	cp $(DIST)/branding/$(MOZ_APP_NAME)_40x40.png $(DEBDESTDIR)/usr/share/icons/hicolor/40x40/hildon/$(MOZ_APP_NAME).png
+	$(NSINSTALL) -D $(DEBDESTDIR)$(regdir)
+	$(SYSINSTALL) $(MOZILLA_VERSION).$(MOZ_APP_NAME).conf $(DEBDESTDIR)$(regdir)/
 	dh_link; fakeroot dh_fixperms; fakeroot dh_installdeb; dh_shlibdeps; fakeroot dh_gencontrol; fakeroot dh_md5sums; dh_builddeb
 	@echo $(DEB_PKG_NAME) > $(DIST)/deb_name.txt
 
 installer: deb
 	@echo Installer DEB created!
 
 endif
 
--- a/mobile/installer/debian/control.in
+++ b/mobile/installer/debian/control.in
@@ -3,14 +3,14 @@ Source: fennec
 Section: user/network
 Priority: extra
 Maintainer: Mobile Feedback <mobile-feedback@mozilla.com>
 Build-Depends: debhelper (>= 4)
 Standards-Version: 3.7.2
 
 Package: fennec
 Architecture: any
-Depends: ${shlibs:Depends}, xulrunner (>=@GRE_MILESTONE@-@GRE_BUILDID@)
+Depends: ${shlibs:Depends}
 Description: Web browser built by the Mozilla community
  The Firefox Web browser puts you in control of your Web experience with easy navigation, support for add-ons and synchronizes with Firefox on your PC.
 XB-Maemo-Display-Name: @MOZ_APP_DISPLAYNAME@
 XB-Maemo-Icon-26:
 #includesubst @ABS_OBJDIR@/@BASE64_ICON@