Blame SPECS/libbytesize.spec

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