%global pkgvers 0 %global scdate0 20240829 %global schash0 8e2a51b1c3e5b569aabc0b476f36550c1f332c41 %global branch0 linux-rga-multi %global source0 https://github.com/JeffyCN/mirrors.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: librga-rockchip Version: 2.2.0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Userspace interface to Rockchip RGA 2D accelerator License: MIT URL: https://github.com/JeffyCN/mirrors/tree/linux-rga-multi BuildRequires: git cmake gcc-c++ %global __cmake_in_source_build 1 %global _default_patch_fuzz 100 %description Userspace interface to Rockchip RGA 2D accelerator %package static Summary: Userspace interface to Rockchip RGA 2D accelerator Requires: %{name} = %{version}-%{release} %description static Static libraries for Userspace interface to Rockchip RGA 2D accelerator %package devel Summary: Headers for Userspace interface to Rockchip RGA 2D accelerator Requires: %{name} = %{version}-%{release} %description devel Userspace interface to Rockchip RGA 2D accelerator %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller # sover sed -i 's|set_target_properties(${SHARED_LIB_NAME} PROPERTIES|set_target_properties(${SHARED_LIB_NAME} PROPERTIES SOVERSION 1 VERSION 1.0|g' CMakeLists.txt %build %global optflags %(echo "%{optflags} -fpermissive") %cmake . \ -DCMAKE_SKIP_RPATH=YES \ -DCMAKE_SKIP_INSTALL_RPATH=YES \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TARGET=cmake_linux \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/rga make %{?_smp_mflags} %install %make_install mkdir -p %{buildroot}/%{_libdir}/pkgconfig echo 'prefix=/usr' > %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo 'exec_prefix=${prefix}' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo 'libdir=${prefix}/lib64' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo 'includedir=${prefix}/include/' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo '' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo 'Name: rockchip_rga' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo 'Description: Userspace interface to Rockchip RGA 2D accelerator' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo 'Requires.private:' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo 'Version: %{version}' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo 'Libs: -L${libdir} -lrga' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo 'Libs.private:' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc echo 'Cflags: -I${includedir}' >> %{buildroot}/%{_libdir}/pkgconfig/librga.pc %files %{_bindir}/* %license COPYING %doc CHANGELOG.md %{_libdir}/lib*.so.* %files devel %{_includedir}/* %{_libdir}/lib*.so %{_libdir}/pkgconfig/* %files static %{_libdir}/lib*.a %changelog * Sun Jan 19 2025 Cristian Balint - upstream git relases