Blame dist/libbytesize.spec.in

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