Implement metadata plugin for appfw
[platform/core/dotnet/launcher.git] / packaging / dotnet-launcher.spec
1 Name:       dotnet-launcher
2 Summary:    Launchpad plugin for dotnet apps
3 Version:    1.0.1
4 Release:    2
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
25 Requires(post): /sbin/ldconfig
26 Requires(post): /usr/bin/systemctl
27 Requires(postun): /sbin/ldconfig
28 Requires(postun): /usr/bin/systemctl
29 Requires(preun): /usr/bin/systemctl
30
31 %define _loaderdir %{_prefix}/share/aul
32 %define _configdir /etc
33 %define _device_api_dir %{dotnet_assembly_path}
34 %define _runtime_dir /opt/usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0
35 %define _preload_dir /opt/usr/share/dotnet.tizen/preload
36 %define _install_plugin_dir /usr/etc/package-manager/parserlib
37 %define _install_mdplugin_dir /etc/package-manager/parserlib/metadata
38
39 ExcludeArch: %{ix86} aarch64
40
41 %description
42 Launchpad plugin for launching dotnet apps
43
44 %prep
45 %setup -q
46
47 %build
48 cmake \
49         -DCMAKE_INSTALL_PREFIX=%{_prefix} \
50         -DPACKAGE_NAME=%{name} \
51         -DLIBDIR=%{_libdir} \
52         -DBINDIR=%{_bindir} \
53         -DLOADERDIR=%{_loaderdir} \
54         -DCONFIGDIR=%{_configdir} \
55         -DCMAKE_BUILD_TYPE=%{_dotnet_build_conf} \
56         -DDEVICE_API_DIR=%{_device_api_dir} \
57         -DRUNTIME_DIR=%{_runtime_dir} \
58         -DCROSSGEN_PATH=%{_device_api_dir}/crossgen \
59         -DCORECLR_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.Coreclr.dll \
60         -DMONO_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.Mono.dll \
61         -DINSTALL_PLUGIN_DIR=%{_install_plugin_dir} \
62         -DINSTALL_MDPLUGIN_DIR=%{_install_mdplugin_dir} \
63         -DVERSION=%{version} \
64         NativeLauncher
65
66 make %{?jobs:-j%jobs} VERBOSE=1
67
68 nuget restore Tizen.Runtime/Tizen.Runtime.Coreclr.project.json
69
70 xbuild \
71         /p:Configuration=%{_dotnet_build_conf} \
72         /p:PreloadPath=%{_preload_dir} \
73         Tizen.Runtime/Tizen.Runtime.Coreclr.csproj
74
75 nuget restore Tizen.Runtime/Tizen.Runtime.Mono.project.json
76
77 xbuild \
78         /p:Configuration=%{_dotnet_build_conf} \
79         /p:PreloadPath=%{_preload_dir} \
80         Tizen.Runtime/Tizen.Runtime.Mono.csproj
81
82 %install
83 rm -rf %{buildroot}
84 %make_install
85 install -p -m 644 Tizen.Runtime/bin/Tizen.Runtime.Coreclr.dll %{buildroot}%{_bindir}
86 install -p -m 644 Tizen.Runtime/bin/Tizen.Runtime.Mono.dll %{buildroot}%{_bindir}
87
88 %files
89 %manifest dotnet-launcher.manifest
90 %{_loaderdir}/dotnet.loader
91 %{_loaderdir}/dotnet.launcher
92 %{_loaderdir}/dotnet.debugger
93 %caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/dotnet-launcher
94 %caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/nitool
95 %caps(cap_mac_admin,cap_setgid=ei) %{_install_plugin_dir}/libui-application.so
96 %caps(cap_mac_admin,cap_setgid=ei) %{_install_mdplugin_dir}/libprefer_dotnet_aot_plugin.so
97 %caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/Tizen.Runtime.Coreclr.dll
98 %caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/Tizen.Runtime.Mono.dll