From b0fe76b7d1f916221e72fe18778a43d41e996015 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 21:32:31 +0100 Subject: [PATCH] package created using the webbuild interface [release 0.9.0-1mamba;Sun Oct 15 2023] --- README.md | 2 + cpu_features-0.9.0-soname.patch | 11 +++++ cpu_features.spec | 79 +++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 cpu_features-0.9.0-soname.patch create mode 100644 cpu_features.spec diff --git a/README.md b/README.md index 439577b..b60a887 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # cpu_features +A cross platform C99 library to get cpu features at runtime. + diff --git a/cpu_features-0.9.0-soname.patch b/cpu_features-0.9.0-soname.patch new file mode 100644 index 0000000..b18e648 --- /dev/null +++ b/cpu_features-0.9.0-soname.patch @@ -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 $) + 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 diff --git a/cpu_features.spec b/cpu_features.spec new file mode 100644 index 0000000..64002bb --- /dev/null +++ b/cpu_features.spec @@ -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 +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 0.9.0-1mamba +- package created using the webbuild interface