mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Add packaging option to code sign the LyX application
(cherry picked from commit d2257bb0ff
)
This commit is contained in:
parent
29d2e997b8
commit
957192d7f3
@ -212,6 +212,10 @@ while [ $# -gt 0 ]; do
|
|||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--codesign-identity=*)
|
||||||
|
CODESIGN_IDENTITY=$(echo "${1}"|cut -d= -f2)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--libmagic-deployment=*)
|
--libmagic-deployment=*)
|
||||||
libmagic_deployment=$(echo ${1}|cut -d= -f2)
|
libmagic_deployment=$(echo ${1}|cut -d= -f2)
|
||||||
shift
|
shift
|
||||||
@ -867,6 +871,34 @@ convert_universal() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Create code sign signatures
|
||||||
|
# -------------------------
|
||||||
|
code_sign() {
|
||||||
|
target="$1"
|
||||||
|
condir=$(content_directory "${target}"/lyx)
|
||||||
|
appdir=$(dirname "${condir}")
|
||||||
|
# have to sign frameworks first
|
||||||
|
for csitem in \
|
||||||
|
"${condir}"/Frameworks/Qt*.framework/Versions/${QtFrameworkVersion} \
|
||||||
|
"${condir}"/Frameworks/*.framework/lib*.dylib \
|
||||||
|
"${condir}"/PlugIns/*/lib*.dylib \
|
||||||
|
"${condir}"/Library/Spotlight/* \
|
||||||
|
"${target}"/inkscape \
|
||||||
|
"${target}"/maxima \
|
||||||
|
"${target}"/tex2lyx \
|
||||||
|
"${target}"/lyxeditor \
|
||||||
|
"${target}"/lyxconvert \
|
||||||
|
"${target}"/lyxclient
|
||||||
|
do
|
||||||
|
codesign --verbose --force --sign "${CODESIGN_IDENTITY}" "${csitem}"
|
||||||
|
done
|
||||||
|
|
||||||
|
/usr/bin/codesign --verbose --force --sign "${CODESIGN_IDENTITY}" "${appdir}" || {
|
||||||
|
echo Warning: codesign failed with certificate named '"'${CODESIGN_IDENTITY}'"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
deduplicate() {
|
deduplicate() {
|
||||||
find "$@" -type f -print | while read file ; do
|
find "$@" -type f -print | while read file ; do
|
||||||
echo $(md5 -q "$file") "$file"
|
echo $(md5 -q "$file") "$file"
|
||||||
@ -1027,6 +1059,7 @@ build_package() {
|
|||||||
if [ ${LyxOnlyPackage:-"no"} = "no" ]; then
|
if [ ${LyxOnlyPackage:-"no"} = "no" ]; then
|
||||||
build_lyx
|
build_lyx
|
||||||
convert_universal
|
convert_universal
|
||||||
|
test -n "${CODESIGN_IDENTITY}" && code_sign "${LYX_BUNDLE_PATH}"
|
||||||
copy_dictionaries
|
copy_dictionaries
|
||||||
fi
|
fi
|
||||||
build_package
|
build_package
|
||||||
|
Loading…
Reference in New Issue
Block a user