package created using the webbuild interface [release 0.9.0-1mamba;Sun Oct 15 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 21:32:31 +01:00
parent c25838690d
commit b0fe76b7d1
3 changed files with 92 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# cpu_features
A cross platform C99 library to get cpu features at runtime.

View File

@ -0,0 +1,11 @@
--- a/CMakeLists.orig.txt 2021-02-26 22:26:45.246246073 +0100
+++ b/CMakeLists.txt 2021-02-26 22:26:09.153781594 +0100
@@ -129,7 +129,7 @@
list(APPEND CPU_FEATURES_SRCS $<TARGET_OBJECTS:unix_based_hardware_detection>)
endif()
add_library(cpu_features ${CPU_FEATURES_HDRS} ${CPU_FEATURES_SRCS})
-set_target_properties(cpu_features PROPERTIES PUBLIC_HEADER "${CPU_FEATURES_HDRS}")
+set_target_properties(cpu_features PROPERTIES PUBLIC_HEADER "${CPU_FEATURES_HDRS}" SOVERSION "${CPUFEATURES_VERSION_MAJOR}" VERSION "${CPUFEATURES_VERSION}")
setup_include_and_definitions(cpu_features)
target_link_libraries(cpu_features PUBLIC ${CMAKE_DL_LIBS})
target_include_directories(cpu_features

79
cpu_features.spec Normal file
View File

@ -0,0 +1,79 @@
Name: cpu_features
Version: 0.9.0
Release: 1mamba
Summary: A cross platform C99 library to get cpu features at runtime
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/google/cpu_features
Source: https://github.com/google/cpu_features.git/v%{version}/cpu_features-%{version}.tar.bz2
Patch0: cpu_features-0.9.0-soname.patch
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END
BuildRequires: cmake
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
A cross platform C99 library to get cpu features at runtime.
%package -n lib%{name}
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n lib%{name}
This package contains shared libraries for %{name}.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
%debug_package
%prep
%setup -q
%patch 0 -p1 -b .soname
%build
%cmake
%cmake_build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%cmake_install
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/list_cpu_features
%files -n lib%{name}
%defattr(-,root,root)
%{_libdir}/libcpu_features.so.*
%doc LICENSE
%files -n lib%{name}-devel
%defattr(-,root,root)
%dir %{_includedir}/cpu_features
%{_includedir}/cpu_features/*.h
%{_libdir}/libcpu_features.so
%dir %{_libdir}/cmake/CpuFeatures
%{_libdir}/cmake/CpuFeatures/CpuFeatures*.cmake
%doc README.md
%changelog
* Sun Oct 15 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-1mamba
- package created using the webbuild interface