Change dotnet core directory
[platform/core/dotnet/launcher.git] / packaging / dotnet-launcher.spec
1 %{!?dotnet_assembly_path: %define dotnet_assembly_path %{_datadir}/assembly}
2
3 Name:       dotnet-launcher
4 Summary:    Launchpad plugin for dotnet apps
5 Version:    1.0.1
6 Release:    2
7 Group:      Application Framework/Application State Management
8 License:    Apache License, Version 2.0
9 Source0:    %{name}-%{version}.tar.gz
10 AutoReqProv: no
11
12 BuildRequires: cmake
13 BuildRequires: pkgconfig(aul)
14 BuildRequires: pkgconfig(bundle)
15 BuildRequires: pkgconfig(dlog)
16 BuildRequires: pkgconfig(ecore)
17 BuildRequires: pkgconfig(launchpad)
18 BuildRequires: pkgconfig(pkgmgr-info)
19 BuildRequires: pkgconfig(pkgmgr-installer)
20 BuildRequires: aul-devel
21 BuildRequires: mono-compiler
22 BuildRequires: mono-devel 
23 BuildRequires: csapi-tizen-nuget 
24 BuildRequires: dotnet-build-tools
25 Requires: aul
26
27 Requires(post): /sbin/ldconfig
28 Requires(post): /usr/bin/systemctl
29 Requires(postun): /sbin/ldconfig
30 Requires(postun): /usr/bin/systemctl
31 Requires(preun): /usr/bin/systemctl
32
33 %define _loaderdir %{_prefix}/share/aul
34 %define _configdir /etc
35 %define _device_api_dir %{dotnet_assembly_path}
36 %define _runtime_dir /opt/usr/share/dotnet/shared/Microsoft.NETCore.App/1.1.0
37 %define _preload_dir /opt/usr/share/dotnet.tizen/preload
38 %define _install_plugin_dir /usr/etc/package-manager/parserlib
39
40 %description
41 Launchpad plugin for launching dotnet apps
42
43 %prep
44 %setup -q
45
46 %build
47 %if 0%{?tizen_build_devel_mode}
48 %define _buildmode Debug
49 %else
50 %define _buildmode Release
51 %endif
52 cmake \
53         -DCMAKE_INSTALL_PREFIX=%{_prefix} \
54         -DPACKAGE_NAME=%{name} \
55         -DLIBDIR=%{_libdir} \
56         -DBINDIR=%{_bindir} \
57         -DLOADERDIR=%{_loaderdir} \
58         -DCONFIGDIR=%{_configdir} \
59         -DCMAKE_BUILD_TYPE=%{_buildmode} \
60         -DDEVICE_API_DIR=%{_device_api_dir} \
61         -DRUNTIME_DIR=%{_runtime_dir} \
62         -DCROSSGEN_PATH=%{_device_api_dir}/crossgen \
63         -DCORECLR_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.Coreclr.dll \
64         -DMONO_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.Mono.dll \
65         -DINSTALL_PLUGIN_DIR=%{_install_plugin_dir} \
66         -DVERSION=%{version} \
67         NativeLauncher
68
69 make %{?jobs:-j%jobs} VERBOSE=1
70
71 nuget restore Tizen.Runtime/Tizen.Runtime.Coreclr.project.json
72
73 xbuild \
74         /p:Configuration=%{_buildmode} \
75         /p:PreloadPath=%{_preload_dir} \
76         Tizen.Runtime/Tizen.Runtime.Coreclr.csproj
77
78 nuget restore Tizen.Runtime/Tizen.Runtime.Mono.project.json
79
80 xbuild \
81         /p:Configuration=%{_buildmode} \
82         /p:PreloadPath=%{_preload_dir} \
83         Tizen.Runtime/Tizen.Runtime.Mono.csproj
84
85 %install
86 rm -rf %{buildroot}
87 %make_install
88 install -p -m 644 Tizen.Runtime/bin/Tizen.Runtime.Coreclr.dll %{buildroot}%{_bindir}
89 install -p -m 644 Tizen.Runtime/bin/Tizen.Runtime.Mono.dll %{buildroot}%{_bindir}
90
91 %files
92 %manifest dotnet-launcher.manifest
93 %{_loaderdir}/dotnet.loader
94 %{_loaderdir}/dotnet.launcher
95 %{_loaderdir}/dotnet.debugger
96 %caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/dotnet-launcher
97 %caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/nitool
98 %caps(cap_mac_admin,cap_setgid=ei) %{_install_plugin_dir}/libui-application.so
99 %caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/Tizen.Runtime.Coreclr.dll
100 %caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/Tizen.Runtime.Mono.dll