Apply dotnet RPM macros 39/106539/3 accepted/tizen/mobile/20161229.113213 accepted/tizen/tv/20161229.113319 submit/tizen/20161229.014738
authorWonYoung Choi <wy80.choi@samsung.com>
Thu, 22 Dec 2016 04:41:31 +0000 (13:41 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Thu, 29 Dec 2016 04:16:40 +0000 (13:16 +0900)
dotnet-build-tools provides RPM macros to support C# build.
Each package doesn't need to define macros itself such as
%dotnet_assembly_path, %_dotnet_build_conf, %dotnet_assembly_files,
and so on.

Change-Id: I36e712984e689b938c5872befe4680044004a8de

packaging/dotnet-launcher.spec

index 7e12b6e..1d82f0d 100644 (file)
@@ -1,11 +1,9 @@
-%{!?dotnet_assembly_path: %define dotnet_assembly_path %{_datadir}/assembly}
-
 Name:       dotnet-launcher
 Summary:    Launchpad plugin for dotnet apps
 Version:    1.0.1
 Release:    2
 Group:      Application Framework/Application State Management
-License:    Apache License, Version 2.0
+License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 AutoReqProv: no
 
@@ -19,10 +17,8 @@ BuildRequires: pkgconfig(pkgmgr-info)
 BuildRequires: pkgconfig(pkgmgr-installer)
 BuildRequires: pkgconfig(elementary)
 BuildRequires: aul-devel
-BuildRequires: mono-compiler
-BuildRequires: mono-devel 
-BuildRequires: csapi-tizen-nuget 
 BuildRequires: dotnet-build-tools
+
 Requires: aul
 
 Requires(post): /sbin/ldconfig
@@ -34,8 +30,8 @@ Requires(preun): /usr/bin/systemctl
 %define _loaderdir %{_prefix}/share/aul
 %define _configdir /etc
 %define _device_api_dir %{dotnet_assembly_path}
-%define _runtime_dir /opt/usr/share/dotnet/shared/Microsoft.NETCore.App/1.1.0
-%define _preload_dir /opt/usr/share/dotnet.tizen/preload
+%define _runtime_dir /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0
+%define _preload_dir /usr/share/dotnet.tizen/preload
 %define _install_plugin_dir /usr/etc/package-manager/parserlib
 
 ExcludeArch: %{ix86} aarch64
@@ -47,11 +43,6 @@ Launchpad plugin for launching dotnet apps
 %setup -q
 
 %build
-%if 0%{?tizen_build_devel_mode}
-%define _buildmode Debug
-%else
-%define _buildmode Release
-%endif
 cmake \
        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
        -DPACKAGE_NAME=%{name} \
@@ -59,7 +50,7 @@ cmake \
        -DBINDIR=%{_bindir} \
        -DLOADERDIR=%{_loaderdir} \
        -DCONFIGDIR=%{_configdir} \
-       -DCMAKE_BUILD_TYPE=%{_buildmode} \
+       -DCMAKE_BUILD_TYPE=%{_dotnet_build_conf} \
        -DDEVICE_API_DIR=%{_device_api_dir} \
        -DRUNTIME_DIR=%{_runtime_dir} \
        -DCROSSGEN_PATH=%{_device_api_dir}/crossgen \
@@ -74,14 +65,14 @@ make %{?jobs:-j%jobs} VERBOSE=1
 nuget restore Tizen.Runtime/Tizen.Runtime.Coreclr.project.json
 
 xbuild \
-       /p:Configuration=%{_buildmode} \
+       /p:Configuration=%{_dotnet_build_conf} \
        /p:PreloadPath=%{_preload_dir} \
        Tizen.Runtime/Tizen.Runtime.Coreclr.csproj
 
 nuget restore Tizen.Runtime/Tizen.Runtime.Mono.project.json
 
 xbuild \
-       /p:Configuration=%{_buildmode} \
+       /p:Configuration=%{_dotnet_build_conf} \
        /p:PreloadPath=%{_preload_dir} \
        Tizen.Runtime/Tizen.Runtime.Mono.csproj