New version

- Allow building libbytesize without Python 2 support (vtrefny)
- Sync spec with downstream (vtrefny)
- Add gcc to BuildRequires (vtrefny)
- Fix links for documentation and GH project (vtrefny)
- Add a HACKING.rst file (vpodzime)
- Do not segfault when trying to bs_size_free NULL (vtrefny)
This commit is contained in:
Vojtech Trefny 2018-04-27 17:51:56 +02:00
parent 81b4f428a3
commit c7ba089831
3 changed files with 29 additions and 5 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@
/libbytesize-1.0.tar.gz
/libbytesize-1.1.tar.gz
/libbytesize-1.2.tar.gz
/libbytesize-1.3.tar.gz

View File

@ -1,15 +1,24 @@
%define realname bytesize
%define with_python2 1
%define with_python3 1
%define with_gtk_doc 1
%if ! 0%{?fedora} && 0%{?rhel} <= 7
%if (! 0%{?fedora} && 0%{?rhel} <= 7) || %{with_python3} == 0
%define with_python3 0
%define configure_opts --without-python3
%define python3_opts --without-python3
%endif
# python2 is not available on RHEL > 7 and not needed on Fedora > 28
%if 0%{?rhel} > 7 || 0%{?fedora} > 28 || %{with_python2} == 0
%define with_python2 0
%define python2_opts --without-python2
%endif
%define configure_opts %{?python3_opts} %{?python2_opts}
Name: libbytesize
Version: 1.2
Release: 4%{?dist}
Version: 1.3
Release: 1%{?dist}
Summary: A library for working with sizes in bytes
License: LGPLv2+
URL: https://github.com/storaged-project/libbytesize
@ -20,7 +29,9 @@ BuildRequires: gmp-devel
BuildRequires: mpfr-devel
BuildRequires: pcre-devel
BuildRequires: gettext-devel
%if %{with_python2}
BuildRequires: python2-devel
%endif
%if %{with_python3}
BuildRequires: python3-devel
%endif
@ -42,6 +53,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains header files and pkg-config files needed for development
with the libbytesize library.
%if %{with_python2}
%package -n python2-%{realname}
Summary: Python 2 bindings for libbytesize
%{?python_provide:%python_provide python2-%{realname}}
@ -52,6 +64,7 @@ Requires: python2-six
%description -n python2-%{realname}
This package contains Python 2 bindings for libbytesize making the use of
the library from Python 2 easier and more convenient.
%endif
%if %{with_python3}
%package -n python3-%{realname}
@ -96,9 +109,11 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
%{_datadir}/gtk-doc/html/libbytesize
%endif
%if %{with_python2}
%files -n python2-%{realname}
%dir %{python2_sitearch}/bytesize
%{python2_sitearch}/bytesize/*
%endif
%if %{with_python3}
%files -n python3-%{realname}
@ -108,6 +123,14 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
%endif
%changelog
* Thu Apr 19 2018 Vojtech Trefny <vtrefny@redhat.com> - 1.3-1
- Allow building libbytesize without Python 2 support (vtrefny)
- Sync spec with downstream (vtrefny)
- Add gcc to BuildRequires (vtrefny)
- Fix links for documentation and GH project (vtrefny)
- Add a HACKING.rst file (vpodzime)
- Do not segfault when trying to bs_size_free NULL (vtrefny)
* Wed Feb 21 2018 Vojtech Trefny <vtrefny@redhat.com> - 1.2-4
- Add gcc to BuildRequires (vtrefny)

View File

@ -1 +1 @@
SHA512 (libbytesize-1.2.tar.gz) = d61ff297d1f533aee120bfcfdc3969c6a87428da322a6410707c301ff9b005da5d4f813ea15282eab5eb8435b009646d2cff29ac5247e2664af3ecaef54867a6
SHA512 (libbytesize-1.3.tar.gz) = a8e5b5d59d0a97ae52a2c0f437c4d7fd8afc8249762be99027e3beeadc6c54ad52a09c1d30e66466b99496fcf3419fa799d0fcccf61c0661b3e9cff48d0054af