[Tizen] Updated spec file 67/260467/4
authorJunhwan Kim <jejudo.kim@samsung.com>
Fri, 25 Jun 2021 05:07:46 +0000 (14:07 +0900)
committerJunhwan Kim <jejudo.kim@samsung.com>
Mon, 28 Jun 2021 08:50:21 +0000 (17:50 +0900)
Change-Id: Idc7c9be256c17b49cfacb165044d4b6c2826de6e
Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
.gitignore
packaging/tvm.manifest [new file with mode: 0644]
packaging/tvm.spec [new file with mode: 0644]
tvm_runtime.pc [new file with mode: 0644]

index 77c593c..9b8d5c0 100644 (file)
@@ -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 (file)
index 0000000..b4b1185
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+   <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/tvm.spec b/packaging/tvm.spec
new file mode 100644 (file)
index 0000000..805ce56
--- /dev/null
@@ -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 (file)
index 0000000..2577822
--- /dev/null
@@ -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