Debian Codegraph @

scripts/PackageMacOS

raw
1 #!/bin/sh
2
3 ##
4 ## Copyright 2010-2012, 2014 SRI International
5 ##
6 ## This file is part of the Computational Morphometry Toolkit.
7 ##
8 ## http://www.nitrc.org/projects/cmtk/
9 ##
10 ## The Computational Morphometry Toolkit is free software: you can
11 ## redistribute it and/or modify it under the terms of the GNU General Public
12 ## License as published by the Free Software Foundation, either version 3 of
13 ## the License, or (at your option) any later version.
14 ##
15 ## The Computational Morphometry Toolkit is distributed in the hope that it
16 ## will be useful, but WITHOUT ANY WARRANTY; without even the implied
17 ## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ## GNU General Public License for more details.
19 ##
20 ## You should have received a copy of the GNU General Public License along
21 ## with the Computational Morphometry Toolkit. If not, see
22 ## <http://www.gnu.org/licenses/>.
23 ##
24 ## $Revision: 5210 $
25 ##
26 ## $LastChangedDate: 2014-02-21 15:35:00 -0800 (Fri, 21 Feb 2014) $
27 ##
28 ## $LastChangedBy: torstenrohlfing $
29 ##
30
31 ##
32 ## SYNOPSIS
33 ##
34 ## This script can be run from anywhere and will create
35 ## all officially distributed MacOS packages, each in
36 ## its own subdirectory of the current working directory.
37 ##
38
39 SOURCEDIR=`dirname $0`
40 SOURCEDIR=`dirname ${SOURCEDIR}`
41 SOURCEDIR=`cd ${SOURCEDIR}; pwd`
42
43 SDKs="$*"
44 if [ "${SDKs}" == "" ]; then
45 SDKs="OSX-10.4-i386 OSX-10.5-x86_64 OSX-10.6-x86_64 OSX-10.6-x86_64-CUDA gcc4.7-macports-OSX-10.6 gcc4.8-macports-OSX-10.6"
46 fi
47
48 /opt/local/bin/svn update source
49 for sdk in ${SDKs}; do
50 if [ ! -d ${sdk} ]; then
51 mkdir ${sdk}
52 pushd ${sdk}
53 /opt/local/bin/cmake -C ${SOURCEDIR}/config/package.cmake -C ${SOURCEDIR}/config/${sdk}.cmake ${SOURCEDIR}
54 else
55 pushd ${sdk}
56 cmake .
57 fi
58
59 make -j2 package
60 /opt/local/bin/cpack -G PackageMaker
61 popd
62 done
63