Blame SPECS/libbytesize.spec

7324a4
%define realname bytesize
7324a4
%define with_python3 0
7324a4
%define with_gtk_doc 1
7324a4
7324a4
%define is_rhel 0%{?rhel} != 0
7324a4
7324a4
# python3 is not available on RHEL
7324a4
%if %{is_rhel}
7324a4
%define with_python3 0
7324a4
%define configure_opts --without-python3
7324a4
%endif
7324a4
7324a4
Name:        libbytesize
7324a4
Version:     1.2
7324a4
Release:     1%{?dist}
7324a4
Summary:     A library for working with sizes in bytes
7324a4
License:     LGPLv2+
7324a4
URL:         https://github.com/storaged-project/libbytesize
7324a4
Source0:     https://github.com/storaged-project/libbytesize/releases/download/%{version}-%{release}/%{name}-%{version}.tar.gz
7324a4
7324a4
BuildRequires: gmp-devel
7324a4
BuildRequires: mpfr-devel
7324a4
BuildRequires: pcre-devel
7324a4
BuildRequires: gettext-devel
7324a4
BuildRequires: python-devel
7324a4
%if %{with_python3}
7324a4
BuildRequires: python3-devel
7324a4
%endif
7324a4
%if %{with_gtk_doc}
7324a4
BuildRequires: gtk-doc
7324a4
%endif
7324a4
7324a4
%description
7324a4
The libbytesize is a C library that facilitates work with sizes in
7324a4
bytes. Be it parsing the input from users or producing a nice human readable
7324a4
representation of a size in bytes this library takes localization into
7324a4
account. It also provides support for sizes bigger than MAXUINT64.
7324a4
7324a4
%package devel
7324a4
Summary:  Development files for libbytesize
7324a4
Requires: %{name}%{?_isa} = %{version}-%{release}
7324a4
7324a4
%description devel
7324a4
This package contains header files and pkg-config files needed for development
7324a4
with the libbytesize library.
7324a4
7324a4
%package -n python2-%{realname}
7324a4
Summary: Python 2 bindings for libbytesize
7324a4
%{?python_provide:%python_provide python2-%{realname}}
7324a4
%{?python_provide:%python_provide python2-libbytesize}
7324a4
Requires: %{name}%{?_isa} = %{version}-%{release}
7324a4
Requires: python-six
7324a4
7324a4
%description -n python2-%{realname}
7324a4
This package contains Python 2 bindings for libbytesize making the use of
7324a4
the library from Python 2 easier and more convenient.
7324a4
7324a4
%if %{with_python3}
7324a4
%package -n python3-%{realname}
7324a4
Summary: Python 3 bindings for libbytesize
7324a4
Requires: %{name}%{?_isa} = %{version}-%{release}
7324a4
Requires: python3-six
7324a4
7324a4
%description -n python3-%{realname}
7324a4
This package contains Python 3 bindings for libbytesize making the use of
7324a4
the library from Python 3 easier and more convenient.
7324a4
%endif
7324a4
7324a4
%prep
7324a4
%setup -q -n %{name}-%{version}
7324a4
7324a4
%build
7324a4
%configure %{?configure_opts}
7324a4
%{__make} %{?_smp_mflags}
7324a4
7324a4
%install
7324a4
%{make_install}
7324a4
find %{buildroot} -type f -name "*.la" | xargs %{__rm}
7324a4
%find_lang %{name}
7324a4
7324a4
7324a4
%post -p /sbin/ldconfig
7324a4
%postun -p /sbin/ldconfig
7324a4
7324a4
7324a4
%files -f %{name}.lang
7324a4
%doc README.md
7324a4
%{!?_licensedir:%global license %%doc}
7324a4
%license LICENSE
7324a4
%{_libdir}/libbytesize.so.*
7324a4
7324a4
%files devel
7324a4
%{_libdir}/libbytesize.so
7324a4
%dir %{_includedir}/bytesize
7324a4
%{_includedir}/bytesize/bs_size.h
7324a4
%{_libdir}/pkgconfig/bytesize.pc
7324a4
%if %{with_gtk_doc}
7324a4
%{_datadir}/gtk-doc/html/libbytesize
7324a4
%endif
7324a4
7324a4
%files -n python2-%{realname}
7324a4
%dir %{python2_sitearch}/bytesize
7324a4
%{python2_sitearch}/bytesize/*
7324a4
7324a4
%if %{with_python3}
7324a4
%files -n python3-%{realname}
7324a4
%dir %{python3_sitearch}/bytesize
7324a4
%{python3_sitearch}/bytesize/*
7324a4
%{python3_sitearch}/bytesize/__pycache__/*
7324a4
%endif
7324a4
7324a4
%changelog
7324a4
* Fri Sep 29 2017 Vratislav Podzimek <vpodzime@redhat.com> - 1.2-1
7324a4
- Use only version as a tag of the last release (vpodzime)
7324a4
- Do not require the glib-2.0 pkgconfig package (vpodzime)
7324a4
- Do not lie about tag creation (vpodzime)
7324a4
7324a4
* Thu Sep 21 2017 Vratislav Podzimek <vpodzime@redhat.com> - 1.1-1
7324a4
- Add NEWS.rst file (vtrefny)
7324a4
- Fix source and url in spec file (vtrefny)
7324a4
- Use only one git tag for new releases (vtrefny)
7324a4
- Actually translate the units when expected (vpodzime)
7324a4
- Add two temporary test files to .gitignore (vpodzime)
7324a4
7324a4
* Thu Sep 14 2017 Vratislav Podzimek <vpodzime@redhat.com> - 1.0-1
7324a4
- Make more space for CI status image (vtrefny)
7324a4
- Include limits.h to make sure ULONG_MAX is defined (vpodzime)
7324a4
- Remove extra 'is' in two docstrings (vpodzime)
7324a4
- Properly support 64bit operands (vpodzime)
7324a4
7324a4
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.11-4
7324a4
- Python 2 binary package renamed to python2-libbytesize
7324a4
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
7324a4
7324a4
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-3
7324a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
7324a4
7324a4
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-2
7324a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7324a4
7324a4
* Wed Jun 14 2017 Vratislav Podzimek <vpodzime@redhat.com> - 0.11-1
7324a4
- Fix README file name (vtrefny)
7324a4
- Add a build status image to the README.md (vpodzime)
7324a4
- Remove "glibc-all-langpacks" from test dependencies (vtrefny)
7324a4
- Check for requires in generated spec file, not in the template (vtrefny)
7324a4
- Fix checking for available locales (vtrefny)
7324a4
- Fix library name in acinclude.m4 (vtrefny)
7324a4
- Do not try to run translation tests on CentOS/RHEL 7 (vtrefny)
7324a4
- Skip tests if they require unavailable locales (vpodzime)
7324a4
7324a4
* Wed Apr 19 2017 Vratislav Podzimek <vpodzime@redhat.com> - 0.10-1
7324a4
- Fix installation without specifying --exec-prefix (martin)
7324a4
- Sync the spec file with downstream (vpodzime)
7324a4
7324a4
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9-2
7324a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7324a4
7324a4
* Wed Jan 11 2017 Vratislav Podzimek <vpodzime@redhat.com> - 0.9-1
7324a4
- Allow the Size python class to be easily imported (vpodzime)
7324a4
- Make sure pyexecdir is defined (vpodzime)
7324a4
- Do not run Python 3 tests without python3 (vpodzime)
7324a4
- Disable python3 on RHEL (vpodzime)
7324a4
- Reflect the configuration in the spec file template (vpodzime)
7324a4
- Make documentation generation conditional (vpodzime)
7324a4
- Make python3 support conditional (vpodzime)
7324a4
- Require lower version of libpcre (vpodzime)
7324a4
- Sync the spec file with downstream (vpodzime)
7324a4
7324a4
* Wed Dec 21 2016 Adam Williamson <awilliam@redhat.com> - 0.8-2
7324a4
- Rebuild for Python 3.6, again
7324a4
7324a4
* Fri Dec 16 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.8-1
7324a4
- Add a docstring to python bindings (vpodzime)
7324a4
- Neutralize None as an operand for math operations (vpodzime)
7324a4
- Add targets for checking and installing test requirements (vpodzime)
7324a4
- Fix 'make local' (vtrefny)
7324a4
- Make the python packages own their package directories (vpodzime)
7324a4
- Don't compare translated and untranslated representations (vpodzime)
7324a4
- replace_char_with_str: Fix the character count. (dshea)
7324a4
- Ditch autopoint. (dshea)
7324a4
7324a4
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.7-4
7324a4
- Rebuild for Python 3.6
7324a4
7324a4
* Tue Sep 20 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.7-3
7324a4
- Prevent ignored exceptions in __del__ from happening (vpodzime)
7324a4
7324a4
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-2
7324a4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
7324a4
7324a4
* Tue May 17 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.7-1
7324a4
- Re-run autogen.sh and configure before updating the .pot file (vpodzime)
7324a4
- Change where tests on translated strings are run. (dshea)
7324a4
- Squashed 'translation-canary/' changes from d6c0708..840c2d6 (dshea)
7324a4
- Make sure we get the tests result report in 'make ci' (vpodzime)
7324a4
- Add a new generic error code/enum for failures (vpodzime)
7324a4
- Do not ignore the return value from asprintf() (vpodzime)
7324a4
- Beware of the radix char when converting to Decimal (#1325705) (vpodzime)
7324a4
7324a4
* Fri May  6 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.6-2
7324a4
- Beware of unsigned long int on 32bit arches (#1333149) (vpodzime)
7324a4
7324a4
* Tue May 03 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.6-1
7324a4
- Add support for the ROUND_HALF_UP rounding mode (vpodzime)
7324a4
- Make sure we return the right radix char in human_readable() (vpodzime)
7324a4
- Allocate enough memory for char->str replacements (vpodzime)
7324a4
7324a4
* Tue Apr 26 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.5-1
7324a4
- Create both libbytesize-$version and $version tags (vpodzime)
7324a4
- Update the .pot file with the new version (vpodzime)
7324a4
- Improve how we create changelog (vpodzime)
7324a4
- Try harder when getting OverflowError in division (#1326897) (vpodzime)
7324a4
- Neutralize the radix char before passing string to MPFR (#1326108) (vpodzime)
7324a4
- Run tests with en_US and fr_FR locales (vpodzime)
7324a4
- Run the tests with both python2 and python3 again (vpodzime)
7324a4
- Do not run the same tests 3 times as part of the 'ci' target (vpodzime)
7324a4
- Don't fail if just the best-effort cleanup fails (vpodzime)
7324a4
- Throw away the new .pot file when just running tests (vpodzime)
7324a4
- Make sure we return one of -1, 0, 1 from cmp functions (#1326113) (vpodzime)
7324a4
- Use cmp_bytes(size, bytes) when comparing to 0 (vpodzime)
7324a4
- Ignore all .po~ files (vpodzime)
7324a4
- Add translator comments (dshea)
7324a4
- Integrate translation-canary into the build. (dshea)
7324a4
- Run the translation-canary tests from make check. (dshea)
7324a4
- Squashed 'translation-canary/' content from commit d6c0708 (dshea)
7324a4
- Make 'make check' work. (dshea)
7324a4
- Remove files from po/ we don't need to track (vpodzime)
7324a4
- Ignore the compiled translation files (vpodzime)
7324a4
- Distribute and package the translations (vpodzime)
7324a4
- Add the necessary pieces for getting translations (vpodzime)
7324a4
7324a4
* Thu Apr 14 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.4-3
7324a4
- Only require -lgmp and -lmpfr for static linking (vpodzime)
7324a4
7324a4
* Fri Mar 11 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.4-2
7324a4
- Do not try to delete the C struct twice (vpodzime)
7324a4
7324a4
* Wed Mar 09 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.4-1
7324a4
- Add the __init__.py file to provide a proper package (vpodzime)
7324a4
- Merge pull request #7 from vpodzime/master-decimal_locale (vpodzime)
7324a4
- Make sure we pass a locale-agnostic string to Decimal() (vpodzime)
7324a4
- Adapt the package description to no longer using GI (vpodzime)
7324a4
- Make Size instances hashable (vpodzime)
7324a4
- Sync the spec file with downstream (vpodzime)
7324a4
7324a4
* Wed Mar  9 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.3-3
7324a4
- Make sure we pass a locale-agnostic string to Decimal() (vpodzime)
7324a4
7324a4
* Mon Mar  7 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.3-2
7324a4
- Make Size instances hashable (vpodzime)
7324a4
7324a4
* Fri Feb 26 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.3-1
7324a4
- Packaging changes related to getting rid of GLib/GObject (vpodzime)
7324a4
- Adapt the python bindings and tests (vpodzime)
7324a4
- Get rid of GObject and GLib (vpodzime)
7324a4
- Define the __divmod__ method even for not dividing by Size (vpodzime)
7324a4
7324a4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-3
7324a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7324a4
7324a4
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2-2
7324a4
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
7324a4
7324a4
* Fri Oct 23 2015 Vratislav Podzimek <vpodzime@redhat.com> - 0.2-1
7324a4
- Distribute the tests for overrides (vpodzime)
7324a4
- Fix the rpmlog target (vpodzime)
7324a4
- Respect the signs when doing division (vpodzime)
7324a4
- Add two more internal methods that may be required (vpodzime)
7324a4
- Do not pass negative numbers as guint64 when comparing with negative ints (vpodzime)
7324a4
- Round toward zero when converting bytes from float to int (vpodzime)
7324a4
- Make sure we return Size if doing operations with big integers (vpodzime)
7324a4
- Implement the __divmod__() method (vpodzime)
7324a4
- Do not try to convert negative int to an unsigned int when multiplying (vpodzime)
7324a4
- Fix and test the __deepcopy__ method (vpodzime)
7324a4
- Implement the evaluation of Size instance as a bool value (vpodzime)
7324a4
- Fix some issues in comparison functions and add tests (vpodzime)
7324a4
- Add a function for getting string representation of a unit (vpodzime)
7324a4
- Hook the overrides tests to the 'test' target (vpodzime)
7324a4
- Merge pull request #4 from japokorn/master-tests_03_python_override (vpodzime)
7324a4
- Added tests for Python override (japokorn)
7324a4
- Make sure our tests don't get broken by installed overrides (vpodzime)
7324a4
7324a4
* Wed Oct 07 2015 Vratislav Podzimek <vpodzime@redhat.com> - 0.1-1
7324a4
- Initial release