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