From: WonYoung Choi Date: Wed, 23 Aug 2017 00:34:30 +0000 (+0900) Subject: Add GBS packaging spec for developer testing X-Git-Tag: submit/trunk/20170823.075128~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b1b0c1ea75ba69f41f768088e9db8bb61979aa8;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Add GBS packaging spec for developer testing Change-Id: I9170cc671020b8cde8efbca4d631d16fc1bdbf83 --- diff --git a/build.sh b/build.sh index 6da5b2872..a31b94f22 100755 --- a/build.sh +++ b/build.sh @@ -5,8 +5,7 @@ SCRIPT_DIR=$(dirname $SCRIPT_FILE) # Properties OUTDIR=$SCRIPT_DIR/Artifacts - - +NUGET_CMD="mono $SCRIPT_DIR/tools/NuGet.exe" usage() { echo "Usage: $0 [options] [args]" @@ -15,6 +14,7 @@ usage() { echo " -b, --build [module] Build a module" echo " -f, --full Build all modules in src/ directory. The module should be added in pkg/Tizen.NET.Private.sln" echo " -d, --dummy Build dummy modules" + echo " -p, --pack Make nuget packages" echo " -c, --clean Clean all artifacts" } @@ -36,15 +36,24 @@ cmd_build() { cmd_full_build() { dotnet build $SCRIPT_DIR/pkg/Tizen.NET.Private.sln --configuration=Release --output=$OUTDIR/bin - nuget pack $SCRIPT_DIR/pkg/Tizen.NET.Private.nuspec -Symbols -NoPackageAnalysis -BasePath $OUTDIR -OutputDirectory $OUTDIR - nuget pack $SCRIPT_DIR/pkg/Tizen.NET.nuspec -Symbols -NoPackageAnalysis -BasePath $OUTDIR -OutputDirectory $OUTDIR +} + +cmd_pack() { + VERSION_FILE=$OUTDIR/Version.txt + if [ -f $VERSION_FILE ]; then + NUGET_VERSION_PREFIX=$(cat $VERSION_FILE | grep Prefix | cut -d: -f2 | sed 's/\r$//') + NUGET_VERSION_SUFFIX=$(cat $VERSION_FILE | grep Suffix | cut -d: -f2 | sed 's/\r$//') + NUGET_VERSION_OPT="-Version $NUGET_VERSION_PREFIX-$NUGET_VERSION_SUFFIX" + fi + $NUGET_CMD pack $SCRIPT_DIR/pkg/Tizen.NET.Private.nuspec -Symbols -NoPackageAnalysis $NUGET_VERSION_OPT -BasePath $OUTDIR -OutputDirectory $OUTDIR + $NUGET_CMD pack $SCRIPT_DIR/pkg/Tizen.NET.nuspec -Symbols -NoPackageAnalysis $NUGET_VERSION_OPT -BasePath $OUTDIR -OutputDirectory $OUTDIR } cmd_dummy_build() { dotnet build $SCRIPT_DIR/pkg/Tizen.NET.Dummy.csproj --configuration=Release } -OPTS=`getopt -o hcbfd --long help,clean,build,full,dummy -n 'build' -- "$@"` +OPTS=`getopt -o hcbfpd --long help,clean,build,full,pack,dummy -n 'build' -- "$@"` if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; usage; exit 1 ; fi eval set -- "$OPTS" @@ -53,6 +62,7 @@ FLAG_FULL=false FLAG_BUILD=false FLAG_CLEAN=false FLAG_DUMMY=false +FLAG_PACK=false while true; do case "$1" in @@ -60,16 +70,18 @@ while true; do -b|--build) FLAG_BUILD=true; shift ;; -f|--full) FLAG_FULL=true; shift ;; -d|--dummy) FLAG_DUMMY=true; shift ;; + -p|--pack) FLAG_PACK=true; shift ;; -c|--clean) FLAG_CLEAN=true; shift ;; --) shift; break ;; *) break ;; esac done -if $FLAG_HELP; then usage; exit 1; fi -if $FLAG_CLEAN; then cmd_clean; exit 1; fi -if $FLAG_FULL; then cmd_full_build; exit 1; fi -if $FLAG_BUILD; then cmd_build $@; exit 1; fi -if $FLAG_DUMMY; then cmd_dummy_build; exit 1; fi +if $FLAG_HELP; then usage; exit 0; fi +if $FLAG_CLEAN; then cmd_clean; exit 0; fi +if $FLAG_FULL; then cmd_full_build; exit 0; fi +if $FLAG_BUILD; then cmd_build $@; exit 0; fi +if $FLAG_PACK; then cmd_pack $@; exit 0; fi +if $FLAG_DUMMY; then cmd_dummy_build; exit 0; fi -usage; \ No newline at end of file +usage; diff --git a/packaging/csapi-tizenfx.manifest b/packaging/csapi-tizenfx.manifest new file mode 100644 index 000000000..75b0fa5e3 --- /dev/null +++ b/packaging/csapi-tizenfx.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/csapi-tizenfx.spec b/packaging/csapi-tizenfx.spec new file mode 100644 index 000000000..7570c8a42 --- /dev/null +++ b/packaging/csapi-tizenfx.spec @@ -0,0 +1,190 @@ +# !! IMPORTANT !! +# This packaging spec file is for developer testing only. +# For Tizen release, the spec file in the tizen branch should be used. + +%define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework +%define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref +%define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res +%define DOTNET_NUGET_SOURCE /nuget + +%define _tizenfx_bin_path Artifacts + +Name: csapi-tizenfx +Summary: Assemblies of Tizen .NET +Version: 99.99.99 +Release: 1 +Group: Development/Libraries +License: Apache-2.0 +URL: https://www.tizen.org +Source0: %{name}-%{version}.tar.gz +Source1: %{name}.manifest + +BuildRequires: dotnet-build-tools + +BuildArch: noarch +AutoReqProv: no + +%description +%{summary} + +%package nuget +Summary: NuGet package for %{name} +Group: Development/Libraries +AutoReqProv: no + +%description nuget +NuGet package for %{name} + +%package dummy +Summary: Dummy assemblies of Tizen .NET +Group: Development/Libraries +AutoReqProv: no + +%description dummy +Dummy assemblies of Tizen .NET + +%package full +Summary: All Tizen .NET assemblies +Group: Development/Libraries +AutoReqProv: no + +%description full +All Tizen .NET assemblies + +%package debug +Summary: All .pdb files of Tizen .NET +Group: Development/Libraries +AutoReqProv: no + +%description debug +All .pdb files of Tizen .NET + +%package common +Summary: Tizen .NET assemblies for Common profile +Group: Development/Libraries +Requires: csapi-tizenfx-dummy +AutoReqProv: no + +%description common +Tizen .NET assemblies for Common profile + +%package mobile +Summary: Tizen .NET assemblies for Mobile profile +Group: Development/Libraries +Requires: csapi-tizenfx-dummy +AutoReqProv: no + +%description mobile +Tizen .NET assemblies for Mobile profile + +%package mobile-emul +Summary: Tizen .NET assemblies for Emulator of Mobile profile +Group: Development/Libraries +Requires: csapi-tizenfx-dummy +AutoReqProv: no + +%description mobile-emul +Tizen .NET assemblies for Emulator of Mobile profile + +%package tv +Summary: Tizen .NET assemblies for TV profile +Group: Development/Libraries +Requires: csapi-tizenfx-dummy +AutoReqProv: no + +%description tv +Tizen .NET assemblies for TV profile + +%package ivi +Summary: Tizen .NET assemblies for IVI profile +Group: Development/Libraries +Requires: csapi-tizenfx-dummy +AutoReqProv: no + +%description ivi +Tizen .NET assemblies for IVI profile + +%package wearable +Summary: Tizen .NET assemblies for Wearable profile +Group: Development/Libraries +Requires: csapi-tizenfx-dummy +AutoReqProv: no + +%description wearable +Tizen .NET assemblies for Wearable profile + +%prep +%setup -q +cp %{SOURCE1} . + +%build + +GetFileList() { + PROFILE=$1 + cat pkg/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#" +} + +GetFileList common > common.filelist +GetFileList mobile > mobile.filelist +GetFileList mobile-emul > mobile-emul.filelist +GetFileList tv > tv.filelist +GetFileList ivi > ivi.filelist +GetFileList wearable > wearable.filelist + +rm -fr %{_tizenfx_bin_path}/bin +rm -f %{_tizenfx_bin_path}/*.nupkg +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true +./build.sh --full +./build.sh --dummy +./build.sh --pack + +%install +mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH} +mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH} +mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH} +mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE} + +install -p -m 644 %{_tizenfx_bin_path}/bin/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH} +install -p -m 644 %{_tizenfx_bin_path}/bin/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH} +install -p -m 644 %{_tizenfx_bin_path}/bin/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH} +install -p -m 644 %{_tizenfx_bin_path}/bin_dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH} +install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE} + +%files nuget +%{DOTNET_NUGET_SOURCE}/*.nupkg + +%files dummy +%attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll + +%files full +%manifest %{name}.manifest +%license LICENSE +%attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll +%attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/* + +%files debug +%attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb + +%files common -f common.filelist +%manifest %{name}.manifest +%license LICENSE + +%files mobile -f mobile.filelist +%manifest %{name}.manifest +%license LICENSE + +%files mobile-emul -f mobile-emul.filelist +%manifest %{name}.manifest +%license LICENSE + +%files tv -f tv.filelist +%manifest %{name}.manifest +%license LICENSE + +%files ivi -f ivi.filelist +%manifest %{name}.manifest +%license LICENSE + +%files wearable -f wearable.filelist +%manifest %{name}.manifest +%license LICENSE diff --git a/pkg/PlatformFileList.txt b/pkg/PlatformFileList.txt new file mode 100644 index 000000000..dc86dc1a3 --- /dev/null +++ b/pkg/PlatformFileList.txt @@ -0,0 +1,85 @@ +ElmSharp.dll #common #mobile #mobile-emul #tv #ivi #wearable +ElmSharp.Wearable.dll #wearable +res/maps_marker_pin_48.png #mobile #mobile-emul #tv +res/maps_marker_pin_72.png #mobile #mobile-emul #tv +res/maps_marker_sticker_48.png #mobile #mobile-emul #tv +res/maps_marker_sticker_72.png #mobile #mobile-emul #tv +Tizen.Account.AccountManager.dll #mobile #mobile-emul #ivi +Tizen.Account.FidoClient.dll #mobile #mobile-emul +Tizen.Account.OAuth2.dll #mobile #mobile-emul #ivi +Tizen.Applications.Alarm.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.AttachPanel.dll +Tizen.Applications.Badge.dll #mobile #mobile-emul #ivi +Tizen.Applications.Common.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.DataControl.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.MessagePort.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.Notification.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.NotificationEventListener.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.PackageManager.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.Preference.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.RemoteView.dll #mobile #mobile-emul #tv +Tizen.Applications.Service.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.ToastMessage.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.UI.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Applications.WatchApplication.dll #wearable +Tizen.Applications.WidgetApplication.dll #mobile #mobile-emul #tv #ivi +Tizen.Applications.WidgetControl.dll #mobile #mobile-emul #tv #ivi +Tizen.Content.Download.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Content.MediaContent.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Content.MimeType.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Context.dll #mobile #mobile-emul +Tizen.Convergence.dll #common #mobile #mobile-emul #ivi #wearable +Tizen.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Location.dll #mobile #mobile-emul #tv #ivi #wearable +Tizen.Location.Geofence.dll #mobile #mobile-emul +Tizen.Log.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Maps.dll #mobile #mobile-emul #tv +Tizen.Messaging.dll #mobile #mobile-emul +Tizen.Messaging.Push.dll #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.AudioIO.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.Camera.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.MediaCodec.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.MediaPlayer.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.Metadata.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.Radio.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.Recorder.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.Remoting.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.StreamRecorder.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.Util.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Multimedia.Vision.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Network.Bluetooth.dll #common #mobile #tv #ivi #wearable +Tizen.Network.Connection.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Network.IoTConnectivity.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Network.Mtp.dll +Tizen.Network.Nfc.dll #mobile #mobile-emul #ivi #wearable +Tizen.Network.Nsd.dll #common #mobile #mobile-emul #wearable +Tizen.Network.Smartcard.dll #mobile #mobile-emul #ivi #wearable +Tizen.Network.WiFi.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Network.WiFiDirect.dll #mobile #tv #ivi +Tizen.NUI.dll #common #mobile #mobile-emul #tv +Tizen.PhonenumberUtils.dll #mobile #mobile-emul +Tizen.Pims.Calendar.dll #common #mobile #mobile-emul +Tizen.Pims.Contacts.dll #mobile #mobile-emul +Tizen.Security.dll #mobile #mobile-emul #tv #ivi #wearable +Tizen.Security.SecureRepository.dll #mobile #mobile-emul #tv #ivi #wearable +Tizen.Security.TEEC.dll #mobile #mobile-emul #tv #ivi #wearable +Tizen.Sensor.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.System.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.System.Feedback.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.System.Information.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.System.MediaKey.dll #common #mobile #mobile-emul #ivi #wearable +Tizen.System.PlatformConfig.dll +Tizen.System.Storage.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.System.SystemSettings.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Tapi.dll +Tizen.Telephony.dll #mobile #mobile-emul #ivi +Tizen.Tracer.dll #common #mobile #mobile-emul #tv #ivi #wearable +Tizen.Uix.InputMethod.dll #common #mobile #mobile-emul #ivi +Tizen.Uix.InputMethodManager.dll #common #mobile #mobile-emul #tv #ivi +Tizen.Uix.Stt.dll #mobile #mobile-emul #tv +Tizen.Uix.SttEngine.dll #mobile #mobile-emul +Tizen.Uix.Tts.dll #mobile #mobile-emul #tv +Tizen.Uix.TtsEngine.dll #mobile #mobile-emul +Tizen.Uix.VoiceControl.dll #mobile #mobile-emul #tv #ivi +Tizen.WebView.dll #common #mobile #mobile-emul #tv #ivi #wearable diff --git a/pkg/Tizen.NET.Dummy.csproj b/pkg/Tizen.NET.Dummy.csproj index d6db19fc8..33ec2b3d2 100644 --- a/pkg/Tizen.NET.Dummy.csproj +++ b/pkg/Tizen.NET.Dummy.csproj @@ -10,7 +10,7 @@ - $(MSBuildThisFileDirectory)..\tools\ + $(MSBuildThisFileDirectory)..\tools\GenAPI\ $(MSBuildThisFileDirectory)\..\Artifacts\bin\ $(MSBuildThisFileDirectory)obj\_ref_lib\ $(MSBuildThisFileDirectory)obj\_ref_api\ diff --git a/tools/GenAPI.exe b/tools/GenAPI.exe deleted file mode 100755 index 53b147303..000000000 Binary files a/tools/GenAPI.exe and /dev/null differ diff --git a/tools/GenAPI.runtimeconfig.json b/tools/GenAPI.runtimeconfig.json deleted file mode 100644 index d5ff8e270..000000000 --- a/tools/GenAPI.runtimeconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "runtimeOptions": { - "tfm": "netcoreapp2.0", - "framework": { - "name": "Microsoft.NETCore.App", - "version": "2.0.0" - } - } -} diff --git a/tools/GenAPI/GenAPI.exe b/tools/GenAPI/GenAPI.exe new file mode 100755 index 000000000..53b147303 Binary files /dev/null and b/tools/GenAPI/GenAPI.exe differ diff --git a/tools/GenAPI/GenAPI.runtimeconfig.json b/tools/GenAPI/GenAPI.runtimeconfig.json new file mode 100644 index 000000000..d5ff8e270 --- /dev/null +++ b/tools/GenAPI/GenAPI.runtimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "netcoreapp2.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "2.0.0" + } + } +} diff --git a/tools/GenAPI/Microsoft.Cci.Extensions.dll b/tools/GenAPI/Microsoft.Cci.Extensions.dll new file mode 100644 index 000000000..2ce23b69e Binary files /dev/null and b/tools/GenAPI/Microsoft.Cci.Extensions.dll differ diff --git a/tools/GenAPI/Microsoft.Cci.dll b/tools/GenAPI/Microsoft.Cci.dll new file mode 100755 index 000000000..0956d9a96 Binary files /dev/null and b/tools/GenAPI/Microsoft.Cci.dll differ diff --git a/tools/Microsoft.Cci.Extensions.dll b/tools/Microsoft.Cci.Extensions.dll deleted file mode 100644 index 2ce23b69e..000000000 Binary files a/tools/Microsoft.Cci.Extensions.dll and /dev/null differ diff --git a/tools/Microsoft.Cci.dll b/tools/Microsoft.Cci.dll deleted file mode 100755 index 0956d9a96..000000000 Binary files a/tools/Microsoft.Cci.dll and /dev/null differ diff --git a/tools/NuGet.exe b/tools/NuGet.exe new file mode 100644 index 000000000..ec1309c7a Binary files /dev/null and b/tools/NuGet.exe differ