diff --git a/README.md b/README.md index 1efcac2..551ae7b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # libversion +Advanced version string comparison library. + diff --git a/libversion.spec b/libversion.spec new file mode 100644 index 0000000..dc61612 --- /dev/null +++ b/libversion.spec @@ -0,0 +1,88 @@ +Name: libversion +Version: 3.0.1 +Release: 1mamba +Summary: Advanced version string comparison library +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +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: ldconfig +BuildRequires: libgcc +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +BuildRequires: cmake +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%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 +%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 +* Sun Jan 31 2021 Silvan Calarco 3.0.1-1mamba +- package created using the webbuild interface