Try to simplify package signing.

According to the packagemaker man page, '--target 10.5' will produce a
flat package. Use it instead of pkgutil.

svn path=/trunk/; revision=53201
This commit is contained in:
Gerald Combs 2013-11-09 18:39:58 +00:00
parent 7f3dd7b499
commit c7f980342e
1 changed files with 2 additions and 6 deletions

View File

@ -153,18 +153,14 @@ rm -rf "$pkg_file"
packagemaker --doc "Wireshark_package.pmdoc" \
--title "$pkg_title" \
--version "$version" \
--target 10.5 \
--verbose || exit 1
if [ -n "$CODE_SIGN_IDENTITY" ] ; then
pkg_dir_unsigned="$pkg_title UNSIGNED"
pkg_file_unsigned="$pkg_title_unsigned.pkg"
pkg_file_flattened="$pkg_title FLATTENED.pkg"
pkg_file_unsigned="$pkg_title UNSIGNED.pkg"
echo -e "Signing $pkg_file"
mv "$pkg_file" "$pkg_file_unsigned" || exit 1
pkgutil --expand "$pkg_file_unsigned" "$pkg_dir_unsigned" || exit 1
pkgutil --flatten "$pkg_file_unsigned" "$pkg_file_flattened" || exit 1
productsign --sign "$CODE_SIGN_IDENTITY" --force --verbose "$pkg_file_flattened" "$pkg_file" || exit 1
spctl --assess --type install "$pkg_file" || exit 1
shasum "$pkg_file"