-%{!?dotnet_assembly_path: %define dotnet_assembly_path %{_datadir}/assembly}
-
Name: dotnet-launcher
Summary: Launchpad plugin for dotnet apps
-Version: 1.0.1
-Release: 2
+Version: 1.1.0
+Release: 1
Group: Application Framework/Application State Management
-License: Apache License, Version 2.0
+License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
AutoReqProv: no
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(launchpad)
+BuildRequires: pkgconfig(pkgmgr-info)
+BuildRequires: pkgconfig(pkgmgr-installer)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(glib-2.0)
BuildRequires: aul-devel
-BuildRequires: mono-compiler
-BuildRequires: mono-devel
-BuildRequires: csapi-tizen-nuget
BuildRequires: dotnet-build-tools
+
+# Required by scd-launcher
+BuildRequires: appcore-agent
+BuildRequires: pkgconfig(appcore-agent)
+BuildRequires: pkgconfig(capi-appfw-app-control)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(capi-appfw-service-application)
+BuildRequires: pkgconfig(capi-appfw-service-application)
+
+
Requires: aul
Requires(post): /sbin/ldconfig
%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.0.0
-%define _preload_dir /opt/usr/share/dotnet.tizen/preload
+%define _runtime_dir /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0
+%define _install_plugin_dir /usr/etc/package-manager/parserlib
+%define _install_mdplugin_dir /etc/package-manager/parserlib/metadata
+%define _native_lib_dir /usr/share/dotnet.tizen/lib
+
+ExcludeArch: aarch64
%description
Launchpad plugin for launching dotnet apps
+%package -n scd-launcher
+Summary: self-contained dotnet launcher
+%description -n scd-launcher
+launching dotnet apps without dotent runtime installed
+
+
%prep
%setup -q
-%build
-%if 0%{?tizen_build_devel_mode}
-%define _buildmode Debug
-%else
-%define _buildmode Release
+%define use_managed_launcher 0
+%if %{use_managed_launcher}
+ %define USE_MANAGED_LAUNCHER ENABLE
%endif
+
+%build
cmake \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DPACKAGE_NAME=%{name} \
-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} \
- -DCORECLR_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.Coreclr.dll \
- -DMONO_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.Mono.dll \
+ -DCROSSGEN_PATH=%{_device_api_dir}/crossgen \
+%if %{use_managed_launcher}
+ -DCORECLR_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.dll \
+%endif
+ -DINSTALL_PLUGIN_DIR=%{_install_plugin_dir} \
+ -DINSTALL_MDPLUGIN_DIR=%{_install_mdplugin_dir} \
-DVERSION=%{version} \
+ -DUSE_MANAGED_LAUNCHER=%{?USE_MANAGED_LAUNCHER:%USE_MANAGED_LAUNCHER} \
+ -DNATIVE_LIB_DIR=%{_native_lib_dir} \
NativeLauncher
make %{?jobs:-j%jobs} VERBOSE=1
-nuget restore Tizen.Runtime/Tizen.Runtime.Coreclr.project.json
-
-xbuild \
- /p:Configuration=%{_buildmode} \
- /p:PreloadPath=%{_preload_dir} \
- Tizen.Runtime/Tizen.Runtime.Coreclr.csproj
-
-nuget restore Tizen.Runtime/Tizen.Runtime.Mono.project.json
-
-xbuild \
- /p:Configuration=%{_buildmode} \
- /p:PreloadPath=%{_preload_dir} \
- Tizen.Runtime/Tizen.Runtime.Mono.csproj
+%dotnet_build Tizen.Runtime
%install
rm -rf %{buildroot}
%make_install
-install -p -m 644 Tizen.Runtime/bin/Tizen.Runtime.Coreclr.dll %{buildroot}%{_bindir}
-install -p -m 644 Tizen.Runtime/bin/Tizen.Runtime.Mono.dll %{buildroot}%{_bindir}
+%if %{use_managed_launcher}
+install -p -m 644 Tizen.Runtime/bin/*/*/Tizen.Runtime.dll %{buildroot}%{_bindir}
+%endif
+
+mkdir -p %{buildroot}%{_native_lib_dir}
+ln -sf %{_libdir}/libsqlite3.so.0 %{buildroot}%{_native_lib_dir}/libsqlite3.so
%files
%manifest dotnet-launcher.manifest
%{_loaderdir}/dotnet.loader
%{_loaderdir}/dotnet.launcher
+%{_loaderdir}/dotnet.debugger
+%{_native_lib_dir}/libsqlite3.so
%caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/dotnet-launcher
-%caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/Tizen.Runtime.Coreclr.dll
-%caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/Tizen.Runtime.Mono.dll
+%caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/nitool
+%caps(cap_mac_admin,cap_setgid=ei) %{_install_plugin_dir}/libui-application.so
+%caps(cap_mac_admin,cap_setgid=ei) %{_install_mdplugin_dir}/libprefer_dotnet_aot_plugin.so
+%if %{use_managed_launcher}
+%caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/Tizen.Runtime.dll
+%endif
+
+%files -n scd-launcher
+%caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/scd-launcher