libbytesize-vl.spec 14 KB

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