From 511645aa23c21431afdd19716b7fb20f88c72dca Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Fri, 1 Aug 2025 23:46:52 +0800 Subject: [PATCH] cleanup spec (cherry picked from commit 5955e2b0395b4b7bf196bd9ebf0c71c2e3a06f9e) --- libbytesize.spec | 74 ++++++++++++++---------------------------------- libbytesize.yaml | 2 +- 2 files changed, 23 insertions(+), 53 deletions(-) diff --git a/libbytesize.spec b/libbytesize.spec index 423b70a..381c0b3 100644 --- a/libbytesize.spec +++ b/libbytesize.spec @@ -1,26 +1,23 @@ -%define with_python2 0 -%define with_python3 1 -%define with_tools 1 - Name: libbytesize Version: 2.11 -Release: 1 +Release: 2 Summary: A library for working with sizes in bytes -License: LGPLv2+ +License: LGPL-2.1-or-later URL: https://github.com/storaged-project/libbytesize Source0: https://github.com/storaged-project/libbytesize/releases/download/%{version}/%{name}-%{version}.tar.gz -BuildRequires: gcc gmp-devel mpfr-devel pcre-devel gettext-devel libxslt pcre2-devel -%if %{with_python2} -BuildRequires: python2-devel python2-polib python2-pocketlint python2-six -%else -Obsoletes: python2-libbytesize -%endif -%if %{with_python3} -BuildRequires: python3-devel python3-polib python3-pocketlint python3-six glibc-all-langpacks -%endif +BuildRequires: make gcc +BuildRequires: pkgconfig(libpcre2-8) +BuildRequires: gmp-devel +BuildRequires: mpfr-devel +BuildRequires: /usr/bin/xgettext +BuildRequires: /usr/bin/msgmerge +BuildRequires: /usr/bin/msgfmt BuildRequires: gtk-doc - +BuildRequires: python3-devel +BuildRequires: python3-polib +BuildRequires: python3-pocketlint +Obsoletes: python2-libbytesize %description The goal of this project is to provide a tiny library that would @@ -29,36 +26,24 @@ 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 - -%if %{with_tools} %package tools Summary: Various nice tools based on libbytesize Requires: python3-bytesize = %{version}-%{release} %description tools -Variousnicetoolsbasedonlibbytesize, in particular the calculator +Various nice tools based on libbytesize, in particular the calculator for doing calculations with storage sizes. -%endif %package_help @@ -71,51 +56,36 @@ for doing calculations with storage sizes. %install %make_install -find %{buildroot} -type f -name "*.la" -delete +%delete_la %find_lang %{name} %check make check -%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/* -%else -%exclude %{_libdir}/python2*/site-packages/* -%endif - -%if %{with_python3} %files -n python3-bytesize -%defattr(-,root,root) -%{_libdir}/python3*/site-packages/* -%endif +%{python3_sitearch}/* %files help %doc ABOUT-NLS README.md -%{_datadir}/gtk-doc/html/* +%doc %{_datadir}/gtk-doc/html/* -%if %{with_tools} %files tools %{_bindir}/bscalc %{_mandir}/man1/bscalc.1* -%endif %changelog +* Fri Aug 01 2025 Funda Wang - 2.11-2 +- cleanup spec + * Tue Aug 20 2024 xiejing - 2.11-1 - update version to 2.11 - fixes for some small issues diff --git a/libbytesize.yaml b/libbytesize.yaml index b003204..a3e488d 100644 --- a/libbytesize.yaml +++ b/libbytesize.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: storaged-project/libbytesize tag_prefix: -seperator: . +separator: . -- Gitee