diff --git a/xulrunner/installer/Makefile.in b/xulrunner/installer/Makefile.in index c523da5521c..87703e12b88 100644 --- a/xulrunner/installer/Makefile.in +++ b/xulrunner/installer/Makefile.in @@ -138,8 +138,13 @@ GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LI GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID) MOZ_DEB_TIMESTAMP = "$(shell date +"%a, %d %b %Y %T %z" )" -DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID) -DMOZ_DEB_TIMESTAMP=$(MOZ_DEB_TIMESTAMP) - +DEFINES += \ + -DGRE_MILESTONE=$(GRE_MILESTONE) \ + -DGRE_BUILDID=$(GRE_BUILDID) \ + -DMOZ_DEB_TIMESTAMP=$(MOZ_DEB_TIMESTAMP) \ + -DMOZ_APP_NAME=$(MOZ_APP_NAME) \ + -Dinstalldir=$(installdir) \ + $(NULL) ifeq ($(OS_TARGET),Linux) debian/changelog: $(srcdir)/debian/changelog.in $(LIBXUL_DIST)/bin/platform.ini @@ -147,14 +152,27 @@ debian/changelog: $(srcdir)/debian/changelog.in $(LIBXUL_DIST)/bin/platform.ini $(PYTHON) $(topsrcdir)/config/Preprocessor.py \ $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@ -deb: debian/changelog +debian/xulrunner.links: $(srcdir)/debian/xulrunner.links.in + $(PYTHON) $(topsrcdir)/config/Preprocessor.py \ + $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@ + +debian/xulrunner.service: $(srcdir)/debian/xulrunner.service.in + $(PYTHON) $(topsrcdir)/config/Preprocessor.py \ + $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@ + +package: + $(MAKE) package -C $(DEPTH) + +deb: package debian/changelog debian/xulrunner.service debian/xulrunner.links $(MOZILLA_VERSION).system.conf $(NSINSTALL) $(topsrcdir)/$(MOZ_BUILD_APP)/installer/debian . - rm -rf $(DEBDESTDIR)/usr/local/* - $(NSINSTALL) -D $(DEBDESTDIR)/usr/local - cd $(DEBDESTDIR)/usr/local; cat ../../../../$(DEPTH)/dist/$(PKG_PATH)$(PKG_BASENAME)$(PKG_SUFFIX) | $(UNMAKE_PACKAGE) + rm -fr $(DEBDESTDIR) + $(NSINSTALL) -D $(DEBDESTDIR)$(installdir) + cd $(DEBDESTDIR)/$(installdir); cp -pRL ../../../../../../$(DEPTH)/dist/$(MOZ_BUILD_APP)/* . $(NSINSTALL) -D $(DEBDESTDIR)/usr/share/dbus-1/services/ cp debian/$(MOZ_BUILD_APP).service $(DEBDESTDIR)/usr/share/dbus-1/services/org.mozilla.$(MOZ_BUILD_APP).service - rm $(DEBDESTDIR)/usr/local/$(MOZ_BUILD_APP)/xpidl - dh_shlibdeps; fakeroot dh_fixperms; fakeroot dh_installdeb ; fakeroot dh_gencontrol; fakeroot dh_md5sums; dh_builddeb + $(NSINSTALL) -D $(DEBDESTDIR)$(regdir) + $(SYSINSTALL) $(MOZILLA_VERSION).system.conf $(DEBDESTDIR)$(regdir)/ + rm $(DEBDESTDIR)$(installdir)/xpidl + dh_shlibdeps; fakeroot dh_fixperms; fakeroot dh_installdeb; fakeroot dh_gencontrol; fakeroot dh_md5sums; dh_builddeb endif diff --git a/xulrunner/installer/debian/postinst b/xulrunner/installer/debian/postinst index 569f5d8e52e..4264d8b2f2b 100644 --- a/xulrunner/installer/debian/postinst +++ b/xulrunner/installer/debian/postinst @@ -20,7 +20,6 @@ set -e case "$1" in configure) - /usr/local/xulrunner/xulrunner --register-global ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/xulrunner/installer/debian/prerm b/xulrunner/installer/debian/prerm index 4a2694cfc53..c68d0d58b5a 100644 --- a/xulrunner/installer/debian/prerm +++ b/xulrunner/installer/debian/prerm @@ -7,7 +7,6 @@ set -e case "$1" in remove|upgrade|deconfigure) - /usr/local/xulrunner/xulrunner --unregister-global ;; failed-upgrade) diff --git a/xulrunner/installer/debian/xulrunner.links b/xulrunner/installer/debian/xulrunner.links deleted file mode 100644 index e382ae26df0..00000000000 --- a/xulrunner/installer/debian/xulrunner.links +++ /dev/null @@ -1,2 +0,0 @@ -/usr/local/xulrunner/xulrunner /usr/bin/xulrunner - diff --git a/xulrunner/installer/debian/xulrunner.links.in b/xulrunner/installer/debian/xulrunner.links.in new file mode 100644 index 00000000000..eabac6f51db --- /dev/null +++ b/xulrunner/installer/debian/xulrunner.links.in @@ -0,0 +1,2 @@ +#filter substitution +@installdir@/xulrunner /usr/bin/xulrunner diff --git a/xulrunner/installer/debian/xulrunner.service b/xulrunner/installer/debian/xulrunner.service deleted file mode 100644 index 1e79f81e12a..00000000000 --- a/xulrunner/installer/debian/xulrunner.service +++ /dev/null @@ -1,4 +0,0 @@ -[D-BUS Service] -Name=org.mozilla.xulrunner -Exec=/usr/local/xulrunner/xulrunner - diff --git a/xulrunner/installer/debian/xulrunner.service.in b/xulrunner/installer/debian/xulrunner.service.in new file mode 100644 index 00000000000..48d87a1b92b --- /dev/null +++ b/xulrunner/installer/debian/xulrunner.service.in @@ -0,0 +1,4 @@ +#filter substitution +[D-BUS Service] +Name=org.mozilla.@MOZ_APP_NAME@ +Exec=@installdir@/xulrunner