Name: nnfw Summary: nnfw Version: 0.2 Release: 1 Group: Development License: Apache-2.0 and MIT Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest %ifarch arm armv7l aarch64 BuildRequires: cmake BuildRequires: python BuildRequires: python3 BuildRequires: boost-devel BuildRequires: gtest-devel BuildRequires: tensorflow-lite-devel BuildRequires: libarmcl-devel %endif Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig %description nnfw is a high-performance, on-device neural network framework for Tizen %{!?build_type: %define build_type Release} %package test Summary: NNFW Test Requires: nnfw %description test NNFW test rpm. It does not depends on nnfw rpm since it contains nnfw runtime. %define test_install_prefix /opt/usr/nnfw-test %ifarch %{arm} %define target_arch armv7l %endif %ifarch x86_64 %define target_arch x86_64 %endif %ifarch aarch64 %define target_arch aarch64 %endif %{!?coverage_build: %define coverage_build 0} %if %{coverage_build} == 1 %define build_options COVERAGE_BUILD=1 OBS_BUILD=1 BUILD_TYPE=Debug TARGET_ARCH=%{target_arch} TARGET_OS=tizen %else %define build_options OBS_BUILD=1 BUILD_TYPE=%{build_type} INSTALL_PATH=%{buildroot}%{_prefix} TARGET_ARCH=%{target_arch} TARGET_OS=tizen %endif %prep %setup -q cp %{SOURCE1} . %build %ifarch arm armv7l aarch64 %{build_options} make %{?jobs:-j%jobs} %endif %install %ifarch arm armv7l aarch64 %{build_options} make install %ifarch aarch64 mv %{buildroot}%{_prefix}/lib %{buildroot}%{_libdir} %endif %if %{coverage_build} == 0 # nnfw-test rpm(like test-suite on cross build) ## install Product mkdir -p %{buildroot}%{test_install_prefix}/Product/out mv %{buildroot}%{_prefix}/unittest %{buildroot}%{test_install_prefix}/Product/out mv %{buildroot}%{_prefix}/bin %{buildroot}%{test_install_prefix}/Product/out cp -rf %{buildroot}%{_libdir} %{buildroot}%{test_install_prefix}/Product/out rm -rf %{buildroot}%{_libdir}/pureacl ## install tests cp -rf ./tests/framework %{buildroot}%{test_install_prefix}/framework ## install tools mkdir -p %{buildroot}%{test_install_prefix}/tools cp -rf ./tests/scripts %{buildroot}%{test_install_prefix}/tools %else %{build_options} make build_coverage_suite mkdir -p %{buildroot}%{test_install_prefix} cp -rf Product/out/coverage-suite.tar.gz %{buildroot}%{test_install_prefix}/. tar -zxf %{buildroot}%{test_install_prefix}/coverage-suite.tar.gz -C %{buildroot}%{test_install_prefix} rm -rf %{buildroot}%{test_install_prefix}/coverage-suite.tar.gz %endif %endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %manifest %{name}.manifest %defattr(-,root,root,-) %ifarch arm armv7l aarch64 %{_libdir}/* %exclude %{_prefix}/bin/* %exclude %{_prefix}/unittest/* %exclude %{_libdir}/debug %endif %files test %manifest %{name}.manifest %defattr(-,root,root,-) %ifarch arm armv7l aarch64 %{test_install_prefix}/* %exclude %{_libdir}/debug %endif %changelog * Thu Mar 15 2018 Chunseok Lee - Initial spec file for nnfw