diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-02-01 14:48:15 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-02-01 14:51:20 +0200 |
commit | ebdd616580bb0d367b78ba0fe3fa56157b90c3ab (patch) | |
tree | 9db561fa9feb967920ee87eb0194f337a6e6e479 /Makefile.in | |
parent | b46e964064502b019ce57afe34f6a7a82974381a (diff) |
Add option to set bundle identifier and use it when signing
Sign also all the dylibs and frameworks in the bundle.
Change-Id: I7f67b9d7eda0204b24e2ea2ef44a53fb8db0f8aa
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in index 92b680f4f128..f9e38dd7aca3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -334,11 +334,36 @@ ifeq ($(OS_FOR_BUILD),WNT) else ifeq ($(DISABLE_LINKOO),TRUE) @ooinstall $(DEVINSTALLDIR)/opt -ifeq ($(OS),MACOSX) - identity=`security find-identity -p codesigning -v | grep 'Mac Developer:' | awk '{print $$2}'`; \ - if test -n "$$identity"; then \ - codesign --verbose --sign $$identity $(DEVINSTALLDIR)/opt/LibreOffice.app; \ - fi +ifneq ($(MACOSX_CODESIGNING_IDENTITY),) +# +# Sign dylibs + find $(DEVINSTALLDIR)/opt/LibreOffice.app \( -name '*.dylib' -or -name '*.dylib.*' \) ! -type l | \ + while read dylib; do \ + id=`basename "$$dylib"`; \ + case $$id in \ + *.dylib) \ + ;; \ + *) \ + id=`echo $$id | sed -e 's/dylib.*/dylib/'`; \ + ;; \ + esac; \ + codesign --verbose --identifier=$(MACOSX_BUNDLE_IDENTIFIER).$$id --sign $(MACOSX_CODESIGNING_IDENTITY) "$$dylib"; \ + done +# +# Sign frameworks. +# +# Yeah, we don't bundle any other framework than our Python one, and +# it has just one version, so this generic search is mostly for +# completeness. + for framework in `find $(DEVINSTALLDIR)/opt/LibreOffice.app -name '*.framework' -type d`; do \ + for version in $$framework/Versions/*; do \ + test -d $$version && codesign --force --verbose --prefix=$(MACOSX_BUNDLE_IDENTIFIER). --sign $(MACOSX_CODESIGNING_IDENTITY) $$version; \ + done; \ + done +# +# Sign the app bundle as a whole (will sign the soffice binary) + codesign --verbose --sign $(MACOSX_CODESIGNING_IDENTITY) $(DEVINSTALLDIR)/opt/LibreOffice.app +# endif @install-gdb-printers -L else |