[vlc-devel] [PATCH 2/2] macOS build.sh: Add option to specify which package to be build

david.fuhrmann at gmail.com david.fuhrmann at gmail.com
Wed Dec 27 19:48:23 CET 2017


From: David Fuhrmann <dfuhrmann at videolan.org>

Add parameter option -P to specify the type of package to be build.
Also adds a way to overwrite the macOS kernel version via environment
variable, which can be useful if someone wants to use an older contribs
package.
---
 extras/package/macosx/build.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/extras/package/macosx/build.sh b/extras/package/macosx/build.sh
index 4841834..130ca98 100755
--- a/extras/package/macosx/build.sh
+++ b/extras/package/macosx/build.sh
@@ -19,6 +19,10 @@ VLCBUILDDIR=""
 CORE_COUNT=`getconf NPROCESSORS_ONLN 2>&1`
 let JOBS=$CORE_COUNT+1
 
+if [ ! -z "$VLC_FORCE_KERNELVERSION" ]; then
+    OSX_KERNELVERSION="$VLC_FORCE_KERNELVERSION"
+fi
+
 usage()
 {
 cat << EOF
@@ -33,6 +37,7 @@ OPTIONS:
    -r            Rebuild everything (tools, contribs, vlc)
    -c            Recompile contribs from sources
    -p            Build packages for all artifacts
+   -P <n|u>      Create an installable package (n: nightly, u: unsigned release archive)
    -k <sdk>      Use the specified sdk (default: $SDKROOT)
    -a <arch>     Use the specified arch (default: $ARCH)
    -C            Use the specified VLC build dir
@@ -50,7 +55,7 @@ spopd()
     popd > /dev/null
 }
 
-while getopts "hvrcpk:a:j:C:" OPTION
+while getopts "hvrcpP:k:a:j:C:" OPTION
 do
      case $OPTION in
          h)
@@ -70,6 +75,9 @@ do
          p)
              PACKAGE="yes"
          ;;
+         P)
+             PACKAGETYPE=$OPTARG
+         ;;
          a)
              ARCH=$OPTARG
          ;;
@@ -259,7 +267,11 @@ info "Preparing VLC.app"
 make VLC.app
 
 
-if [ "$PACKAGE" = "yes" ]; then
+if [ "$PACKAGETYPE" = "u" ]; then
+    info "Building VLC release archive"
+    make package-macosx-release
+    shasum -a 512 vlc-*-release.zip
+elif [ "$PACKAGETYPE" = "n" -o "$PACKAGE" = "yes" ]; then
     info "Building VLC dmg package"
     make package-macosx
 fi
-- 
2.9.3 (Apple Git-75)



More information about the vlc-devel mailing list