libbytesize/libbytesize.spec

175 lines
4.0 KiB
RPMSpec
Raw Normal View History

2020-02-22 18:50:10 +08:00
%define with_python2 0
2019-09-30 10:55:04 -04:00
%define with_python3 1
2020-07-24 18:19:00 +08:00
%define with_tools 1
2019-09-30 10:55:04 -04:00
Name: libbytesize
2021-11-30 11:56:21 +08:00
Version: 2.6
2022-07-12 16:49:17 +08:00
Release: 2
2019-09-30 10:55:04 -04:00
Summary: A library for working with sizes in bytes
License: LGPLv2+
URL: https://github.com/storaged-project/libbytesize
Source0: https://github.com/storaged-project/libbytesize/releases/download/%{version}/%{name}-%{version}.tar.gz
2022-07-12 16:49:17 +08:00
2021-07-22 16:06:36 +08:00
BuildRequires: gcc gmp-devel mpfr-devel pcre-devel gettext-devel libxslt pcre2-devel
%if %{with_python2}
2022-07-12 16:49:17 +08:00
BuildRequires: python2-devel python2-polib python2-pocketlint python2-six
%else
Obsoletes: python2-libbytesize
%endif
2019-09-30 10:55:04 -04:00
%if %{with_python3}
2022-07-12 16:49:17 +08:00
BuildRequires: python3-devel python3-polib python3-pocketlint python3-six glibc-all-langpacks
2019-09-30 10:55:04 -04:00
%endif
BuildRequires: gtk-doc
2019-09-30 10:55:04 -04:00
%description
The goal of this project is to provide a tiny library that would
facilitate the common operations with sizes in bytes.
%package devel
Summary: Files for %{name} development
Requires: %{name} = %{version}-%{release}
%description devel
Files for %{name} development
%if %{with_python3}
%package -n python3-bytesize
Summary: Python 3 bindings for libbytesize
Requires: %{name} = %{version}-%{release}
Requires: python3-six
%description -n python3-bytesize
Python 3 bindings for libbytesize.
%endif
%if %{with_python2}
%package -n python2-bytesize
Summary: Python 2 bindings for libbytesize
Requires: %{name} = %{version}-%{release}
Requires: python2-six
%description -n python2-bytesize
Python 2 bindings for libbytesize.
%endif
2020-07-24 18:19:00 +08:00
%if %{with_tools}
%package tools
Summary: Various nice tools based on libbytesize
Requires: python3-bytesize = %{version}-%{release}
%description tools
Variousnicetoolsbasedonlibbytesize, in particular the calculator
for doing calculations with storage sizes.
%endif
2019-09-30 10:55:04 -04:00
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
%configure
%make_build
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete
%find_lang %{name}
2022-07-12 16:49:17 +08:00
%check
make check
2019-09-30 10:55:04 -04:00
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root)
%license LICENSE
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%if %{with_python2}
%files -n python2-bytesize
%defattr(-,root,root)
%{_libdir}/python2*/site-packages/*
2020-03-14 17:22:27 +08:00
%else
%exclude %{_libdir}/python2*/site-packages/*
2019-09-30 10:55:04 -04:00
%endif
%if %{with_python3}
%files -n python3-bytesize
%defattr(-,root,root)
%{_libdir}/python3*/site-packages/*
%endif
%files help
%doc ABOUT-NLS README.md
%{_datadir}/gtk-doc/html/*
2020-07-24 18:19:00 +08:00
%if %{with_tools}
%files tools
%{_bindir}/bscalc
%{_mandir}/man1/bscalc.1*
%endif
2019-09-30 10:55:04 -04:00
%changelog
2022-07-12 16:49:17 +08:00
* Tue Jul 12 2022 panxiaohe <panxh.life@foxmail.com> - 2.6-2
- enable check test suite
2021-11-30 11:56:21 +08:00
* Tue Nov 30 2021 panxiaohe<panxiaohe@huawei.com> - 2.6-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update version to 2.6
2021-07-22 16:06:36 +08:00
* Thu Jul 22 2021 panxiaohe <panxiaohe@huawei.com> - 2.4-2
- remove unnecessary BuildRequires: gdb
2020-09-01 15:55:41 +08:00
* Tue Sep 1 2020 wangchen <wangchen137@huawei.com> - 2.4-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update version to 2.4
2020-07-24 18:19:00 +08:00
* Sat Jul 25 2020 yang_zhuang_zhuang <yangzhuangzhuang1@huawei.com> - 2.3-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update version to 2.3
* Sat Mar 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.4-8
- fixbug in remove python2 support for package
2020-03-14 17:22:27 +08:00
* Sat Mar 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.4-7
- fixbug in self-building
2020-02-22 18:50:10 +08:00
* Sat Feb 22 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.4-6
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:remove python2 support for package
* Fri Feb 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.4-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add build requires of python2-devel if with python2
2019-12-13 15:33:39 +08:00
* Wed Nov 20 2019 fangyufa<fangyufa1@huawei.com> - 1.4-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build problem for x86_64
2019-09-30 10:55:04 -04:00
* Tue Sep 24 2019 shenyangyang<shenyangyang4@huawei.com> - 1.4-3
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:revise help package
* Wed Aug 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.4-2
- Package init