[Pkg-owncloud-commits] [owncloud-client] 10/219: Create Mac Pack: Copy the creator script to the build directory.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:03 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit eb898646bc40dc9add34655e3379481ba7425ed1
Author: Klaas Freitag <freitag at owncloud.com>
Date: Tue Aug 26 16:01:36 2014 +0200
Create Mac Pack: Copy the creator script to the build directory.
---
CMakeLists.txt | 1 +
admin/CMakeLists.txt | 2 ++
admin/osx/CMakeLists.txt | 2 ++
.../{create_mac_pkg.sh => create_mac_pkg.sh.cmake} | 20 +++++++++++---------
4 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 975ea9f..6b2873a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -144,6 +144,7 @@ add_subdirectory(csync)
add_subdirectory(src)
add_subdirectory(shell_integration)
add_subdirectory(doc)
+add_subdirectory(admin)
if(UNIT_TESTING)
include(CTest)
diff --git a/admin/CMakeLists.txt b/admin/CMakeLists.txt
new file mode 100644
index 0000000..8908d6c
--- /dev/null
+++ b/admin/CMakeLists.txt
@@ -0,0 +1,2 @@
+# traverse into osx subdirectory to install and patch the create-pack script
+add_subdirectory(osx)
diff --git a/admin/osx/CMakeLists.txt b/admin/osx/CMakeLists.txt
new file mode 100644
index 0000000..adf6ed4
--- /dev/null
+++ b/admin/osx/CMakeLists.txt
@@ -0,0 +1,2 @@
+
+configure_file(create_mac_pkg.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh)
diff --git a/admin/osx/create_mac_pkg.sh b/admin/osx/create_mac_pkg.sh.cmake
similarity index 65%
rename from admin/osx/create_mac_pkg.sh
rename to admin/osx/create_mac_pkg.sh.cmake
index 9393998..21c9e69 100755
--- a/admin/osx/create_mac_pkg.sh
+++ b/admin/osx/create_mac_pkg.sh.cmake
@@ -10,19 +10,23 @@ if [ -z "$1" ]; then
exit 1
fi
-prjfile="admin/osx/macosx.pkgproj"
-if [ ! -f $prjfile ]; then
+prjfile=macosx.pkgproj
+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!"
exit 2
fi
-pack="admin/ownCloud Installer.pkg"
-rm -f $pack
+cp $vanilla_prjfile $prjfile
install_path=$1
# The name of the installer package
-installer=ownCloud\ Installer.pkg
+installer=ownCloud- at 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.
pkgbuild=/usr/local/bin/packagesbuild
@@ -31,9 +35,9 @@ $pkgbuild -F $install_path $prjfile
rc=$?
if [ $rc == 0 ]; then
- echo "Successfully created $pack"
+ echo "Successfully created $installer_file"
else
- echo "Failed to create $pack"
+ echo "Failed to create $installer_file"
exit 3
fi
@@ -41,5 +45,3 @@ fi
# See http://s.sudre.free.fr/Software/documentation/Packages/en/Project_Configuration.html#5
# certname=gdbsign
# productsign --cert $certname admin/$installer ./$installer
-
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list