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

Jean-Baptiste Kempf jb at videolan.org
Thu Dec 28 00:09:26 CET 2017


Please avoid having -p and -P doing 2 different things.

Else, lgtm.

On Wed, 27 Dec 2017, at 19:48, david.fuhrmann at gmail.com wrote:
> 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)
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


-- 
Jean-Baptiste Kempf -  President
+33 672 704 734


More information about the vlc-devel mailing list