There is vcgencmd usage for raspberry pi, so add package only with
vcgencmd and dependent libraries and set exact RUNPATH to find
library in %{_libdir}/vc.
Note: picked commit from tizen branch and change install path to
/usr because /hal path is not added to tizen 6.0.
Change-Id: Ie0421c0be0f27ca014af6d369924f9b612b6b928
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
%description devel
This package contains libraries and header files for developing applications that use Raspberry Pi GPU.
%description devel
This package contains libraries and header files for developing applications that use Raspberry Pi GPU.
+%package -n vcgencmd
+Group: System/Tools
+Summary: vcgencmd tools for the Raspberry Pi
+
+%description -n vcgencmd
+This package contains vcgencmd system tools for the Raspberry Pi.
+Source: https://github.com/raspberrypi/userland.git
+
BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`;
mkdir -p build/armv7l-linux/$BUILDSUBDIR
pushd build/armv7l-linux/$BUILDSUBDIR
BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`;
mkdir -p build/armv7l-linux/$BUILDSUBDIR
pushd build/armv7l-linux/$BUILDSUBDIR
-cmake -DCMAKE_BUILD_TYPE=Release ../../../
+cmake -DCMAKE_BUILD_TYPE=Release ../../../ \
+ -DCMAKE_INSTALL_RPATH=%{_libdir}/vc
make %{?_smp_mflags}
popd
make %{?_smp_mflags}
popd
cp %{_builddir}/%{name}-%{version}/host_applications/linux/libs/bcm_host/include/bcm_host.h ./
popd
cp %{_builddir}/%{name}-%{version}/host_applications/linux/libs/bcm_host/include/bcm_host.h ./
popd
+# install and package vcgencmd with RPATH
+BUILDTYPE=Release
+BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`;
+pushd build/armv7l-linux/$BUILDSUBDIR
+make install \
+ DESTDIR=%{_builddir}/%{name}-%{version}/build/armv7l-linux/install \
+ INSTALL_ROOT=%{_builddir}/%{name}-%{version}/build/armv7l-linux/install
+popd
+
+mkdir -p %{buildroot}/%{_bindir}
+mkdir -p %{buildroot}/%{_libdir}/vc
+cp build/armv7l-linux/install/opt/vc/bin/vcgencmd %{buildroot}/%{_bindir}
+cp build/armv7l-linux/install/opt/vc/lib/libvchiq_arm.so %{buildroot}/%{_libdir}/vc
+cp build/armv7l-linux/install/opt/vc/lib/libvcos.so %{buildroot}/%{_libdir}/vc
+
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
/opt/vc/include/*.h
/opt/vc/lib/pkgconfig/*.pc
/opt/vc/include/*.h
/opt/vc/lib/pkgconfig/*.pc
+%files -n vcgencmd
+%manifest packaging/%{name}.manifest
+%license LICENSE
+%{_bindir}/vcgencmd
+%{_libdir}/vc/*.so