summaryrefslogtreecommitdiff
path: root/packaging/dotnet-launcher.spec
blob: d41993af198d2ef6f124d1324553c50bc7467e1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Name:       dotnet-launcher
Summary:    Launchpad plugin for dotnet apps
Version:    1.1.0
Release:    1
Group:      Application Framework/Application State Management
License:    Apache-2.0
Source0:    %{name}-%{version}.tar.gz
AutoReqProv: no

BuildRequires: cmake
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(launchpad)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(pkgmgr-installer)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: aul-devel
BuildRequires: dotnet-build-tools

# Required by scd-launcher
BuildRequires: appcore-agent
BuildRequires: pkgconfig(appcore-agent)
BuildRequires: pkgconfig(capi-appfw-app-control)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-appfw-service-application)


Requires: aul

Requires(post): /sbin/ldconfig
Requires(post): /usr/bin/systemctl
Requires(postun): /sbin/ldconfig
Requires(postun): /usr/bin/systemctl
Requires(preun): /usr/bin/systemctl

%define _loaderdir %{_prefix}/share/aul
%define _configdir /etc
%define _device_api_dir %{dotnet_assembly_path}
%define _runtime_dir /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0
%define _install_plugin_dir /usr/etc/package-manager/parserlib
%define _install_mdplugin_dir /etc/package-manager/parserlib/metadata
%define _native_lib_dir /usr/share/dotnet.tizen/lib

ExcludeArch: aarch64

%description
Launchpad plugin for launching dotnet apps

%package -n scd-launcher
Summary:    self-contained dotnet launcher
%description -n scd-launcher
launching dotnet apps without dotent runtime installed


%prep
%setup -q

%define use_managed_launcher 0
%if %{use_managed_launcher}
	%define USE_MANAGED_LAUNCHER ENABLE
%endif

%define raise_default_signal_handler 0
%if %{raise_default_signal_handler}
	%define RAISE_DEFAULT_SIGNAL_HANDLER ENABLE
%endif

%build
cmake \
	-DCMAKE_INSTALL_PREFIX=%{_prefix} \
	-DPACKAGE_NAME=%{name} \
	-DLIBDIR=%{_libdir} \
	-DBINDIR=%{_bindir} \
	-DLOADERDIR=%{_loaderdir} \
	-DCONFIGDIR=%{_configdir} \
	-DCMAKE_BUILD_TYPE=%{_dotnet_build_conf} \
	-DDEVICE_API_DIR=%{_device_api_dir} \
	-DRUNTIME_DIR=%{_runtime_dir} \
	-DCROSSGEN_PATH=%{_device_api_dir}/crossgen \
%if %{use_managed_launcher}
	-DCORECLR_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.dll \
%endif
	-DINSTALL_PLUGIN_DIR=%{_install_plugin_dir} \
	-DINSTALL_MDPLUGIN_DIR=%{_install_mdplugin_dir} \
	-DVERSION=%{version} \
	-DUSE_MANAGED_LAUNCHER=%{?USE_MANAGED_LAUNCHER:%USE_MANAGED_LAUNCHER} \
	-DRAISE_DEFAULT_SIGNAL_HANDLER=%{?RAISE_DEFAULT_SIGNAL_HANDLER:%RAISE_DEFAULT_SIGNAL_HANDLER} \
	-DNATIVE_LIB_DIR=%{_native_lib_dir} \
	NativeLauncher

make %{?jobs:-j%jobs} VERBOSE=1

%dotnet_build Tizen.Runtime

%install
rm -rf %{buildroot}
%make_install
%if %{use_managed_launcher}
install -p -m 644 Tizen.Runtime/bin/*/*/Tizen.Runtime.dll %{buildroot}%{_bindir}
%endif

mkdir -p %{buildroot}%{_native_lib_dir}
ln -sf %{_libdir}/libsqlite3.so.0 %{buildroot}%{_native_lib_dir}/libsqlite3.so

%files
%manifest dotnet-launcher.manifest
%{_loaderdir}/dotnet.loader
%{_loaderdir}/dotnet.launcher
%{_loaderdir}/dotnet.debugger
%{_native_lib_dir}/libsqlite3.so
%{_bindir}/nitool
#%{_install_plugin_dir}/libui-application.so
%{_install_mdplugin_dir}/libprefer_dotnet_aot_plugin.so
%if %{use_managed_launcher}
%{_bindir}/Tizen.Runtime.dll
%endif
%caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/dotnet-launcher

%files -n scd-launcher
%caps(cap_mac_admin,cap_setgid=ei) %{_bindir}/scd-launcher