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

David Fuhrmann david.fuhrmann at gmail.com
Thu Dec 28 09:26:01 CET 2017



> Am 28.12.2017 um 00:09 schrieb Jean-Baptiste Kempf <jb at videolan.org>:
> 
> Please avoid having -p and -P doing 2 different things.
> 
> Else, lgtm.

Hi,

Unfortunately, getopts does not seem to support optional arguments behind options.

My plan was to do a soft transition from -p to -P x, to avoid breaking all the buildbots at once.
But I do not mind. Does anyone have a better letter in mind for packaging? I do not really like the i inside the win script, as it is not an installer we are really packaging here...

BR. David

> 
> 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