commit f5d04e8b9a6bf5ef5db02d60ee17e9aef01b5fc7 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:55:04 2019 -0400 Package init diff --git a/libbytesize-1.4.tar.gz b/libbytesize-1.4.tar.gz new file mode 100644 index 0000000..13fd171 Binary files /dev/null and b/libbytesize-1.4.tar.gz differ diff --git a/libbytesize.spec b/libbytesize.spec new file mode 100644 index 0000000..e1020b2 --- /dev/null +++ b/libbytesize.spec @@ -0,0 +1,97 @@ +%define with_python2 1 +%define with_python3 1 + +Name: libbytesize +Version: 1.4 +Release: 3 +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 +BuildRequires: gcc gmp-devel mpfr-devel pcre-devel gettext-devel +%if %{with_python3} +BuildRequires: python3-devel +%endif +BuildRequires: gtk-doc + +%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 + +%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} + +%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/* +%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/* + +%changelog +* Tue Sep 24 2019 shenyangyang - 1.4-3 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:revise help package + +* Wed Aug 21 2019 openEuler Buildteam - 1.4-2 +- Package init