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
This commit is contained in:
Jan Engelhardt 2018-01-18 23:58:52 +00:00 committed by Git OBS Bridge
commit 5e79337807
5 changed files with 171 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
libbytesize-1.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65656ed62080d73d0f21d9647cee20533377bee150e91807fd54c502f3e1108f
size 432097

5
libbytesize.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Tue Nov 28 23:59:07 UTC 2017 - luc14n0@linuxmail.org
- Initial package, version 1.2.

139
libbytesize.spec Normal file
View File

@ -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