From: Junhwan Kim Date: Fri, 25 Jun 2021 05:07:46 +0000 (+0900) Subject: [Tizen] Updated spec file X-Git-Tag: accepted/tizen/6.5/unified/20211029.015214~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b3e6af0287cbcaab7f047aa4f576a8c3e03347c;p=platform%2Fupstream%2Ftvm.git [Tizen] Updated spec file Change-Id: Idc7c9be256c17b49cfacb165044d4b6c2826de6e Signed-off-by: Junhwan Kim --- diff --git a/.gitignore b/.gitignore index 77c593c..9b8d5c0 100644 --- a/.gitignore +++ b/.gitignore @@ -28,8 +28,8 @@ var/ # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec +# *.manifest +# *.spec # Installer logs pip-log.txt diff --git a/packaging/tvm.manifest b/packaging/tvm.manifest new file mode 100644 index 0000000..b4b1185 --- /dev/null +++ b/packaging/tvm.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/tvm.spec b/packaging/tvm.spec new file mode 100644 index 0000000..805ce56 --- /dev/null +++ b/packaging/tvm.spec @@ -0,0 +1,53 @@ +Name: tvm-runtime +Summary: TVM Runtime Library +Version: 0.7.0 +Release: 0 +License: Apache-2.0 +Source0: %{name}-%{version}.tar.gz +Source1001: tvm.manifest + +BuildRequires: cmake + +%description +Apache TVM is a compiler stack for deep learning systems. It is designed to close the gap between the productivity-focused deep learning frameworks, and the performance- and efficiency-focused hardware backends. TVM works with deep learning frameworks to provide end to end compilation to different backends. + +%package devel +Summary: develelopment package for TVM +Requires: %{name} = %{version}-%{release} + +%description devel +development package for tvm + +%prep +%setup -q +cp %{SOURCE1001} . + +%build +mkdir -p build +cp cmake/config.cmake build +pushd build +%{cmake} .. +%{__make} runtime %{?_smp_mflags} +popd + +%install +mkdir -p %{buildroot}{%{_libdir},%{_includedir},%{_libdir}/pkgconfig} +cp -r build/libtvm_runtime.so %{buildroot}%{_libdir} +cp -r include/* %{buildroot}%{_includedir} +cp -r 3rdparty/dlpack/include/* %{buildroot}%{_includedir} +cp -r 3rdparty/dmlc-core/include/* %{buildroot}%{_includedir} +cp -r tvm_runtime.pc %{buildroot}%{_libdir}/pkgconfig + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%manifest tvm.manifest +%defattr(-,root,root,-) +%{_libdir}/*.so + +%files devel +%defattr(-,root,root,-) +%{_libdir}/pkgconfig/tvm_runtime.pc +%{_includedir}/* + diff --git a/tvm_runtime.pc b/tvm_runtime.pc new file mode 100644 index 0000000..2577822 --- /dev/null +++ b/tvm_runtime.pc @@ -0,0 +1,10 @@ +prefix=/usr +includedir=${prefix}/include +libdir=${prefix}/lib + +Name: tvm-runtime +Description: Runtime Module for TVM +Version: 0.7.0 +Requires: +Cflags: -I${includedir}/tvm +Libs: -L${libdir} -ltvm_runtime