--- /dev/null
+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/*