Merge "Initialize coreclr in the candidate process and change ON_BOOT value to OFF...
[platform/core/dotnet/launcher.git] / packaging / dotnet-launcher.spec
1 Name:       dotnet-launcher
2 Summary:    Launchpad plugin for dotnet apps
3 Version:    1.1.0
4 Release:    1
5 Group:      Application Framework/Application State Management
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 AutoReqProv: no
9
10 BuildRequires: cmake
11 BuildRequires: pkgconfig(aul)
12 BuildRequires: pkgconfig(bundle)
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(ecore)
15 BuildRequires: pkgconfig(launchpad)
16 BuildRequires: pkgconfig(pkgmgr-info)
17 BuildRequires: pkgconfig(pkgmgr-installer)
18 BuildRequires: pkgconfig(elementary)
19 BuildRequires: pkgconfig(glib-2.0)
20 BuildRequires: aul-devel
21 BuildRequires: dotnet-build-tools
22
23 %if 0%{?asan_enabled}
24 BuildRequires: clang >= 3.8
25 BuildRequires: compiler-rt
26 %endif
27
28 Requires: aul
29 Requires: launchpad
30
31 Requires(post): /sbin/ldconfig
32 Requires(post): /usr/bin/systemctl
33 Requires(postun): /sbin/ldconfig
34 Requires(postun): /usr/bin/systemctl
35 Requires(preun): /usr/bin/systemctl
36
37 %define _loaderdir %{_prefix}/share/aul
38 %define _configdir /etc
39 %define _device_api_dir %{dotnet_assembly_path}
40 %define _runtime_dir /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0
41 %define _install_plugin_dir /usr/etc/package-manager/parserlib
42 %define _install_mdplugin_dir /etc/package-manager/parserlib/metadata
43 %define _native_lib_dir /usr/share/dotnet.tizen/lib
44
45 ExcludeArch: aarch64
46
47 %description
48 Launchpad plugin for launching dotnet apps
49
50
51 %prep
52 %setup -q
53
54 %build
55
56 %if 0%{?asan_enabled}
57 %define _dotnet_build_conf Debug
58 export CFLAGS=" --target=%{_host} "
59 export CXXFLAGS=" --target=%{_host} "
60 %ifarch %{ix86}
61 export CFLAGS=$(echo $CFLAGS | sed -e 's/--target=i686/--target=i586/')
62 export CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/--target=i686/--target=i586/')
63 %endif
64 %endif
65
66 cmake \
67         -DCMAKE_INSTALL_PREFIX=%{_prefix} \
68 %if 0%{?asan_enabled}
69         -DCMAKE_C_COMPILER=clang \
70         -DCMAKE_CXX_COMPILER=clang++ \
71         -DASAN_ENABLED=TRUE \
72 %endif
73         -DPACKAGE_NAME=%{name} \
74         -DLIBDIR=%{_libdir} \
75         -DBINDIR=%{_bindir} \
76         -DLOADERDIR=%{_loaderdir} \
77         -DCONFIGDIR=%{_configdir} \
78         -DCMAKE_BUILD_TYPE=%{_dotnet_build_conf} \
79         -DDEVICE_API_DIR=%{_device_api_dir} \
80         -DRUNTIME_DIR=%{_runtime_dir} \
81         -DCROSSGEN_PATH=%{_device_api_dir}/crossgen \
82         -DINSTALL_PLUGIN_DIR=%{_install_plugin_dir} \
83         -DINSTALL_MDPLUGIN_DIR=%{_install_mdplugin_dir} \
84         -DVERSION=%{version} \
85         -DNATIVE_LIB_DIR=%{_native_lib_dir} \
86         NativeLauncher
87
88 make %{?jobs:-j%jobs} VERBOSE=1
89
90 %install
91 rm -rf %{buildroot}
92 %make_install
93
94 mkdir -p %{buildroot}%{_native_lib_dir}
95 ln -sf %{_libdir}/libsqlite3.so.0 %{buildroot}%{_native_lib_dir}/libsqlite3.so
96
97 %files
98 %manifest dotnet-launcher.manifest
99 %{_loaderdir}/dotnet.loader
100 %{_loaderdir}/dotnet.launcher
101 %{_loaderdir}/dotnet.debugger
102 %{_native_lib_dir}/libsqlite3.so
103 %{_bindir}/nitool
104 #%{_install_plugin_dir}/libui-application.so
105 %{_install_mdplugin_dir}/libprefer_dotnet_aot_plugin.so
106 %{_bindir}/dotnet-launcher
107