--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <fstream>
+#include <string>
+#include <iostream>
+
+#include "utils.h"
+
+const char* RUNTIME_DIR = "/usr/share/dotnet.tizen/netcoreapp";
+const char* TIZENFX_DIR = "/usr/share/dotnet.tizen/framework";
+const char* TIZENFX_REF_DIR = "/usr/share/dotnet.tizen/framework/ref";
+const char* TPA_CACHE_FILE = "/usr/share/dotnet.tizen/lib/platform_tpa_cache";
+
+
+int main(int argc, char* argv[])
+{
+ std::string tpaList;
+ std::vector<std::string> tpaDir;
+
+ tpaDir.push_back(RUNTIME_DIR);
+ tpaDir.push_back(TIZENFX_DIR);
+ tpaDir.push_back(TIZENFX_REF_DIR);
+
+ assembliesInDirectory(tpaDir, tpaList);
+
+ std::ofstream out("TPA_CACHE_FILE");
+ out << tpaList;
+ out.close();
+
+ return 0;
+}
+
--- /dev/null
+d /tmp/.dotnet 1777 root users
+t /tmp/.dotnet - - - - security.SMACK64="User::App::Shared"
+t /tmp/.dotnet - - - - security.SMACK64TRANSMUTE="TRUE"
+d /tmp/.dotnet/lockfiles 1777 root users
+t /tmp/.dotnet/lockfiles - - - - security.SMACK64="User::App::Shared"
+d /tmp/.dotnet/lockfiles/global 1777 root users
+t /tmp/.dotnet/lockfiles/global - - - - security.SMACK64="User::App::Shared"
+t /tmp/.dotnet/lockfiles/global - - - - security.SMACK64TRANSMUTE="TRUE"
+d /tmp/.dotnet/shm 1777 root users
+t /tmp/.dotnet/shm - - - - security.SMACK64="User::App::Shared"
+d /tmp/.dotnet/shm/global 1777 root users
+t /tmp/.dotnet/shm/global - - - - security.SMACK64="User::App::Shared"
+t /tmp/.dotnet/shm/global - - - - security.SMACK64TRANSMUTE="TRUE"
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
AutoReqProv: no
+Source1: %{name}.conf
BuildRequires: cmake
BuildRequires: pkgconfig(aul)
Requires(post): /sbin/ldconfig
Requires(post): /usr/bin/systemctl
+Requires(post): /usr/bin/chsmack
Requires(postun): /sbin/ldconfig
Requires(postun): /usr/bin/systemctl
Requires(preun): /usr/bin/systemctl
%prep
%setup -q
+cp %{SOURCE1} .
%build
cmake \
mkdir -p %{buildroot}%{_native_lib_dir}
ln -sf %{_libdir}/libsqlite3.so.0 %{buildroot}%{_native_lib_dir}/libsqlite3.so
+mkdir -p %{buildroot}/etc/tmpfiles.d
+install -m 0644 %{name}.conf %{buildroot}/etc/tmpfiles.d/%{name}.conf
+
+%post
+mkdir -p /opt/etc/skel/.dotnet
+chsmack -t -a User::App::Shared /opt/etc/skel/.dotnet
+
%files
%manifest dotnet-launcher.manifest
%{_loaderdir}/dotnet.loader
%{_install_mdplugin_dir}/libprefer_dotnet_aot_plugin.so
%{_bindir}/dotnet-launcher
%attr(700,root,root) %{_rw_update_scripts_dir}/595.dotnet-launcher.regen_ni.patch.sh
+/etc/tmpfiles.d/%{name}.conf