set environment for corefx special folder
[platform/core/dotnet/launcher.git] / packaging / dotnet-launcher.spec
1 Name:       dotnet-launcher
2 Summary:    Launchpad plugin for dotnet apps
3 Version:    2.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: pkgconfig(libsmack)
21 BuildRequires: pkgconfig(capi-appfw-app-common)
22 BuildRequires: pkgconfig(storage)
23 BuildRequires: aul-devel
24 BuildRequires: dotnet-build-tools
25
26 %if 0%{?asan_enabled}
27 BuildRequires: clang >= 3.8
28 BuildRequires: compiler-rt
29 %endif
30
31 Requires: aul
32 Requires: launchpad
33
34 Requires(post): /sbin/ldconfig
35 Requires(post): /usr/bin/systemctl
36 Requires(postun): /sbin/ldconfig
37 Requires(postun): /usr/bin/systemctl
38 Requires(preun): /usr/bin/systemctl
39
40 %define _loaderdir %{_prefix}/share/aul
41 %define _device_api_dir %{dotnet_assembly_path}
42 %define _runtime_dir /usr/share/dotnet.tizen/netcoreapp
43 %define _install_mdplugin_dir /etc/package-manager/parserlib/metadata
44 %define _native_lib_dir /usr/share/dotnet.tizen/lib
45
46 ExcludeArch: aarch64
47
48 %description
49 Launchpad plugin for launching dotnet apps
50
51 %package devel
52 Summary: Libraries and Header Files for dotnet-launcher plugins and AOTC tools
53 Requires: %{name} = %{version}
54
55 %description devel
56 This package contains library and header files needed to develop plugins for dotnet-launcher
57 and AOTC tools.
58
59 %prep
60 %setup -q
61
62 %build
63
64 %if 0%{?asan_enabled}
65 %define _dotnet_build_conf Debug
66 export CFLAGS=" --target=%{_host} "
67 export CXXFLAGS=" --target=%{_host} "
68 %ifarch %{ix86}
69 export CFLAGS=$(echo $CFLAGS | sed -e 's/--target=i686/--target=i586/')
70 export CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/--target=i686/--target=i586/')
71 %endif
72 %endif
73
74 cmake \
75         -DCMAKE_INSTALL_PREFIX=%{_prefix} \
76 %if 0%{?asan_enabled}
77         -DCMAKE_C_COMPILER=clang \
78         -DCMAKE_CXX_COMPILER=clang++ \
79         -DASAN_ENABLED=TRUE \
80 %endif
81         -DLIBDIR=%{_libdir} \
82         -DBINDIR=%{_bindir} \
83         -DINCLUDEDIR=%{_includedir} \
84         -DLOADERDIR=%{_loaderdir} \
85         -DCMAKE_BUILD_TYPE=%{_dotnet_build_conf} \
86         -DDEVICE_API_DIR=%{_device_api_dir} \
87         -DRUNTIME_DIR=%{_runtime_dir} \
88         -DCROSSGEN_PATH=%{_device_api_dir}/crossgen \
89         -DINSTALL_MDPLUGIN_DIR=%{_install_mdplugin_dir} \
90         -DVERSION=%{version} \
91         -DNATIVE_LIB_DIR=%{_native_lib_dir} \
92         NativeLauncher
93
94 make %{?jobs:-j%jobs} VERBOSE=1
95
96 %install
97 rm -rf %{buildroot}
98 %make_install
99
100 mkdir -p %{buildroot}%{_native_lib_dir}
101 ln -sf %{_libdir}/libsqlite3.so.0 %{buildroot}%{_native_lib_dir}/libsqlite3.so
102
103 %files
104 %manifest dotnet-launcher.manifest
105 %{_loaderdir}/dotnet.loader
106 %{_loaderdir}/dotnet.launcher
107 %{_loaderdir}/dotnet.debugger
108 %{_native_lib_dir}/libsqlite3.so
109 %{_bindir}/nitool
110 %{_install_mdplugin_dir}/libprefer_dotnet_aot_plugin.so
111 %{_bindir}/dotnet-launcher
112 %{_libdir}/libdotnet_launcher_util.so
113 %{_libdir}/libni_common.so
114
115 %files devel
116 %manifest dotnet-launcher.manifest
117 %defattr(-,root,root,-)
118 %{_includedir}/ni_common.h
119 %{_includedir}/dotnet_launcher_plugin.h
120 %{_includedir}/coreclr_host.h
121 %{_libdir}/libdotnet_launcher_util.so
122 %{_libdir}/libni_common.so
123 %{_libdir}/pkgconfig/dotnet-launcher.pc
124