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