libversion/libversion.spec

96 lines
2.4 KiB
RPMSpec

Name: libversion
Version: 3.0.3
Release: 1mamba
Summary: Advanced version string comparison library
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/repology/libversion
Source: https://github.com/repology/libversion.git/%{version}/libversion-%{version}.tar.bz2
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
BuildRequires: cmake
%description
Advanced version string comparison library.
%package devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: pkg-config
%description devel
This package contains libraries and header files for developing applications that use %{name}.
%package tools
Group: Applications/Development
Summary: Utility applications for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description tools
This package contains utility applications for %{name}.
%debug_package
%prep
%setup -q
sed -i "s| lib | %{_lib} |" libversion/CMakeLists.txt
sed -i "s| lib/cmake| %{_lib}/cmake|" libversion/CMakeLists.txt
%build
%cmake -d build \
-DPKGCONFIGDIR=%{_lib}/pkgconfig
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
rm -f %{buildroot}%{_prefix}/lib/libversion.a
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/libversion.so.*
%doc COPYING
%files devel
%defattr(-,root,root)
%dir %{_includedir}/libversion
%{_includedir}/libversion/*.h
%{_libdir}/libversion.so
%ifarch x86_64
%{_libdir}/libversion.a
%endif
%dir %{_libdir}/cmake/libversion
%{_libdir}/cmake/libversion/libversionConfig*.cmake
%{_libdir}/pkgconfig/libversion.pc
%doc README.md
%files tools
%defattr(-,root,root)
%{_bindir}/version_compare
%{_bindir}/version_sort
%changelog
* Sat Jan 14 2023 Automatic Build System <autodist@mambasoft.it> 3.0.3-1mamba
- automatic version update by autodist
* Sun Oct 16 2022 Automatic Build System <autodist@mambasoft.it> 3.0.2-1mamba
- automatic version update by autodist
* Sun Jan 31 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 3.0.1-1mamba
- package created using the webbuild interface