BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(libtbm)
-ExclusiveArch: %{arm}
+ExclusiveArch: %{arm} aarch64
%description
Libraries for interfacing to Raspberry Pi GPU.
+%ifarch %{arm}
%package utils
Group: System/Tools
Summary: System tools for the Raspberry Pi
%description devel
This package contains libraries and header files for developing applications that use Raspberry Pi GPU.
+%endif
%package -n vcgencmd
Group: System/Tools
%setup -q
%build
+%ifarch %{arm}
+ ARM64=OFF
+%else
+ ARM64=ON
+%endif
BUILDTYPE=Release
BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`;
mkdir -p build/armv7l-linux/$BUILDSUBDIR
pushd build/armv7l-linux/$BUILDSUBDIR
cmake -DCMAKE_BUILD_TYPE=Release ../../../ \
- -DCMAKE_INSTALL_RPATH=%{_libdir}/vc
+ -DCMAKE_INSTALL_RPATH=%{_libdir}/vc \
+ -DARM64=$ARM64
make %{?_smp_mflags}
popd
/sbin/ldconfig
%install
+%ifarch %{arm}
mkdir -p %{buildroot}/etc/ld.so.conf.d/
cp %{_builddir}/%{name}-%{version}/packaging/libomxil-vc4.conf %{buildroot}/etc/ld.so.conf.d
mkdir -p %{buildroot}/opt/vc/lib/plugins
cp -a %{_builddir}/%{name}-%{version}/vcinclude ./
cp %{_builddir}/%{name}-%{version}/host_applications/linux/libs/bcm_host/include/bcm_host.h ./
popd
+%endif
# install and package vcgencmd with RPATH
BUILDTYPE=Release
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
+%ifarch %{arm}
%files
%manifest packaging/%{name}.manifest
%defattr(-,root,root)
/opt/vc/include/vcinclude
/opt/vc/include/*.h
/opt/vc/lib/pkgconfig/*.pc
+%endif
%files -n vcgencmd
%manifest packaging/%{name}.manifest