Merge "Revert "temporal patch for setting LANG environment value"" into tizen
[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 Requires: aul
24 Requires: launchpad
25
26 Requires(post): /sbin/ldconfig
27 Requires(post): /usr/bin/systemctl
28 Requires(postun): /sbin/ldconfig
29 Requires(postun): /usr/bin/systemctl
30 Requires(preun): /usr/bin/systemctl
31
32 %define _loaderdir %{_prefix}/share/aul
33 %define _configdir /etc
34 %define _device_api_dir %{dotnet_assembly_path}
35 %define _runtime_dir /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0
36 %define _install_plugin_dir /usr/etc/package-manager/parserlib
37 %define _install_mdplugin_dir /etc/package-manager/parserlib/metadata
38 %define _native_lib_dir /usr/share/dotnet.tizen/lib
39
40 ExcludeArch: aarch64
41
42 %description
43 Launchpad plugin for launching dotnet apps
44
45
46 %prep
47 %setup -q
48
49 %define use_managed_launcher 0
50 %if %{use_managed_launcher}
51         %define USE_MANAGED_LAUNCHER ENABLE
52 %endif
53
54 %build
55 cmake \
56         -DCMAKE_INSTALL_PREFIX=%{_prefix} \
57         -DPACKAGE_NAME=%{name} \
58         -DLIBDIR=%{_libdir} \
59         -DBINDIR=%{_bindir} \
60         -DLOADERDIR=%{_loaderdir} \
61         -DCONFIGDIR=%{_configdir} \
62         -DCMAKE_BUILD_TYPE=%{_dotnet_build_conf} \
63         -DDEVICE_API_DIR=%{_device_api_dir} \
64         -DRUNTIME_DIR=%{_runtime_dir} \
65         -DCROSSGEN_PATH=%{_device_api_dir}/crossgen \
66 %if %{use_managed_launcher}
67         -DCORECLR_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.dll \
68 %endif
69         -DINSTALL_PLUGIN_DIR=%{_install_plugin_dir} \
70         -DINSTALL_MDPLUGIN_DIR=%{_install_mdplugin_dir} \
71         -DVERSION=%{version} \
72         -DUSE_MANAGED_LAUNCHER=%{?USE_MANAGED_LAUNCHER:%USE_MANAGED_LAUNCHER} \
73         -DNATIVE_LIB_DIR=%{_native_lib_dir} \
74         NativeLauncher
75
76 make %{?jobs:-j%jobs} VERBOSE=1
77
78 %dotnet_build Tizen.Runtime
79
80 %install
81 rm -rf %{buildroot}
82 %make_install
83 %if %{use_managed_launcher}
84 install -p -m 644 Tizen.Runtime/bin/*/*/Tizen.Runtime.dll %{buildroot}%{_bindir}
85 %endif
86
87 mkdir -p %{buildroot}%{_native_lib_dir}
88 ln -sf %{_libdir}/libsqlite3.so.0 %{buildroot}%{_native_lib_dir}/libsqlite3.so
89
90 %files
91 %manifest dotnet-launcher.manifest
92 %{_loaderdir}/dotnet.loader
93 %{_loaderdir}/dotnet.launcher
94 %{_loaderdir}/dotnet.debugger
95 %{_native_lib_dir}/libsqlite3.so
96 %{_bindir}/nitool
97 #%{_install_plugin_dir}/libui-application.so
98 %{_install_mdplugin_dir}/libprefer_dotnet_aot_plugin.so
99 %if %{use_managed_launcher}
100 %{_bindir}/Tizen.Runtime.dll
101 %endif
102 %caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/dotnet-launcher