summaryrefslogtreecommitdiff
path: root/packaging/libarmcl.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/libarmcl.spec')
-rw-r--r--packaging/libarmcl.spec159
1 files changed, 159 insertions, 0 deletions
diff --git a/packaging/libarmcl.spec b/packaging/libarmcl.spec
new file mode 100644
index 000000000..0063fcbaa
--- /dev/null
+++ b/packaging/libarmcl.spec
@@ -0,0 +1,159 @@
+Name: libarmcl
+Version: v19.11
+Release: 0
+License: MIT
+Url: https://github.com/ARM-software/ComputeLibrary
+Summary: The ARM Computer Vision and Machine Learning library
+Group: Graphics & UI Framework/Libraries
+Source0: %{name}-%{version}.tar.bz2
+Source1001: %name.manifest
+ExclusiveArch: %{arm} aarch64
+
+BuildRequires: python3-base
+BuildRequires: python
+BuildRequires: scons
+
+%define OPEN_CL_SUPPORT 1
+%define NEON_SUPPORT 1
+%define BENCHMARK_TEST 1
+
+%description
+The ARM Computer Vision and Machine Learning library is a set of functions optimised for both ARM CPUs and GPUs using SIMD technologies
+
+%package -n %{name}-release
+Summary: ARM Compute Library file
+
+%description -n %{name}-release
+Summary: ARM Compute Library file
+
+%package -n %{name}-devel
+Summary: Userspace interface to ARM Compute Library
+
+%description -n %{name}-devel
+Summary: Userspace interface to ARM Compute Library
+
+%package -n %{name}-tools
+Summary: Sample application and benchmark binaries to test ARM Compute Library
+
+%description -n %{name}-tools
+Summary: Sample application and benchmark binaries to test ARM Compute Library
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+echo %{_builddir}
+scons -j8 \
+ Werror=0 \
+ debug=0 \
+%if 0%{?NEON_SUPPORT} == 1
+ neon=1 \
+%endif
+%if 0%{?OPEN_CL_SUPPORT} == 1
+ opencl=1 \
+%endif
+ os=linux \
+%ifarch aarch64
+ arch=arm64-v8.2-a \
+%else
+ arch=armv7a \
+%endif
+ embed_kernels=1 \
+%if 0%{?BENCHMARK_TEST} == 1
+ benchmark_tests=1
+%endif
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%install
+mkdir -p %{buildroot}%{_libdir}
+mkdir -p %{buildroot}%{_libdir}/data
+mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}/usr/include/arm_compute
+mkdir -p %{buildroot}/usr/include/support
+mkdir -p %{buildroot}/usr/include/CL
+mkdir -p %{buildroot}/usr/include/half
+mkdir -p %{buildroot}/usr/include/libnpy
+
+install -m 644 build/libarm_compute_core.so %{buildroot}%{_libdir}
+install -m 644 build/libarm_compute.so %{buildroot}%{_libdir}
+install -m 644 build/libarm_compute_graph.so %{buildroot}%{_libdir}
+install -m 644 build/opencl-1.2-stubs/libOpenCL.so %{buildroot}%{_libdir}
+
+install -m 644 build/examples/cl_convolution %{buildroot}%{_bindir}
+install -m 644 build/examples/cl_events %{buildroot}%{_bindir}
+install -m 644 build/examples/cl_sgemm %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_alexnet %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_googlenet %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_inception_v3 %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_inception_v4 %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_lenet %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_mobilenet %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_resnet50 %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_resnext50 %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_squeezenet %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_squeezenet_v1_1 %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_vgg16 %{buildroot}%{_bindir}
+install -m 644 build/examples/graph_vgg19 %{buildroot}%{_bindir}
+install -m 644 build/examples/neon_cartoon_effect %{buildroot}%{_bindir}
+install -m 644 build/examples/neoncl_scale_median_gaussian %{buildroot}%{_bindir}
+install -m 644 build/examples/neon_cnn %{buildroot}%{_bindir}
+install -m 644 build/examples/neon_convolution %{buildroot}%{_bindir}
+install -m 644 build/examples/neon_copy_objects %{buildroot}%{_bindir}
+install -m 644 build/examples/neon_scale %{buildroot}%{_bindir}
+
+cp -r %{_builddir}/%{name}-%{version}/arm_compute/* %{buildroot}/usr/include/arm_compute/
+cp -r %{_builddir}/%{name}-%{version}/support/* %{buildroot}/usr/include/support/
+cp -r %{_builddir}/%{name}-%{version}/include/CL/* %{buildroot}/usr/include/CL/
+cp -r %{_builddir}/%{name}-%{version}/include/half/* %{buildroot}/usr/include/half/
+cp -r %{_builddir}/%{name}-%{version}/include/libnpy/* %{buildroot}/usr/include/libnpy/
+
+%if 0%{?BENCHMARK_TEST} == 1
+install -m 644 %{_builddir}/%{name}-%{version}/build/tests/arm_compute_benchmark %{buildroot}%{_bindir}
+cp -r %{_builddir}/%{name}-%{version}/data/* %{buildroot}%{_libdir}/data/
+%endif
+
+%files -n %{name}-release
+%manifest %{name}.manifest
+%{_libdir}/libarm_compute*.so
+
+%files -n %{name}-devel
+%manifest %{name}.manifest
+%{_libdir}/libarm_compute*.so
+%{_libdir}/libOpenCL.so
+%{_includedir}/arm_compute/*
+%{_includedir}/support/*
+%{_includedir}/CL/*
+%{_includedir}/half/*
+%{_includedir}/libnpy/*
+
+%files -n %{name}-tools
+%manifest %{name}.manifest
+%{_bindir}/cl_convolution
+%{_bindir}/cl_events
+%{_bindir}/cl_sgemm
+%{_bindir}/graph_alexnet
+%{_bindir}/graph_googlenet
+%{_bindir}/graph_inception_v3
+%{_bindir}/graph_inception_v4
+%{_bindir}/graph_lenet
+%{_bindir}/graph_mobilenet
+%{_bindir}/graph_resnet50
+%{_bindir}/graph_resnext50
+%{_bindir}/graph_squeezenet
+%{_bindir}/graph_squeezenet_v1_1
+%{_bindir}/graph_vgg16
+%{_bindir}/graph_vgg19
+%{_bindir}/neon_cartoon_effect
+%{_bindir}/neoncl_scale_median_gaussian
+%{_bindir}/neon_cnn
+%{_bindir}/neon_convolution
+%{_bindir}/neon_copy_objects
+%{_bindir}/neon_scale
+%if 0%{?BENCHMARK_TEST} == 1
+%{_bindir}/arm_compute_benchmark
+%{_libdir}/data/*
+%endif