packaging: add spec file for Tizen build
authorInki Dae <inki.dae@samsung.com>
Thu, 28 Jun 2018 10:50:37 +0000 (19:50 +0900)
committerInki Dae <inki.dae@samsung.com>
Thu, 4 Mar 2021 05:15:02 +0000 (14:15 +0900)
Signed-off-by: Inki Dae <inki.dae@samsung.com>
packaging/armnn.manifest [new file with mode: 0644]
packaging/armnn.spec [new file with mode: 0644]

diff --git a/packaging/armnn.manifest b/packaging/armnn.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/armnn.spec b/packaging/armnn.spec
new file mode 100644 (file)
index 0000000..63fdddb
--- /dev/null
@@ -0,0 +1,127 @@
+Name:           armnn
+Version:        18.11
+Release:        0
+License:        MIT License
+Summary:        Arm Neural Networks library
+Group:          Machine Learning / ML Framework
+Source0:        %{name}-%{version}.tar.gz
+Source1001:    %name.manifest
+ExclusiveArch:  %arm aarch64
+
+BuildRequires: curl
+BuildRequires: cmake
+BuildRequires: libarmcl-devel
+BuildRequires: protobuf-devel
+
+%description
+Arm Neural Networks Library
+
+%ifarch aarch64
+%package -n %{name}-release-aarch64
+%else
+%package -n %{name}-release
+%endif
+Summary:        ARM Neural Network library files
+
+%ifarch aarch64
+%description -n %{name}-release-aarch64
+%else
+%description -n %{name}-release
+%endif
+Summary:        ARM Neural Network library files
+
+%ifarch aarch64
+%package -n %{name}-devel-aarch64
+%else
+%package -n %{name}-devel
+%endif
+Summary:        Userspace interface to ARM Neural Network Library
+
+%ifarch aarch64
+%description -n %{name}-devel-aarch64
+%else
+%description -n %{name}-devel
+%endif
+Summary:        Userspace interface to ARM Neural Network Library
+
+%ifarch aarch64
+%package -n %{name}-tools-aarch64
+%else
+%package -n %{name}-tools
+%endif
+Summary:       Sample application and benchmark binaries to test ARM Neural Network Library
+
+%ifarch aarch64
+%description -n %{name}-tools-aarch64
+%else
+%description -n %{name}-tools
+%endif
+Summary:       Sample application and benchmark binaries to test ARM Neural Network Library
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+#prepare stb
+mkdir -p %{buildroot}%{_includedir}
+cp -ar external/stb %{buildroot}%{_includedir}
+
+#build ArmNN
+cmake -DARMCOMPUTENEON=1        \
+      -DARMCOMPUTECL=1          \
+      -DCMAKE_SKIP_RPATH=1     \
+      -DBUILD_CAFFE_PARSER=1 \
+      -DBUILD_TESTS=1 \
+      -DCAFFE_GENERATED_SOURCES=/usr/include \
+      -DTHIRD_PARTY_INCLUDE_DIRS=%{buildroot}%{_includedir}/stb
+
+make
+
+%install
+mkdir -p %{buildroot}%{_libdir}
+mkdir -p %{buildroot}%{_bindir}/armnn
+mkdir -p %{buildroot}%{_includedir}/armnn
+mkdir -p %{buildroot}%{_includedir}/armnnCaffeParser
+mkdir -p %{buildroot}%{_includedir}/armnnTfParser
+
+install -m 0755 bin/*-Armnn %{buildroot}%{_bindir}/armnn/
+install -m 0755 bin/ExecuteNetwork %{buildroot}%{_bindir}/armnn/
+install -m 0755 bin/MultipleNetworksCifar10 %{buildroot}%{_bindir}/armnn/
+
+install -m 0644 lib*.so %{buildroot}%{_libdir}/
+install -m 0644 include/armnn/* %{buildroot}%{_includedir}/armnn/
+install -m 0644 include/armnnCaffeParser/* %{buildroot}%{_includedir}/armnnCaffeParser/
+install -m 0644 include/armnnTfParser/* %{buildroot}%{_includedir}/armnnTfParser/
+
+%clean
+echo "in clean"
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%ifarch aarch64
+%files -n %{name}-release-aarch64 
+%else
+%files -n %{name}-release
+%endif
+%manifest %{name}.manifest
+%{_libdir}/*
+
+%ifarch aarch64
+%files -n %{name}-devel-aarch64 
+%else
+%files -n %{name}-devel
+%endif
+%manifest %{name}.manifest
+%{_libdir}/*
+%{_includedir}/*
+
+%ifarch aarch64
+%files -n %{name}-tools-aarch64 
+%else
+%files -n %{name}-tools
+%endif
+%manifest %{name}.manifest
+%{_bindir}/armnn/*