Create Mac Pack: Copy the creator script to the build directory.

This commit is contained in:
Klaas Freitag 2014-08-26 16:01:36 +02:00
parent 79b547b83b
commit eb898646bc
4 changed files with 16 additions and 9 deletions

View file

@ -144,6 +144,7 @@ add_subdirectory(csync)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(shell_integration) add_subdirectory(shell_integration)
add_subdirectory(doc) add_subdirectory(doc)
add_subdirectory(admin)
if(UNIT_TESTING) if(UNIT_TESTING)
include(CTest) include(CTest)

2
admin/CMakeLists.txt Normal file
View file

@ -0,0 +1,2 @@
# traverse into osx subdirectory to install and patch the create-pack script
add_subdirectory(osx)

2
admin/osx/CMakeLists.txt Normal file
View file

@ -0,0 +1,2 @@
configure_file(create_mac_pkg.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh)

View file

@ -10,19 +10,23 @@ if [ -z "$1" ]; then
exit 1 exit 1
fi fi
prjfile="admin/osx/macosx.pkgproj" prjfile=macosx.pkgproj
if [ ! -f $prjfile ]; then vanilla_prjfile="@CMAKE_SOURCE_DIR@/admin/osx/macosx.pkgproj"
if [ ! -f $vanilla_prjfile ]; then
echo "ERROR: macosx.pkgproj not in admin dir, start from CMAKE_SOURCE_DIR!" echo "ERROR: macosx.pkgproj not in admin dir, start from CMAKE_SOURCE_DIR!"
exit 2 exit 2
fi fi
pack="admin/ownCloud Installer.pkg" cp $vanilla_prjfile $prjfile
rm -f $pack
install_path=$1 install_path=$1
# The name of the installer package # The name of the installer package
installer=ownCloud\ Installer.pkg installer=ownCloud-@MIRALL_VERSION_STRING@
installer_file=$installer.pkg
# set the installer name to the copied prj config file
/usr/local/bin/packagesutil --file $prjfile set project name $installer
# The command line tool of the "Packages" tool, see link above. # The command line tool of the "Packages" tool, see link above.
pkgbuild=/usr/local/bin/packagesbuild pkgbuild=/usr/local/bin/packagesbuild
@ -31,9 +35,9 @@ $pkgbuild -F $install_path $prjfile
rc=$? rc=$?
if [ $rc == 0 ]; then if [ $rc == 0 ]; then
echo "Successfully created $pack" echo "Successfully created $installer_file"
else else
echo "Failed to create $pack" echo "Failed to create $installer_file"
exit 3 exit 3
fi fi
@ -41,5 +45,3 @@ fi
# See http://s.sudre.free.fr/Software/documentation/Packages/en/Project_Configuration.html#5 # See http://s.sudre.free.fr/Software/documentation/Packages/en/Project_Configuration.html#5
# certname=gdbsign # certname=gdbsign
# productsign --cert $certname admin/$installer ./$installer # productsign --cert $certname admin/$installer ./$installer