This commit is contained in:
Pavel Filipenský 2024-10-22 10:35:42 +02:00
parent eba27cf13c
commit d852cb8518

View File

@ -1,21 +1,15 @@
%if 0%{?fedora} || 0%{?rhel} > 7
%bcond_without python3
%else
%bcond_with python3
%endif
%global talloc_version 2.4.2
Name: libtevent
Version: 0.16.1
Release: %autorelease
Summary: The tevent library
License: LGPL-3.0-or-later
URL: http://tevent.samba.org/
Source0: http://samba.org/ftp/tevent/tevent-%{version}.tar.gz
Source1: http://samba.org/ftp/tevent/tevent-%{version}.tar.asc
Name: libtevent
Version: 0.16.1
Release: %autorelease -b 100
Summary: The tevent library
License: LGPL-3.0-or-later
URL: http://tevent.samba.org/
Source0: http://samba.org/ftp/tevent/tevent-%{version}.tar.gz
Source1: http://samba.org/ftp/tevent/tevent-%{version}.tar.asc
# gpg2 --no-default-keyring --keyring ./tevent.keyring --recv-keys 9147A339719518EE9011BCB54793916113084025
Source2: tevent.keyring
Source2: tevent.keyring
# Patches
@ -27,11 +21,8 @@ BuildRequires: libcmocka-devel >= 1.1.3
BuildRequires: libtalloc-devel >= %{talloc_version}
BuildRequires: libxslt
BuildRequires: make
%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-talloc-devel >= %{talloc_version}
#endif with python
%endif
Provides: bundled(libreplace)
Obsoletes: python2-tevent < 0.10.0-1
@ -44,7 +35,8 @@ Tevent also provide helpers to deal with asynchronous code providing the
tevent_req (Tevent Request) functions.
%package devel
Summary: Developer tools for the Tevent library
Summary: Developer tools for the Tevent library
Requires: libtevent%{?_isa} = %{version}-%{release}
Requires: libtalloc-devel%{?_isa} >= %{talloc_version}
@ -52,17 +44,14 @@ Requires: libtalloc-devel%{?_isa} >= %{talloc_version}
Header files needed to develop programs that link against the Tevent library.
%if %{with python3}
%package -n python3-tevent
Summary: Python 3 bindings for the Tevent library
Requires: libtevent%{?_isa} = %{version}-%{release}
Summary: Python 3 bindings for the Tevent library
Requires: libtevent%{?_isa} = %{version}-%{release}
%{?python_provide:%python_provide python3-tevent}
%description -n python3-tevent
Python 3 bindings for libtevent
#endif with python
%endif
%prep
zcat %{SOURCE0} | gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} -
@ -97,12 +86,10 @@ cp -a doc/man/man3 %{buildroot}%{_mandir}
%{_libdir}/pkgconfig/tevent.pc
%{_mandir}/man3/tevent*.gz
%if %{with python3}
%files -n python3-tevent
%{python3_sitearch}/tevent.py
%{python3_sitearch}/__pycache__/tevent.*
%{python3_sitearch}/_tevent.cpython*.so
%endif
%ldconfig_scriptlets