2018-01-19 00:58:52 +01:00
|
|
|
#
|
|
|
|
# spec file for package libbytesize
|
|
|
|
#
|
2023-05-06 23:36:09 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2018-01-19 00:58:52 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2020-08-16 20:52:41 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-01-19 00:58:52 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-09-01 06:30:35 +02:00
|
|
|
%define soversion 1
|
|
|
|
|
2018-01-19 00:58:52 +01:00
|
|
|
Name: libbytesize
|
2023-09-01 06:30:35 +02:00
|
|
|
Version: 2.9
|
2018-01-19 00:58:52 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: A library for working with sizes in bytes
|
2018-05-04 15:11:53 +02:00
|
|
|
License: LGPL-2.1-only
|
2018-01-19 00:58:52 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2018-05-04 15:11:53 +02:00
|
|
|
URL: https://github.com/storaged-project/libbytesize
|
2023-09-01 06:30:35 +02:00
|
|
|
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
|
|
|
Source1: %{url}/raw/%{version}/NEWS.rst
|
2023-05-07 00:30:44 +02:00
|
|
|
|
2018-05-04 15:11:53 +02:00
|
|
|
BuildRequires: gcc
|
2018-01-19 00:58:52 +01:00
|
|
|
BuildRequires: gmp-devel
|
|
|
|
BuildRequires: gtk-doc
|
|
|
|
BuildRequires: mpfr-devel
|
2020-08-16 20:52:41 +02:00
|
|
|
BuildRequires: pkgconfig
|
2018-01-19 00:58:52 +01:00
|
|
|
BuildRequires: python3-devel
|
2020-08-16 20:52:41 +02:00
|
|
|
BuildRequires: pkgconfig(libpcre2-8)
|
2018-01-19 00:58:52 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
The LibBytesize is a C library that facilitates work with sizes in
|
2018-02-05 23:09:32 +01:00
|
|
|
bytes, be it parsing the input from users or producing a human-readable
|
|
|
|
representation of a size in bytes. This library takes localization into
|
2018-01-19 00:58:52 +01:00
|
|
|
account. It also provides support for sizes bigger than MAXUINT64.
|
|
|
|
|
2023-09-01 06:30:35 +02:00
|
|
|
%package -n libbytesize%{soversion}
|
2018-01-19 00:58:52 +01:00
|
|
|
Summary: A library for working with sizes in bytes
|
2018-12-10 00:27:42 +01:00
|
|
|
Group: System/Libraries
|
2018-02-06 16:22:56 +01:00
|
|
|
Provides: %{name} = %{version}
|
2018-01-19 00:58:52 +01:00
|
|
|
|
2023-09-01 06:30:35 +02:00
|
|
|
%description -n libbytesize%{soversion}
|
2018-01-19 00:58:52 +01:00
|
|
|
The LibBytesize is a C library that facilitates work with sizes in
|
2018-02-05 23:09:32 +01:00
|
|
|
bytes, be it parsing the input from users or producing a human-readable
|
|
|
|
representation of a size in bytes. This library takes localization into
|
2018-01-19 00:58:52 +01:00
|
|
|
account. It also provides support for sizes bigger than MAXUINT64.
|
|
|
|
|
2020-08-16 20:52:41 +02:00
|
|
|
%package -n bscalc
|
2023-09-01 06:30:35 +02:00
|
|
|
Summary: A libbytesize tool
|
2020-08-16 20:52:41 +02:00
|
|
|
Group: System/Libraries
|
2023-09-01 06:30:35 +02:00
|
|
|
Requires: libbytesize%{soversion} = %{version}
|
2023-05-07 00:30:44 +02:00
|
|
|
BuildArch: noarch
|
2020-08-16 20:52:41 +02:00
|
|
|
|
|
|
|
%description -n bscalc
|
2023-09-01 06:30:35 +02:00
|
|
|
This package solely contains the bscalc tool.
|
2020-08-16 20:52:41 +02:00
|
|
|
|
2018-01-19 00:58:52 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for LibBytesize
|
2018-12-10 00:27:42 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2023-09-01 06:30:35 +02:00
|
|
|
Requires: libbytesize%{soversion} = %{version}
|
2018-01-19 00:58:52 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains header files and pkg-config files needed for development
|
|
|
|
with the LibBytesize library.
|
|
|
|
|
2023-09-23 03:24:38 +02:00
|
|
|
%package -n python3-bytesize
|
2018-01-19 00:58:52 +01:00
|
|
|
Summary: Python 3 bindings for LibBytesize
|
2018-12-10 00:27:42 +01:00
|
|
|
Group: Development/Libraries/Python
|
2023-09-01 06:30:35 +02:00
|
|
|
Requires: libbytesize%{soversion} = %{version}
|
2018-01-19 00:58:52 +01:00
|
|
|
Requires: python3-six
|
|
|
|
|
2023-09-23 03:24:38 +02:00
|
|
|
%description -n python3-bytesize
|
2018-01-19 00:58:52 +01:00
|
|
|
This package contains Python 3 bindings for LibBytesize making the use of
|
|
|
|
the library from Python 3 easier and more convenient.
|
|
|
|
|
|
|
|
%lang_package
|
|
|
|
|
|
|
|
%prep
|
2023-09-01 06:30:35 +02:00
|
|
|
%autosetup -p1
|
|
|
|
# Place NEWS.rst in the source tree for %%doc'ing it later.
|
|
|
|
install -m 644 -t . %{SOURCE1}
|
2018-01-19 00:58:52 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%configure \
|
|
|
|
--disable-static \
|
2023-05-07 00:30:44 +02:00
|
|
|
--with-python3 \
|
|
|
|
--with-gtk-doc
|
2018-01-19 00:58:52 +01:00
|
|
|
%make_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
2020-08-16 20:52:41 +02:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2018-02-06 16:22:56 +01:00
|
|
|
%find_lang %{name} %{?no_lang_C}
|
2018-01-19 00:58:52 +01:00
|
|
|
|
2023-09-01 06:30:35 +02:00
|
|
|
%post -n libbytesize%{soversion} -p /sbin/ldconfig
|
|
|
|
%postun -n libbytesize%{soversion} -p /sbin/ldconfig
|
2018-01-19 00:58:52 +01:00
|
|
|
|
2020-08-16 20:52:41 +02:00
|
|
|
%files -n bscalc
|
|
|
|
%license LICENSE
|
2023-09-01 06:30:35 +02:00
|
|
|
%doc NEWS.rst README.md
|
2020-08-16 20:52:41 +02:00
|
|
|
%{_bindir}/bscalc
|
|
|
|
%{_mandir}/man1/bscalc.1*
|
|
|
|
|
2023-09-01 06:30:35 +02:00
|
|
|
%files -n libbytesize%{soversion}
|
2018-01-19 00:58:52 +01:00
|
|
|
%{_libdir}/%{name}.so.*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%doc %{_datadir}/gtk-doc/html/%{name}
|
|
|
|
%{_libdir}/%{name}.so
|
|
|
|
%dir %{_includedir}/bytesize
|
|
|
|
%{_includedir}/bytesize/bs_size.h
|
|
|
|
%{_libdir}/pkgconfig/bytesize.pc
|
|
|
|
|
2023-09-23 03:24:38 +02:00
|
|
|
%files -n python3-bytesize
|
2018-01-19 00:58:52 +01:00
|
|
|
%dir %{python3_sitearch}/bytesize
|
|
|
|
%{python3_sitearch}/bytesize/*
|
|
|
|
|
|
|
|
%files lang -f %{name}.lang
|
|
|
|
|
|
|
|
%changelog
|