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-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: aul-devel
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 /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0
+%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
+%define use_managed_launcher 0
+%if %{use_managed_launcher}
+ %define USE_MANAGED_LAUNCHER ENABLE
+%endif
+
%build
cmake \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DDEVICE_API_DIR=%{_device_api_dir} \
-DRUNTIME_DIR=%{_runtime_dir} \
-DCROSSGEN_PATH=%{_device_api_dir}/crossgen \
- -DCORECLR_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.Coreclr.dll \
- -DMONO_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.Mono.dll \
+%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=%{_dotnet_build_conf} \
- Tizen.Runtime/Tizen.Runtime.Coreclr.csproj
-
-nuget restore Tizen.Runtime/Tizen.Runtime.Mono.project.json
-
-xbuild \
- /p:Configuration=%{_dotnet_build_conf} \
- 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}/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
-%caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/Tizen.Runtime.Coreclr.dll
-%caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/Tizen.Runtime.Mono.dll
+%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