[12000] | 1 | %define realname bytesize |
---|
[12337] | 2 | %define with_python2 0 |
---|
[12000] | 3 | %define with_python3 1 |
---|
| 4 | %define with_gtk_doc 1 |
---|
| 5 | |
---|
| 6 | %if %{with_python3} == 0 |
---|
| 7 | %define python3_opts --without-python3 |
---|
| 8 | %endif |
---|
| 9 | %if %{with_python2} == 0 |
---|
| 10 | %define python2_opts --without-python2 |
---|
| 11 | %endif |
---|
| 12 | |
---|
| 13 | %define configure_opts %{?python3_opts} %{?python2_opts} |
---|
| 14 | |
---|
| 15 | Name: libbytesize |
---|
[12337] | 16 | Version: 2.2 |
---|
| 17 | Release: 1%{?_dist_release} |
---|
[12000] | 18 | Summary: A library for working with sizes in bytes |
---|
| 19 | License: LGPLv2+ |
---|
| 20 | URL: https://github.com/storaged-project/libbytesize |
---|
| 21 | |
---|
| 22 | Vendor: Project Vine |
---|
| 23 | Distribution: Vine Linux |
---|
| 24 | |
---|
[12337] | 25 | Source0: https://github.com/storaged-project/libbytesize/releases/download/%{version}/%{name}-%{version}.tar.gz |
---|
[12000] | 26 | |
---|
| 27 | BuildRequires: gcc |
---|
| 28 | BuildRequires: gmp-devel |
---|
| 29 | BuildRequires: mpfr-devel |
---|
[12337] | 30 | BuildRequires: pcre2-devel |
---|
[12000] | 31 | BuildRequires: gettext-devel |
---|
| 32 | %if %{with_python2} |
---|
| 33 | BuildRequires: python-devel |
---|
| 34 | BuildRequires: python-rpm-macros |
---|
| 35 | %endif |
---|
| 36 | %if %{with_python3} |
---|
| 37 | BuildRequires: python3-devel |
---|
| 38 | BuildRequires: python3-rpm-macros |
---|
| 39 | %endif |
---|
| 40 | %if %{with_gtk_doc} |
---|
| 41 | BuildRequires: gtk-doc |
---|
| 42 | %endif |
---|
| 43 | |
---|
| 44 | %description |
---|
| 45 | The libbytesize is a C library that facilitates work with sizes in |
---|
| 46 | bytes. Be it parsing the input from users or producing a nice human readable |
---|
| 47 | representation of a size in bytes this library takes localization into |
---|
| 48 | account. It also provides support for sizes bigger than MAXUINT64. |
---|
| 49 | |
---|
| 50 | %package devel |
---|
| 51 | Summary: Development files for libbytesize |
---|
| 52 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
| 53 | |
---|
| 54 | %description devel |
---|
| 55 | This package contains header files and pkg-config files needed for development |
---|
| 56 | with the libbytesize library. |
---|
| 57 | |
---|
| 58 | %if %{with_python2} |
---|
| 59 | %package -n python-%{realname} |
---|
| 60 | Summary: Python 2 bindings for libbytesize |
---|
| 61 | %{?python_provide:%python_provide python2-%{realname}} |
---|
| 62 | %{?python_provide:%python_provide python2-libbytesize} |
---|
| 63 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
| 64 | Requires: python-six |
---|
| 65 | |
---|
| 66 | %description -n python-%{realname} |
---|
| 67 | This package contains Python 2 bindings for libbytesize making the use of |
---|
| 68 | the library from Python 2 easier and more convenient. |
---|
| 69 | %endif |
---|
| 70 | |
---|
| 71 | %if %{with_python3} |
---|
| 72 | %package -n python3-%{realname} |
---|
| 73 | Summary: Python 3 bindings for libbytesize |
---|
| 74 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
| 75 | Requires: python3-six |
---|
| 76 | |
---|
| 77 | %description -n python3-%{realname} |
---|
| 78 | This package contains Python 3 bindings for libbytesize making the use of |
---|
| 79 | the library from Python 3 easier and more convenient. |
---|
| 80 | %endif |
---|
| 81 | |
---|
| 82 | %prep |
---|
| 83 | %setup -q -n %{name}-%{version} |
---|
| 84 | |
---|
| 85 | %build |
---|
| 86 | %configure %{?configure_opts} |
---|
| 87 | %{__make} %{?_smp_mflags} |
---|
| 88 | |
---|
| 89 | %install |
---|
| 90 | %{make_install} |
---|
| 91 | find %{buildroot} -type f -name "*.la" | xargs %{__rm} |
---|
| 92 | %find_lang %{name} |
---|
| 93 | |
---|
| 94 | |
---|
| 95 | %post |
---|
| 96 | /sbin/ldconfig |
---|
| 97 | |
---|
| 98 | %postun |
---|
| 99 | /sbin/ldconfig |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | %files -f %{name}.lang |
---|
| 103 | %doc README.md |
---|
| 104 | %{!?_licensedir:%global license %%doc} |
---|
| 105 | %license LICENSE |
---|
[12337] | 106 | %{_bindir}/* |
---|
[12000] | 107 | %{_libdir}/libbytesize.so.* |
---|
[12337] | 108 | %{_mandir}/man1/* |
---|
[12000] | 109 | |
---|
| 110 | %files devel |
---|
| 111 | %{_libdir}/libbytesize.so |
---|
| 112 | %dir %{_includedir}/bytesize |
---|
| 113 | %{_includedir}/bytesize/bs_size.h |
---|
| 114 | %{_libdir}/pkgconfig/bytesize.pc |
---|
| 115 | %if %{with_gtk_doc} |
---|
| 116 | %{_datadir}/gtk-doc/html/libbytesize |
---|
| 117 | %endif |
---|
| 118 | |
---|
| 119 | %if %{with_python2} |
---|
| 120 | %files -n python-%{realname} |
---|
| 121 | %dir %{python_sitearch}/bytesize |
---|
| 122 | %{python_sitearch}/bytesize/* |
---|
| 123 | %endif |
---|
| 124 | |
---|
| 125 | %if %{with_python3} |
---|
| 126 | %files -n python3-%{realname} |
---|
| 127 | %dir %{python3_sitearch}/bytesize |
---|
| 128 | %{python3_sitearch}/bytesize/* |
---|
| 129 | #%{python3_sitearch}/bytesize/__pycache__/* |
---|
| 130 | %endif |
---|
| 131 | |
---|
| 132 | %changelog |
---|
[12337] | 133 | * Wed Mar 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.2-1 |
---|
| 134 | - new upstream release. |
---|
| 135 | |
---|
[12000] | 136 | * Mon Dec 17 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.4-2 |
---|
| 137 | - initial build for Vine Linux. |
---|
| 138 | |
---|
| 139 | * Thu Aug 02 2018 Vojtech Trefny <vtrefny@redhat.com> - 1.4-1 |
---|
| 140 | - Squashed 'translation-canary/' changes from 840c2d6..fccbb1b (vtrefny) |
---|
| 141 | - Make sure the test script fails if one of the test runs fail (vtrefny) |
---|
| 142 | - Do not try to run python2 tests without python2 support (vtrefny) |
---|
| 143 | - Fix licence header for "gettext.h" (vtrefny) |
---|
| 144 | - Do not use rpm to check for Zanata client (vtrefny) |
---|
| 145 | - Use new ldconfig_scriptlets macro in spec (vtrefny) |
---|
| 146 | |
---|
| 147 | * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-5 |
---|
| 148 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
---|
| 149 | |
---|
| 150 | * Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3-4 |
---|
| 151 | - Rebuilt for Python 3.7 |
---|
| 152 | |
---|
| 153 | * Fri Jun 29 2018 Vojtech Trefny <vtrefny@redhat.com> - 1.3-3 |
---|
| 154 | - Use new ldconfig_scriptlets macro in spec |
---|
| 155 | |
---|
| 156 | * Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3-2 |
---|
| 157 | - Rebuilt for Python 3.7 |
---|
| 158 | |
---|
| 159 | * Thu Apr 19 2018 Vojtech Trefny <vtrefny@redhat.com> - 1.3-1 |
---|
| 160 | - Allow building libbytesize without Python 2 support (vtrefny) |
---|
| 161 | - Sync spec with downstream (vtrefny) |
---|
| 162 | - Add gcc to BuildRequires (vtrefny) |
---|
| 163 | - Fix links for documentation and GH project (vtrefny) |
---|
| 164 | - Add a HACKING.rst file (vpodzime) |
---|
| 165 | - Do not segfault when trying to bs_size_free NULL (vtrefny) |
---|
| 166 | |
---|
| 167 | * Wed Feb 21 2018 Vojtech Trefny <vtrefny@redhat.com> - 1.2-4 |
---|
| 168 | - Add gcc to BuildRequires (vtrefny) |
---|
| 169 | |
---|
| 170 | * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-3 |
---|
| 171 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
---|
| 172 | |
---|
| 173 | * Fri Jan 05 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.2-2 |
---|
| 174 | - Update Python 2 dependency declarations to new packaging standards |
---|
| 175 | (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) |
---|
| 176 | |
---|
| 177 | * Fri Sep 29 2017 Vratislav Podzimek <vpodzime@redhat.com> - 1.2-1 |
---|
| 178 | - Use only version as a tag of the last release (vpodzime) |
---|
| 179 | - Do not require the glib-2.0 pkgconfig package (vpodzime) |
---|
| 180 | - Do not lie about tag creation (vpodzime) |
---|
| 181 | |
---|
| 182 | * Thu Sep 28 2017 Troy Dawson <tdawson@redhat.com> - 1.1-2 |
---|
| 183 | - Cleanup spec file conditionals |
---|
| 184 | |
---|
| 185 | * Thu Sep 21 2017 Vratislav Podzimek <vpodzime@redhat.com> - 1.1-1 |
---|
| 186 | - Add NEWS.rst file (vtrefny) |
---|
| 187 | - Fix source and url in spec file (vtrefny) |
---|
| 188 | - Use only one git tag for new releases (vtrefny) |
---|
| 189 | - Actually translate the units when expected (vpodzime) |
---|
| 190 | - Add two temporary test files to .gitignore (vpodzime) |
---|
| 191 | |
---|
| 192 | * Thu Sep 14 2017 Vratislav Podzimek <vpodzime@redhat.com> - 1.0-1 |
---|
| 193 | - Make more space for CI status image (vtrefny) |
---|
| 194 | - Include limits.h to make sure ULONG_MAX is defined (vpodzime) |
---|
| 195 | - Remove extra 'is' in two docstrings (vpodzime) |
---|
| 196 | - Properly support 64bit operands (vpodzime) |
---|
| 197 | |
---|
| 198 | * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.11-4 |
---|
| 199 | - Python 2 binary package renamed to python2-libbytesize |
---|
| 200 | See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 |
---|
| 201 | |
---|
| 202 | * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-3 |
---|
| 203 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild |
---|
| 204 | |
---|
| 205 | * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-2 |
---|
| 206 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
---|
| 207 | |
---|
| 208 | * Wed Jun 14 2017 Vratislav Podzimek <vpodzime@redhat.com> - 0.11-1 |
---|
| 209 | - Fix README file name (vtrefny) |
---|
| 210 | - Add a build status image to the README.md (vpodzime) |
---|
| 211 | - Remove "glibc-all-langpacks" from test dependencies (vtrefny) |
---|
| 212 | - Check for requires in generated spec file, not in the template (vtrefny) |
---|
| 213 | - Fix checking for available locales (vtrefny) |
---|
| 214 | - Fix library name in acinclude.m4 (vtrefny) |
---|
| 215 | - Do not try to run translation tests on CentOS/RHEL 7 (vtrefny) |
---|
| 216 | - Skip tests if they require unavailable locales (vpodzime) |
---|
| 217 | |
---|
| 218 | * Wed Apr 19 2017 Vratislav Podzimek <vpodzime@redhat.com> - 0.10-1 |
---|
| 219 | - Fix installation without specifying --exec-prefix (martin) |
---|
| 220 | - Sync the spec file with downstream (vpodzime) |
---|
| 221 | |
---|
| 222 | * Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9-2 |
---|
| 223 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild |
---|
| 224 | |
---|
| 225 | * Wed Jan 11 2017 Vratislav Podzimek <vpodzime@redhat.com> - 0.9-1 |
---|
| 226 | - Allow the Size python class to be easily imported (vpodzime) |
---|
| 227 | - Make sure pyexecdir is defined (vpodzime) |
---|
| 228 | - Do not run Python 3 tests without python3 (vpodzime) |
---|
| 229 | - Disable python3 on RHEL (vpodzime) |
---|
| 230 | - Reflect the configuration in the spec file template (vpodzime) |
---|
| 231 | - Make documentation generation conditional (vpodzime) |
---|
| 232 | - Make python3 support conditional (vpodzime) |
---|
| 233 | - Require lower version of libpcre (vpodzime) |
---|
| 234 | - Sync the spec file with downstream (vpodzime) |
---|
| 235 | |
---|
| 236 | * Wed Dec 21 2016 Adam Williamson <awilliam@redhat.com> - 0.8-2 |
---|
| 237 | - Rebuild for Python 3.6, again |
---|
| 238 | |
---|
| 239 | * Fri Dec 16 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.8-1 |
---|
| 240 | - Add a docstring to python bindings (vpodzime) |
---|
| 241 | - Neutralize None as an operand for math operations (vpodzime) |
---|
| 242 | - Add targets for checking and installing test requirements (vpodzime) |
---|
| 243 | - Fix 'make local' (vtrefny) |
---|
| 244 | - Make the python packages own their package directories (vpodzime) |
---|
| 245 | - Don't compare translated and untranslated representations (vpodzime) |
---|
| 246 | - replace_char_with_str: Fix the character count. (dshea) |
---|
| 247 | - Ditch autopoint. (dshea) |
---|
| 248 | |
---|
| 249 | * Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.7-4 |
---|
| 250 | - Rebuild for Python 3.6 |
---|
| 251 | |
---|
| 252 | * Tue Sep 20 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.7-3 |
---|
| 253 | - Prevent ignored exceptions in __del__ from happening (vpodzime) |
---|
| 254 | |
---|
| 255 | * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-2 |
---|
| 256 | - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages |
---|
| 257 | |
---|
| 258 | * Tue May 17 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.7-1 |
---|
| 259 | - Re-run autogen.sh and configure before updating the .pot file (vpodzime) |
---|
| 260 | - Change where tests on translated strings are run. (dshea) |
---|
| 261 | - Squashed 'translation-canary/' changes from d6c0708..840c2d6 (dshea) |
---|
| 262 | - Make sure we get the tests result report in 'make ci' (vpodzime) |
---|
| 263 | - Add a new generic error code/enum for failures (vpodzime) |
---|
| 264 | - Do not ignore the return value from asprintf() (vpodzime) |
---|
| 265 | - Beware of the radix char when converting to Decimal (#1325705) (vpodzime) |
---|
| 266 | |
---|
| 267 | * Fri May 6 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.6-2 |
---|
| 268 | - Beware of unsigned long int on 32bit arches (#1333149) (vpodzime) |
---|
| 269 | |
---|
| 270 | * Tue May 03 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.6-1 |
---|
| 271 | - Add support for the ROUND_HALF_UP rounding mode (vpodzime) |
---|
| 272 | - Make sure we return the right radix char in human_readable() (vpodzime) |
---|
| 273 | - Allocate enough memory for char->str replacements (vpodzime) |
---|
| 274 | |
---|
| 275 | * Tue Apr 26 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.5-1 |
---|
| 276 | - Create both libbytesize-$version and $version tags (vpodzime) |
---|
| 277 | - Update the .pot file with the new version (vpodzime) |
---|
| 278 | - Improve how we create changelog (vpodzime) |
---|
| 279 | - Try harder when getting OverflowError in division (#1326897) (vpodzime) |
---|
| 280 | - Neutralize the radix char before passing string to MPFR (#1326108) (vpodzime) |
---|
| 281 | - Run tests with en_US and fr_FR locales (vpodzime) |
---|
| 282 | - Run the tests with both python2 and python3 again (vpodzime) |
---|
| 283 | - Do not run the same tests 3 times as part of the 'ci' target (vpodzime) |
---|
| 284 | - Don't fail if just the best-effort cleanup fails (vpodzime) |
---|
| 285 | - Throw away the new .pot file when just running tests (vpodzime) |
---|
| 286 | - Make sure we return one of -1, 0, 1 from cmp functions (#1326113) (vpodzime) |
---|
| 287 | - Use cmp_bytes(size, bytes) when comparing to 0 (vpodzime) |
---|
| 288 | - Ignore all .po~ files (vpodzime) |
---|
| 289 | - Add translator comments (dshea) |
---|
| 290 | - Integrate translation-canary into the build. (dshea) |
---|
| 291 | - Run the translation-canary tests from make check. (dshea) |
---|
| 292 | - Squashed 'translation-canary/' content from commit d6c0708 (dshea) |
---|
| 293 | - Make 'make check' work. (dshea) |
---|
| 294 | - Remove files from po/ we don't need to track (vpodzime) |
---|
| 295 | - Ignore the compiled translation files (vpodzime) |
---|
| 296 | - Distribute and package the translations (vpodzime) |
---|
| 297 | - Add the necessary pieces for getting translations (vpodzime) |
---|
| 298 | |
---|
| 299 | * Thu Apr 14 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.4-3 |
---|
| 300 | - Only require -lgmp and -lmpfr for static linking (vpodzime) |
---|
| 301 | |
---|
| 302 | * Fri Mar 11 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.4-2 |
---|
| 303 | - Do not try to delete the C struct twice (vpodzime) |
---|
| 304 | |
---|
| 305 | * Wed Mar 09 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.4-1 |
---|
| 306 | - Add the __init__.py file to provide a proper package (vpodzime) |
---|
| 307 | - Merge pull request #7 from vpodzime/master-decimal_locale (vpodzime) |
---|
| 308 | - Make sure we pass a locale-agnostic string to Decimal() (vpodzime) |
---|
| 309 | - Adapt the package description to no longer using GI (vpodzime) |
---|
| 310 | - Make Size instances hashable (vpodzime) |
---|
| 311 | - Sync the spec file with downstream (vpodzime) |
---|
| 312 | |
---|
| 313 | * Wed Mar 9 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.3-3 |
---|
| 314 | - Make sure we pass a locale-agnostic string to Decimal() (vpodzime) |
---|
| 315 | |
---|
| 316 | * Mon Mar 7 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.3-2 |
---|
| 317 | - Make Size instances hashable (vpodzime) |
---|
| 318 | |
---|
| 319 | * Fri Feb 26 2016 Vratislav Podzimek <vpodzime@redhat.com> - 0.3-1 |
---|
| 320 | - Packaging changes related to getting rid of GLib/GObject (vpodzime) |
---|
| 321 | - Adapt the python bindings and tests (vpodzime) |
---|
| 322 | - Get rid of GObject and GLib (vpodzime) |
---|
| 323 | - Define the __divmod__ method even for not dividing by Size (vpodzime) |
---|
| 324 | |
---|
| 325 | * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-3 |
---|
| 326 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild |
---|
| 327 | |
---|
| 328 | * Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2-2 |
---|
| 329 | - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 |
---|
| 330 | |
---|
| 331 | * Fri Oct 23 2015 Vratislav Podzimek <vpodzime@redhat.com> - 0.2-1 |
---|
| 332 | - Distribute the tests for overrides (vpodzime) |
---|
| 333 | - Fix the rpmlog target (vpodzime) |
---|
| 334 | - Respect the signs when doing division (vpodzime) |
---|
| 335 | - Add two more internal methods that may be required (vpodzime) |
---|
| 336 | - Do not pass negative numbers as guint64 when comparing with negative ints (vpodzime) |
---|
| 337 | - Round toward zero when converting bytes from float to int (vpodzime) |
---|
| 338 | - Make sure we return Size if doing operations with big integers (vpodzime) |
---|
| 339 | - Implement the __divmod__() method (vpodzime) |
---|
| 340 | - Do not try to convert negative int to an unsigned int when multiplying (vpodzime) |
---|
| 341 | - Fix and test the __deepcopy__ method (vpodzime) |
---|
| 342 | - Implement the evaluation of Size instance as a bool value (vpodzime) |
---|
| 343 | - Fix some issues in comparison functions and add tests (vpodzime) |
---|
| 344 | - Add a function for getting string representation of a unit (vpodzime) |
---|
| 345 | - Hook the overrides tests to the 'test' target (vpodzime) |
---|
| 346 | - Merge pull request #4 from japokorn/master-tests_03_python_override (vpodzime) |
---|
| 347 | - Added tests for Python override (japokorn) |
---|
| 348 | - Make sure our tests don't get broken by installed overrides (vpodzime) |
---|
| 349 | |
---|
| 350 | * Wed Oct 07 2015 Vratislav Podzimek <vpodzime@redhat.com> - 0.1-1 |
---|
| 351 | - Initial release |
---|