xulrunner/installer/Makefile.in

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 4
michael@0 5 STANDALONE_MAKEFILE := 1
michael@0 6
michael@0 7 NO_PKG_FILES = \
michael@0 8 xulrunner-config \
michael@0 9 regchrome* \
michael@0 10 regxpcom* \
michael@0 11 $(NULL)
michael@0 12
michael@0 13 # We want xpcshell, run-mozilla and install_app.py in the SDK but not in the binary package.
michael@0 14 ifndef STAGE_SDK
michael@0 15 NO_PKG_FILES += \
michael@0 16 xpcshell* \
michael@0 17 run-mozilla* \
michael@0 18 install_app.py \
michael@0 19 $(NULL)
michael@0 20 endif
michael@0 21
michael@0 22 # If we're on mac, we don't want an end-user-facing DMG, we want a .tar.bz2
michael@0 23 # which developers then use to package their application.
michael@0 24
michael@0 25 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
michael@0 26 MOZ_PKG_FORMAT = BZ2
michael@0 27 _APPNAME = XUL.framework
michael@0 28 _BINPATH = /$(_APPNAME)/Versions/Current
michael@0 29 endif
michael@0 30
michael@0 31 include $(topsrcdir)/config/rules.mk
michael@0 32
michael@0 33 INSTALL_SDK = 1
michael@0 34
michael@0 35 include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
michael@0 36 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
michael@0 37
michael@0 38 # Add pkg-config files to the install:: target
michael@0 39
michael@0 40 pkg_config_files = \
michael@0 41 libxul.pc \
michael@0 42 libxul-embedding.pc \
michael@0 43 mozilla-js.pc \
michael@0 44 mozilla-plugin.pc \
michael@0 45 $(NULL)
michael@0 46
michael@0 47 ifdef MOZ_NATIVE_NSPR
michael@0 48 NSPR_NAME=nspr
michael@0 49 NSPR_VERSION=$(shell $(NSPR_CONFIG) --version)
michael@0 50 else
michael@0 51 pkg_config_files += mozilla-nspr.pc
michael@0 52 NSPR_NAME=mozilla-nspr
michael@0 53 FULL_NSPR_CFLAGS=-I\$${includedir}
michael@0 54 FULL_NSPR_LIBS=$(subst $(prefix),\$${sdkdir},$(shell $(DEPTH)/nsprpub/config/nspr-config --libs))
michael@0 55 NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version)
michael@0 56 endif
michael@0 57
michael@0 58 MOZ_XUL_LINK = -lxpcomglue_s -lxul -lmozalloc
michael@0 59 ifdef JS_SHARED_LIBRARY
michael@0 60 MOZ_JS_LINK = -lmozjs
michael@0 61 else
michael@0 62 MOZ_JS_LINK = $(MOZ_XUL_LINK)
michael@0 63 endif
michael@0 64
michael@0 65 $(warning FULL_NSPR_CFLAGS=$(FULL_NSPR_CFLAGS))
michael@0 66
michael@0 67 ifndef MOZ_NATIVE_NSS
michael@0 68 pkg_config_files += mozilla-nss.pc
michael@0 69 endif
michael@0 70
michael@0 71 %.pc: $(srcdir)/%.pc.in $(GLOBAL_DEPS)
michael@0 72 cat $< | sed \
michael@0 73 -e "s|%prefix%|$(prefix)|" \
michael@0 74 -e "s|%includedir%|$(includedir)|" \
michael@0 75 -e "s|%idldir%|$(idldir)|" \
michael@0 76 -e "s|%sdkdir%|$(sdkdir)|" \
michael@0 77 -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
michael@0 78 -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
michael@0 79 -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
michael@0 80 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
michael@0 81 -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
michael@0 82 -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
michael@0 83 -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \
michael@0 84 -e "s|%MOZ_XUL_LINK%|$(MOZ_XUL_LINK)|" \
michael@0 85 -e "s|%MOZ_JS_LINK%|$(MOZ_JS_LINK)|" > $@
michael@0 86 chmod 644 $@
michael@0 87
michael@0 88 install:: $(pkg_config_files)
michael@0 89 @echo pkg_config_file: $(pkg_config_files)
michael@0 90 $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(libdir)/pkgconfig
michael@0 91
michael@0 92 GARBAGE += $(pkg_config_files)
michael@0 93
michael@0 94 GARBAGE += debian/changelog
michael@0 95
michael@0 96 DEBDESTDIR=debian/$(MOZ_BUILD_APP)
michael@0 97
michael@0 98 GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
michael@0 99 MOZ_DEB_TIMESTAMP = "$(shell date +"%a, %d %b %Y %T %z" )"
michael@0 100
michael@0 101 DEFINES += \
michael@0 102 -DGRE_MILESTONE=$(GRE_MILESTONE) \
michael@0 103 -DGRE_BUILDID=$(GRE_BUILDID) \
michael@0 104 -DMOZ_DEB_TIMESTAMP=$(MOZ_DEB_TIMESTAMP) \
michael@0 105 -DMOZ_APP_NAME=$(MOZ_APP_NAME) \
michael@0 106 -Dinstalldir=$(installdir) \
michael@0 107 $(NULL)
michael@0 108
michael@0 109 ifeq ($(OS_TARGET),Linux)
michael@0 110 debian/changelog: $(srcdir)/debian/changelog.in $(LIBXUL_DIST)/bin/platform.ini
michael@0 111 $(call py_action,preprocessor, \
michael@0 112 $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ -o $@)
michael@0 113
michael@0 114 debian/xulrunner.links: $(srcdir)/debian/xulrunner.links.in
michael@0 115 $(call py_action,preprocessor, \
michael@0 116 $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ -o $@)
michael@0 117
michael@0 118 debian/xulrunner.service: $(srcdir)/debian/xulrunner.service.in
michael@0 119 $(call py_action,preprocessor, \
michael@0 120 $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ -o $@)
michael@0 121
michael@0 122 debian/prerm: $(srcdir)/debian/prerm.in
michael@0 123 $(call py_action,preprocessor, \
michael@0 124 $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ -o $@)
michael@0 125
michael@0 126 debian/postinst: $(srcdir)/debian/postinst.in
michael@0 127 $(call py_action,preprocessor, \
michael@0 128 $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ -o $@)
michael@0 129
michael@0 130 package:
michael@0 131 $(MAKE) package -C $(DEPTH)
michael@0 132
michael@0 133 deb: package debian/changelog debian/xulrunner.service debian/xulrunner.links
michael@0 134 $(NSINSTALL) $(topsrcdir)/$(MOZ_BUILD_APP)/installer/debian .
michael@0 135 rm -fr $(DEBDESTDIR)
michael@0 136 $(NSINSTALL) -D $(DEBDESTDIR)/$(installdir)
michael@0 137 cp -pRL $(DEPTH)/dist/$(MOZ_BUILD_APP)/* $(DEBDESTDIR)/$(installdir)
michael@0 138 $(NSINSTALL) -D $(DEBDESTDIR)/usr/share/dbus-1/services/
michael@0 139 cp debian/$(MOZ_BUILD_APP).service $(DEBDESTDIR)/usr/share/dbus-1/services/org.mozilla.$(MOZ_BUILD_APP).service
michael@0 140 dh_link; fakeroot dh_fixperms; fakeroot dh_installdeb; fakeroot dh_shlibdeps; fakeroot dh_gencontrol; fakeroot dh_md5sums; fakeroot dh_builddeb;
michael@0 141 endif
michael@0 142
michael@0 143 DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
michael@0 144 # package name comes from xulrunner/installer/debian/changelog.in
michael@0 145 DEB_PKG_NAME = $(MOZ_PKG_APPNAME)_$(GRE_MILESTONE)-$(GRE_BUILDID)_$(DEB_BUILD_ARCH).deb
michael@0 146 # relative to $(DIST)
michael@0 147 UPLOAD_EXTRA_FILES += ../xulrunner/$(DEB_PKG_NAME)

mercurial