[OS/2] Bug 421626: Fix packaging and signing on OS/2, r=ted.mielczarek
authormozilla@weilbacher.org
Thu, 13 Mar 2008 17:39:33 -0700
changeset 13039 1423caed11d538d8542987178e58722ab72a539a
parent 13038 4dc89b9f0dba7967bf349f74cad216256566f768
child 13040 e407423119636dce03247470e71263bf32786e5b
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted.mielczarek
bugs421626
milestone1.9b5pre
[OS/2] Bug 421626: Fix packaging and signing on OS/2, r=ted.mielczarek
toolkit/mozapps/installer/os2/sign.cmd
toolkit/mozapps/installer/os2/strip.cmd
toolkit/mozapps/installer/packager.mk
new file mode 100755
--- /dev/null
+++ b/toolkit/mozapps/installer/os2/sign.cmd
@@ -0,0 +1,17 @@
+/* An adapted version of sign.cmd from NSS */
+PARSE ARG dist filename
+dist=forwardtoback(dist);
+'@echo 'dist
+'set BEGINLIBPATH='dist'\bin;%BEGINLIBPATH%'
+'set LIBPATHSTRICT=T'
+dist'\bin\shlibsign -v -i 'filename
+exit
+
+forwardtoback: procedure
+  arg pathname
+  parse var pathname pathname'/'rest
+  do while (rest <> "")
+    pathname = pathname'\'rest
+    parse var pathname pathname'/'rest
+  end
+  return pathname
new file mode 100755
--- /dev/null
+++ b/toolkit/mozapps/installer/os2/strip.cmd
@@ -0,0 +1,2 @@
+@rem compress binaries for optimum performance without disturbing chkdll32
+lxlite /ydd /yxd /d %1
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -184,18 +184,22 @@ ifneq (1_,$(if $(CROSS_COMPILE),1,0)_$(U
 ifdef MOZ_PSM
 SIGN_NSS		= @echo signing nss libraries;
 
 ifdef UNIVERSAL_BINARY
 NATIVE_ARCH	= $(shell uname -p | sed -e s/powerpc/ppc/)
 NATIVE_DIST	= $(DIST)/../../$(NATIVE_ARCH)/dist
 SIGN_CMD	= $(NATIVE_DIST)/bin/run-mozilla.sh $(NATIVE_DIST)/bin/shlibsign -v -i
 else
+ifeq ($(OS_ARCH),OS2)
+SIGN_CMD	= $(topsrcdir)/toolkit/mozapps/installer/os2/sign.cmd $(DIST)
+else
 SIGN_CMD	= $(RUN_TEST_PROGRAM) $(DIST)/bin/shlibsign -v -i
 endif
+endif
 
 SOFTOKN		= $(DIST)/$(STAGEPATH)$(MOZ_PKG_APPNAME)$(_BINPATH)/$(DLL_PREFIX)softokn3$(DLL_SUFFIX)
 FREEBL		= $(DIST)/$(STAGEPATH)$(MOZ_PKG_APPNAME)$(_BINPATH)/$(DLL_PREFIX)freebl3$(DLL_SUFFIX)
 FREEBL_32FPU	= $(DIST)/$(STAGEPATH)$(MOZ_PKG_APPNAME)$(_BINPATH)/$(DLL_PREFIX)freebl_32fpu_3$(DLL_SUFFIX)
 FREEBL_32INT	= $(DIST)/$(STAGEPATH)$(MOZ_PKG_APPNAME)$(_BINPATH)/$(DLL_PREFIX)freebl_32int_3$(DLL_SUFFIX)
 FREEBL_32INT64	= $(DIST)/$(STAGEPATH)$(MOZ_PKG_APPNAME)$(_BINPATH)/$(DLL_PREFIX)freebl_32int64_3$(DLL_SUFFIX)
 FREEBL_64FPU	= $(DIST)/$(STAGEPATH)$(MOZ_PKG_APPNAME)$(_BINPATH)/$(DLL_PREFIX)freebl_64fpu_3$(DLL_SUFFIX)
 FREEBL_64INT	= $(DIST)/$(STAGEPATH)$(MOZ_PKG_APPNAME)$(_BINPATH)/$(DLL_PREFIX)freebl_64int_3$(DLL_SUFFIX)
@@ -265,17 +269,17 @@ GARBAGE		+= $(DIST)/$(PACKAGE) $(PACKAGE
 ifeq ($(OS_ARCH),IRIX)
 STRIP_FLAGS	= -f
 endif
 ifeq ($(OS_ARCH),BeOS)
 STRIP_FLAGS	= -g
 PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)-bin"
 endif
 ifeq ($(OS_ARCH),OS2)
-STRIP		= $(srcdir)/os2/strip.cmd
+STRIP		= $(topsrcdir)/toolkit/mozapps/installer/os2/strip.cmd
 STRIP_FLAGS	=
 PLATFORM_EXCLUDE_LIST = ! -name "*.ico"
 endif
 
 ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
 PKGCP_OS = dos
 else
 PKGCP_OS = unix