2012-05-25 11:00:22 +02:00
|
|
|
#
|
2024-05-20 11:09:03 +02:00
|
|
|
# spec file for package tevent
|
2012-05-25 11:00:22 +02:00
|
|
|
#
|
2024-01-22 08:42:40 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2012-05-25 11:00:22 +02: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.
|
|
|
|
|
2018-09-25 17:00:15 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-05-25 11:00:22 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2015-10-25 16:04:06 +01:00
|
|
|
%{!?py3_soflags: %global py3_soflags cpython-%{python3_version_nodots}m}
|
2012-05-31 23:34:50 +02:00
|
|
|
|
2024-05-20 11:09:03 +02:00
|
|
|
%define talloc_version 2.4.2
|
2015-09-04 16:30:00 +02:00
|
|
|
%define build_man 0
|
2012-06-02 02:08:16 +02:00
|
|
|
|
2022-02-02 16:53:48 +01:00
|
|
|
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
|
|
|
|
%define bundle_cmocka 0
|
|
|
|
%else
|
|
|
|
%define bundle_cmocka 1
|
|
|
|
%endif
|
|
|
|
|
2015-09-04 16:30:00 +02:00
|
|
|
%if %{build_man}
|
2015-09-08 00:32:45 +02:00
|
|
|
Name: tevent-man
|
2012-05-25 11:00:22 +02:00
|
|
|
BuildRequires: doxygen
|
2015-09-04 16:30:00 +02:00
|
|
|
%else
|
2015-09-08 00:32:45 +02:00
|
|
|
Name: tevent
|
2012-06-02 02:08:16 +02:00
|
|
|
BuildRequires: libtalloc-devel >= %{talloc_version}
|
2018-03-19 11:56:47 +01:00
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
BuildRequires: libtirpc-devel
|
|
|
|
%endif
|
2014-05-24 15:06:16 +02:00
|
|
|
%if 0%{?suse_version} > 1020
|
|
|
|
BuildRequires: pkg-config
|
|
|
|
%else
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
%endif
|
2021-09-23 12:24:08 +02:00
|
|
|
BuildRequires: pkg-config
|
2015-10-25 16:04:06 +01:00
|
|
|
BuildRequires: python3-devel
|
2017-10-01 13:51:57 +02:00
|
|
|
BuildRequires: python3-talloc >= %{talloc_version}
|
|
|
|
BuildRequires: python3-talloc-devel >= %{talloc_version}
|
2022-02-02 16:53:48 +01:00
|
|
|
%if ! %{bundle_cmocka}
|
2021-09-23 12:24:08 +02:00
|
|
|
BuildRequires: pkgconfig(cmocka) >= 1.1.3
|
2022-02-02 16:53:48 +01:00
|
|
|
%endif
|
2015-11-11 20:27:36 +01:00
|
|
|
%endif # build_man
|
2012-05-25 11:00:22 +02:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140
|
|
|
|
%define build_make_smp_mflags %{?_smp_mflags}
|
|
|
|
%else
|
|
|
|
%define build_make_smp_mflags %{?jobs:-j%jobs}
|
|
|
|
%endif
|
2020-01-03 15:01:55 +01:00
|
|
|
URL: https://tevent.samba.org/
|
2024-05-20 11:09:03 +02:00
|
|
|
Version: 0.16.1
|
2012-05-25 11:00:22 +02:00
|
|
|
Release: 0
|
2012-06-02 17:48:07 +02:00
|
|
|
Summary: An event system based on the talloc memory management library
|
2018-09-25 17:00:15 +02:00
|
|
|
License: LGPL-3.0-or-later
|
2017-02-06 16:27:30 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2017-01-26 13:21:09 +01:00
|
|
|
Source: https://download.samba.org/pub/tevent/tevent-%{version}.tar.gz
|
|
|
|
Source1: https://download.samba.org/pub/tevent/tevent-%{version}.tar.asc
|
2014-10-28 16:54:31 +01:00
|
|
|
Source2: tevent.keyring
|
2012-05-25 11:00:22 +02:00
|
|
|
Source4: baselibs.conf
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
2012-06-02 17:48:07 +02:00
|
|
|
Tevent is an event system based on the talloc memory management library. It
|
|
|
|
is the core event system used in Samba.
|
|
|
|
|
|
|
|
The low level tevent has support for many event types, including timers,
|
|
|
|
signals, and the classic file descriptor events.
|
|
|
|
|
2012-05-25 11:00:22 +02:00
|
|
|
Tevent also provide helpers to deal with asynchronous code providing the
|
2012-06-02 17:48:07 +02:00
|
|
|
tevent_req (tevent request) functions.
|
|
|
|
|
2015-09-04 16:30:00 +02:00
|
|
|
%if ! %{build_man}
|
2012-06-02 17:48:07 +02:00
|
|
|
|
2017-10-01 13:51:57 +02:00
|
|
|
%package -n libtevent0
|
2012-06-02 17:48:07 +02:00
|
|
|
PreReq: /sbin/ldconfig
|
|
|
|
Summary: Samba tevent Library
|
2012-06-28 18:49:42 +02:00
|
|
|
Group: System/Libraries
|
2012-06-02 17:48:07 +02:00
|
|
|
|
2017-10-01 13:51:57 +02:00
|
|
|
%description -n libtevent0
|
2012-06-02 17:48:07 +02:00
|
|
|
Tevent is an event system based on the talloc memory management library. It
|
|
|
|
is the core event system used in Samba.
|
|
|
|
|
|
|
|
The low level tevent has support for many event types, including timers,
|
|
|
|
signals, and the classic file descriptor events.
|
|
|
|
|
|
|
|
This package contains the tevent0 library.
|
2012-05-25 11:00:22 +02:00
|
|
|
|
2012-05-31 14:05:52 +02:00
|
|
|
%package -n libtevent-devel
|
2012-05-25 11:00:22 +02:00
|
|
|
Summary: Libraries and Header Files to Develop Programs with tevent0 Support
|
2017-04-10 16:34:52 +02:00
|
|
|
# Man pages are built in a 2nd spec file in order to break a build cycle with doxygen->cmake->krb5->libtevent
|
2017-10-01 13:51:57 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2015-09-08 00:32:45 +02:00
|
|
|
%if 0%{?suse_version} > 1030
|
2015-09-04 16:30:00 +02:00
|
|
|
Recommends: %{name}-man
|
2015-09-08 00:32:45 +02:00
|
|
|
%endif
|
2012-06-02 02:08:16 +02:00
|
|
|
Requires: libtalloc-devel >= %{talloc_version}
|
2017-10-01 13:51:57 +02:00
|
|
|
Requires: libtevent0 = %{version}
|
2012-05-25 11:00:22 +02:00
|
|
|
%if 0%{?suse_version} > 1020
|
|
|
|
Requires: pkg-config
|
|
|
|
%else
|
|
|
|
Requires: pkgconfig
|
|
|
|
%endif
|
|
|
|
|
2012-05-31 14:05:52 +02:00
|
|
|
%description -n libtevent-devel
|
2012-06-02 17:48:07 +02:00
|
|
|
Tevent is an event system based on the talloc memory management library. It
|
|
|
|
is the core event system used in Samba.
|
2012-05-25 11:00:22 +02:00
|
|
|
|
|
|
|
The low level tevent has support for many event types, including timers,
|
|
|
|
signals, and the classic file descriptor events.
|
|
|
|
|
|
|
|
Tevent also provide helpers to deal with asynchronous code providing the
|
|
|
|
tevent_req (tevent request) functions.
|
|
|
|
|
2012-06-02 17:48:07 +02:00
|
|
|
This package contains libraries and header files need for development.
|
|
|
|
|
2015-10-25 16:04:06 +01:00
|
|
|
%package -n python3-tevent
|
|
|
|
Summary: Python3 bindings for the Tevent library
|
|
|
|
Group: Development/Libraries/Python
|
2017-10-01 13:51:57 +02:00
|
|
|
Requires: libtevent0 = %{version}
|
2015-10-25 16:04:06 +01:00
|
|
|
PreReq: /sbin/ldconfig
|
2019-04-22 19:10:28 +02:00
|
|
|
Obsoletes: python-tevent
|
2015-10-25 16:04:06 +01:00
|
|
|
|
|
|
|
%description -n python3-tevent
|
|
|
|
This package contains the python bindings for the Tevent library.
|
|
|
|
|
2015-11-11 20:27:36 +01:00
|
|
|
%endif # ! build_man
|
2015-09-04 16:30:00 +02:00
|
|
|
|
2012-05-25 11:00:22 +02:00
|
|
|
%prep
|
|
|
|
%setup -n tevent-%{version} -q
|
|
|
|
|
|
|
|
%build
|
2015-09-04 16:30:00 +02:00
|
|
|
%if ! %{build_man}
|
2012-05-25 11:00:22 +02:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 911
|
|
|
|
OPTIMIZATION="-O"
|
|
|
|
%else
|
|
|
|
# use the default optimization
|
|
|
|
unset OPTIMIZATION
|
|
|
|
%endif
|
2022-02-02 16:53:48 +01:00
|
|
|
%if %{bundle_cmocka}
|
|
|
|
BUNDLED_LIBS="cmocka"
|
|
|
|
%endif
|
2012-05-25 11:00:22 +02:00
|
|
|
export CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE ${OPTIMIZATION} -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS"
|
|
|
|
CONFIGURE_OPTIONS="\
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=%{_libdir} \
|
2012-06-28 18:49:42 +02:00
|
|
|
--disable-rpath \
|
2015-10-30 16:20:45 +01:00
|
|
|
--disable-rpath-install \
|
|
|
|
--disable-silent-rules \
|
2022-02-02 16:53:48 +01:00
|
|
|
--bundled-libraries=NONE,${BUNDLED_LIBS} \
|
2012-05-25 11:00:22 +02:00
|
|
|
--builtin-libraries=replace \
|
|
|
|
"
|
|
|
|
./configure ${CONFIGURE_OPTIONS}
|
|
|
|
%{__make} %{build_make_smp_mflags} \
|
|
|
|
all
|
2015-09-04 16:30:00 +02:00
|
|
|
%else
|
2012-05-25 11:00:22 +02:00
|
|
|
|
2014-09-23 22:46:36 +02:00
|
|
|
doxygen doxy.config
|
|
|
|
|
2015-11-11 20:27:36 +01:00
|
|
|
%endif # ! build_man
|
2015-09-04 16:30:00 +02:00
|
|
|
|
|
|
|
%if ! %{build_man}
|
2012-05-25 11:00:22 +02:00
|
|
|
%check
|
2015-06-27 22:09:33 +02:00
|
|
|
LD_LIBRARY_PATH=bin/shared %{__make} test
|
2015-11-11 20:27:36 +01:00
|
|
|
%endif # ! build_man
|
2012-05-25 11:00:22 +02:00
|
|
|
|
|
|
|
%install
|
2015-09-04 16:30:00 +02:00
|
|
|
%if ! %{build_man}
|
2012-05-25 11:00:22 +02:00
|
|
|
DESTDIR=${RPM_BUILD_ROOT} make install
|
2014-09-23 22:46:36 +02:00
|
|
|
|
2015-09-04 16:30:00 +02:00
|
|
|
# Shared libraries need to be marked executable for rpmbuild to strip them and
|
|
|
|
# include them in debuginfo
|
|
|
|
find ${RPM_BUILD_ROOT} -name "*.so*" -exec chmod -c +x {} \;
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
2014-09-23 22:46:36 +02:00
|
|
|
# install API docs
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_mandir}
|
|
|
|
cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir}
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man3/todo.3
|
|
|
|
|
2015-11-11 20:27:36 +01:00
|
|
|
%endif # ! build_man
|
2012-05-25 11:00:22 +02:00
|
|
|
|
2015-09-04 16:30:00 +02:00
|
|
|
%if ! %{build_man}
|
2017-10-01 13:51:57 +02:00
|
|
|
%post -n libtevent0 -p /sbin/ldconfig
|
2012-05-25 11:00:22 +02:00
|
|
|
|
2017-10-01 13:51:57 +02:00
|
|
|
%postun -n libtevent0 -p /sbin/ldconfig
|
2012-05-25 11:00:22 +02:00
|
|
|
|
2015-10-25 16:04:06 +01:00
|
|
|
%post -n python3-tevent -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n python3-tevent -p /sbin/ldconfig
|
|
|
|
|
2017-10-01 13:51:57 +02:00
|
|
|
%files -n libtevent0
|
2012-05-25 11:00:22 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libtevent.so.*
|
2022-02-02 16:53:48 +01:00
|
|
|
%if %{bundle_cmocka}
|
|
|
|
%dir %{_libdir}/tevent
|
|
|
|
%{_libdir}/tevent/libcmocka-tevent.so
|
|
|
|
%endif
|
2012-05-25 11:00:22 +02:00
|
|
|
|
2012-05-31 14:05:52 +02:00
|
|
|
%files -n libtevent-devel
|
2012-05-25 11:00:22 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/tevent.h
|
|
|
|
%{_libdir}/libtevent.so
|
|
|
|
%{_libdir}/pkgconfig/tevent.pc
|
|
|
|
|
2015-10-25 16:04:06 +01:00
|
|
|
%files -n python3-tevent
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{python3_sitearch}/_tevent.%{py3_soflags}.so
|
|
|
|
%{python3_sitearch}/tevent.py
|
2015-10-25 18:02:04 +01:00
|
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 11 || 0%{?rhel_version} > 599
|
|
|
|
%{python3_sitearch}/__pycache__/tevent.cpython-*.py[co]
|
|
|
|
%endif
|
2015-10-25 16:04:06 +01:00
|
|
|
|
2015-09-04 16:30:00 +02:00
|
|
|
%else
|
2021-09-23 12:24:08 +02:00
|
|
|
|
2015-09-04 16:30:00 +02:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_mandir}/man3/tevent*.*
|
|
|
|
|
2015-11-11 20:27:36 +01:00
|
|
|
%endif # ! build_man
|
2015-09-04 16:30:00 +02:00
|
|
|
|
2012-05-25 11:00:22 +02:00
|
|
|
%changelog
|