2 Summary: Launchpad plugin for dotnet apps
5 Group: Application Framework/Application State Management
7 Source0: %{name}-%{version}.tar.gz
12 BuildRequires: pkgconfig(aul)
13 BuildRequires: pkgconfig(bundle)
14 BuildRequires: pkgconfig(dlog)
15 BuildRequires: pkgconfig(ecore)
16 BuildRequires: pkgconfig(liblaunchpad)
17 BuildRequires: pkgconfig(liblaunchpad-hydra)
18 BuildRequires: pkgconfig(pkgmgr-info)
19 BuildRequires: pkgconfig(pkgmgr-installer)
20 BuildRequires: pkgconfig(glib-2.0)
21 BuildRequires: pkgconfig(libsmack)
22 BuildRequires: pkgconfig(capi-appfw-app-common)
23 BuildRequires: pkgconfig(storage)
24 BuildRequires: pkgconfig(jsoncpp)
25 BuildRequires: pkgconfig(openssl1.1)
26 BuildRequires: pkgconfig(libsystemd)
27 BuildRequires: pkgconfig(libtzplatform-config)
28 BuildRequires: sqlite-devel
29 BuildRequires: boost-devel
30 BuildRequires: aul-devel
31 BuildRequires: dotnet-build-tools
33 BuildRequires: coreclr-devel
36 BuildRequires: clang >= 3.8
37 BuildRequires: compiler-rt
41 Requires: liblaunchpad
44 Requires: corefx-native
45 Requires: corefx-managed
48 Requires(post): /sbin/ldconfig
49 Requires(post): /usr/bin/systemctl
50 Requires(post): /usr/bin/chsmack
51 Requires(postun): /sbin/ldconfig
52 Requires(postun): /usr/bin/systemctl
53 Requires(preun): /usr/bin/systemctl
55 %define _loaderdir %{_prefix}/share/aul
56 %define _device_api_dir %{dotnet_assembly_path}
57 %define _runtime_dir /usr/share/dotnet.tizen/netcoreapp
58 %define _framework_dir /usr/share/dotnet.tizen/framework
59 %define _install_mdplugin_dir /etc/package-manager/parserlib/metadata
60 %define _install_plugin_dir /etc/package-manager/parserlib
61 %define _native_lib_dir /usr/share/dotnet.tizen/lib
62 %define _dotnet_dir /opt/usr/dotnet
63 %define _readonly_app_update_dir /opt/usr/dotnet/apps
64 %define _system_base_addr_file /opt/usr/dotnet.system.base.addr
65 %define _tizen_preload_dir /usr/share/dotnet.tizen/preload
67 %ifarch x86_64 aarch64
68 %define _default_base_addr_start 0x6000000000
72 %define _default_base_addr_start 0x30000000
75 %define _rw_update_scripts_dir /usr/share/upgrade/scripts
76 %define _rw_dotnet_update_script 715.dotnet_regen_app_ni.patch.sh
78 %define _build_dotnet_plugin 0
81 Launchpad plugin for launching dotnet apps
84 Summary: dotnet corerun for gbs environment
87 Requires: corefx-native
88 Requires: corefx-managed
90 %description gbs-support
91 This package contains only dotnet-corerun executable to run dotnet processes in gbs build environment
94 Summary: Libraries and Header Files for dotnet-launcher plugins and AOTC tools
97 This package contains library and header files needed to develop plugins for dotnet-launcher
106 %if 0%{?asan_enabled}
107 %define _dotnet_build_conf Debug
108 export CFLAGS=" --target=%{_host} "
109 export CXXFLAGS=" --target=%{_host} "
111 export CFLAGS=$(echo $CFLAGS | sed -e 's/--target=i686/--target=i586/')
112 export CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/--target=i686/--target=i586/')
116 %ifarch x86_64 aarch64
117 export CFLAGS+=" -DBIT64 -DHOST_64BIT "
118 export CXXFLAGS+=" -DBIT64 -DHOST_64BIT "
121 dotnet msbuild Managed /t:clean
122 dotnet msbuild Managed /t:restore /p:RestoreSources=/nuget
123 dotnet msbuild Managed /p:Configuration=Release
126 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
127 %if 0%{?asan_enabled}
128 -DCMAKE_C_COMPILER=clang \
129 -DCMAKE_CXX_COMPILER=clang++ \
130 -DASAN_ENABLED=TRUE \
132 -DLIBDIR=%{_libdir} \
133 -DBINDIR=%{_bindir} \
134 -DINCLUDEDIR=%{_includedir} \
135 -DLOADERDIR=%{_loaderdir} \
136 -DCMAKE_BUILD_TYPE=%{_dotnet_build_conf} \
137 -DDEVICE_API_DIR=%{_device_api_dir} \
138 -DRUNTIME_DIR=%{_runtime_dir} \
139 -DFRAMEWORK_DIR=%{_framework_dir} \
140 -DCROSSGEN_PATH=%{_runtime_dir}/crossgen \
141 -DINSTALL_MDPLUGIN_DIR=%{_install_mdplugin_dir} \
142 -DINSTALL_PLUGIN_DIR=%{_install_plugin_dir} \
143 -DDOTNET_DIR=%{_dotnet_dir} \
144 -DREAD_ONLY_APP_UPDATE_DIR=%{_readonly_app_update_dir} \
145 -DVERSION=%{version} \
146 -DNATIVE_LIB_DIR=%{_native_lib_dir} \
147 %ifarch %{arm} aarch64
148 %if 0%{?use_default_base_addr}
149 -DUSE_DEFAULT_BASE_ADDR="" \
151 -DUNIQUE_DEFAULT_BASE_ADDR_SUPPORT="" \
152 -DSYSTEM_BASE_FILE=%{_system_base_addr_file} \
153 -DDEFAULT_BASE_ADDR_START=%{_default_base_addr_start} \
155 %if 0%{_build_dotnet_plugin}
156 -DBUILD_DOTNET_PLUGIN="" \
160 make %{?jobs:-j%jobs} VERBOSE=1
165 mkdir -p %{buildroot}%{_framework_dir}
166 mv Managed/Tizen.Runtime/bin/Release/Tizen.Runtime.dll %{buildroot}%{_framework_dir}
167 mv Managed/Tizen.Runtime/bin/Release/Tizen.Runtime.pdb %{buildroot}%{_framework_dir}
169 mkdir -p %{buildroot}%{_dotnet_dir}
170 mkdir -p %{buildroot}%{_readonly_app_update_dir}
171 mkdir -p %{buildroot}%{_native_lib_dir}
172 ln -sf %{_libdir}/libsqlite3.so.0 %{buildroot}%{_native_lib_dir}/libsqlite3.so
174 mkdir -p %{buildroot}%{_tmpfilesdir}
175 install -m 0644 %{name}.conf %{buildroot}%{_tmpfilesdir}/%{name}.conf
177 mkdir -p %{buildroot}%{_tizen_preload_dir}
178 mv packaging/10.Dotnet.Launcher.preload %{buildroot}%{_tizen_preload_dir}
181 cp -a %{buildroot}%{_bindir}/dotnet %{buildroot}%{_bindir}/dotnet-corerun
183 # for crossgen2-support
184 cp -a %{buildroot}%{_bindir}/dotnet %{buildroot}%{_bindir}/dotnet-inhouse
186 # to support fota upgrade
187 mkdir -p %{buildroot}/%{_rw_update_scripts_dir}
188 install -m 0755 packaging/%{_rw_dotnet_update_script} %{buildroot}/%{_rw_update_scripts_dir}/%{_rw_dotnet_update_script}
191 mkdir -p /opt/etc/skel/.dotnet
192 chsmack -t -a User::App::Shared /opt/etc/skel/.dotnet
193 ln -sf /usr/bin/dotnet-loader /usr/bin/dotnet-nui-loader
194 chsmack -a User /usr/bin/dotnet-nui-loader
197 %manifest dotnet-launcher.manifest
198 %{_loaderdir}/dotnet.loader
199 %{_loaderdir}/dotnet.launcher
200 %{_loaderdir}/dotnet.debugger
201 %{_loaderdir}/dotnet-nui.loader
202 %{_loaderdir}/dotnet-nui.launcher
203 %{_loaderdir}/dotnet-nui.debugger
204 %{_native_lib_dir}/libsqlite3.so
206 %{_bindir}/dotnettool
207 %{_install_mdplugin_dir}/libprefer_nuget_cache_plugin.so
208 %{_install_mdplugin_dir}/libprefer_dotnet_aot_plugin.so
209 %{_install_plugin_dir}/libdotnet_apptype_plugin.so
210 %{_bindir}/dotnet-launcher
211 %{_bindir}/dotnet-loader
213 %{_bindir}/dotnet-inhouse
214 %{_bindir}/dotnet-hydra-loader
215 %{_libdir}/libdotnet_launcher_util.so
216 %{_libdir}/libdotnet_launcher_core.so
217 %{_libdir}/libni_common.so
218 %{_libdir}/libtac_common.so
219 %{_libdir}/libprofile_common.so
220 %{_libdir}/libprivilege_common.so
221 %{_libdir}/libmulti_target_resolver.so
222 %{_tmpfilesdir}/%{name}.conf
223 /usr/share/parser-plugins/dotnet-launcher.info
224 %{_framework_dir}/Tizen.Runtime.dll
226 %{_readonly_app_update_dir}
227 %{_tizen_preload_dir}
228 %{_rw_update_scripts_dir}/%{_rw_dotnet_update_script}
229 %if 0%{_build_dotnet_plugin}
230 %{_native_lib_dir}/libdotnet_plugin.so
234 %manifest dotnet-launcher.manifest
235 %defattr(-,root,root,-)
236 %{_includedir}/ni_common.h
237 %{_includedir}/tac_common.h
238 %{_includedir}/profile_common.h
239 %{_includedir}/privilege_common.h
240 %{_includedir}/dotnet_launcher_plugin.h
241 %{_includedir}/coreclr_host.h
242 %{_libdir}/libdotnet_launcher_util.so
243 %{_libdir}/libni_common.so
244 %{_libdir}/libtac_common.so
245 %{_libdir}/libprofile_common.so
246 %{_libdir}/libprivilege_common.so
247 %{_libdir}/pkgconfig/dotnet-launcher.pc
248 %{_framework_dir}/Tizen.Runtime.pdb
251 %{_bindir}/dotnet-corerun