commit 5e793378078979f5bd43705af3e35905e33fa165d37d3f4e3332891ecbf82a64 Author: Jan Engelhardt Date: Thu Jan 18 23:58:52 2018 +0000 Accepting request 564449 from home:luc14n0:Factory udisks2's new dependency. OBS-URL: https://build.opensuse.org/request/show/564449 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libbytesize?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/libbytesize-1.2.tar.gz b/libbytesize-1.2.tar.gz new file mode 100644 index 0000000..aa3924b --- /dev/null +++ b/libbytesize-1.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65656ed62080d73d0f21d9647cee20533377bee150e91807fd54c502f3e1108f +size 432097 diff --git a/libbytesize.changes b/libbytesize.changes new file mode 100644 index 0000000..ef34065 --- /dev/null +++ b/libbytesize.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Tue Nov 28 23:59:07 UTC 2017 - luc14n0@linuxmail.org + +- Initial package, version 1.2. + diff --git a/libbytesize.spec b/libbytesize.spec new file mode 100644 index 0000000..e501409 --- /dev/null +++ b/libbytesize.spec @@ -0,0 +1,139 @@ +# +# spec file for package libbytesize +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%bcond_with python2 +%define somajor 1 +%define libname %{name}%{somajor} + +Name: libbytesize +Version: 1.2 +Release: 0 +Summary: A library for working with sizes in bytes +License: LGPL-2.1 +Group: Development/Libraries/C and C++ +Url: https://github.com/storaged-project/libbytesize +Source: https://github.com/storaged-project/libbytesize/releases/download/1.2/%{name}-%{version}.tar.gz +BuildRequires: gmp-devel +BuildRequires: gtk-doc +BuildRequires: mpfr-devel +BuildRequires: python3-devel +%{?with_python2:BuildRequires: python2-devel} +BuildRequires: pkgconfig(libpcre) >= 8.32 +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +The LibBytesize is a C library that facilitates work with sizes in +bytes. Be it parsing the input from users or producing a nice human readable +representation of a size in bytes this library takes localization into +account. It also provides support for sizes bigger than MAXUINT64. + +%package -n %{libname} +Group: System/Libraries +Summary: A library for working with sizes in bytes + +%description -n %{libname} +The LibBytesize is a C library that facilitates work with sizes in +bytes. Be it parsing the input from users or producing a nice human readable +representation of a size in bytes this library takes localization into +account. It also provides support for sizes bigger than MAXUINT64. + +%package devel +Group: Development/Libraries/C and C++ +Summary: Development files for LibBytesize +Requires: %{libname} = %{version} + +%description devel +This package contains header files and pkg-config files needed for development +with the LibBytesize library. + +%package -n python2-%{name} +Group: Development/Libraries/Python +Summary: Python 2 bindings for LibBytesize +%{?python_provide:%python_provide python2-%{name}} +Requires: %{libname} = %{version} +Requires: python2-six + +%description -n python2-%{name} +This package contains Python 2 bindings for LibBytesize making the use of +the library from Python 2 easier and more convenient. + +%package -n python3-%{name} +Group: Development/Libraries/Python +Summary: Python 3 bindings for LibBytesize +Requires: %{libname} = %{version} +Requires: python3-six + +%description -n python3-%{name} +This package contains Python 3 bindings for LibBytesize making the use of +the library from Python 3 easier and more convenient. + +%lang_package + +%prep +%autosetup + +%build +%configure \ + --disable-static \ + --with-python3 \ + --with-gtk-doc +%make_build + +%install +%make_install +find %{buildroot} -name '*.la' -type f -delete -print +%find_lang %{name} + +# If python2 bindings are switched off this directory appears. +# A feature request has been upstreamed for python 2 switch (gh#storaged-project/libbytesize#45). +%if !%{with python2} +%__rm -rf %{buildroot}/bytesize +%endif + +%post -n %{libname} -p /sbin/ldconfig + +%postun -n %{libname} -p /sbin/ldconfig + +%files -n %{libname} +%defattr(-,root,root) +%doc README.md LICENSE +%{_libdir}/%{name}.so.* + +%files devel +%defattr(-,root,root) +%doc %{_datadir}/gtk-doc/html/%{name} +%{_libdir}/%{name}.so +%dir %{_includedir}/bytesize +%{_includedir}/bytesize/bs_size.h +%{_libdir}/pkgconfig/bytesize.pc + +%if %{with python2} +%files -n python2-%{name} +%defattr(-,root,root) +%dir %{python2_sitearch}/bytesize +%{python2_sitearch}/bytesize/* +%endif + +%files -n python3-%{name} +%defattr(-,root,root) +%dir %{python3_sitearch}/bytesize +%{python3_sitearch}/bytesize/* + +%files lang -f %{name}.lang + +%changelog