tevent/tevent.spec

179 lines
5.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package tevent
#
- Update to 0.9.18. + Adding new timer events is now faster, if there's a large number of timer events. + sigprocmask does not work on FreeBSD to stop further signals in a signal handler. + TEVENT_NUM_SIGNALS is calculated by configure in order to support realtime signals on freebsd. + ./configure --disable-python was fixed for the standalone build. + Several crash bugs in the poll backend are fixed. + The poll backend removes deleted events from the cached pollfd array now. + The poll doesn't pass pollfd.events == 0 to poll() and maintains a list of disabled events, instead of consuming 100% cpu and/or triggering the callers handler. + The poll backend detects POLLNVAL and reports EBADF instead of consuming 100% cpu. + The select backend supports separate handlers for TEVENT_FD_READ and TEVENT_FD_WRITE. + The poll and select backends are now doing fair queuing of fd events. + The epoll has better error checking and supports separate handlers for TEVENT_FD_READ and TEVENT_FD_WRITE. + The standard backend was rewritten to be a tiny wrapper on top of epoll with a fallback to poll, which means that it doesn't use select directly anymore. + TEVENT_TRACE_BEFORE_LOOP_ONCE and TEVENT_TRACE_AFTER_LOOP_ONCE are added in order to allow the application to hook in before and after the loop_once() backend function is called. The TEVENT_HAS_LOOP_ONCE_TRACE_POINTS define can be used to detect the new feature. OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/tevent?expand=0&rev=17
2013-04-09 16:50:21 +02:00
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define talloc_version 2.0.7
Name: tevent
BuildRequires: doxygen
%if 0%{?suse_version} > 1220
BuildRequires: gpg-offline
%endif
#!BuildIgnore: libtalloc
BuildRequires: libtalloc-devel >= %{talloc_version}
%if 0%{?suse_version} > 1020
BuildRequires: pkg-config
%else
BuildRequires: pkgconfig
%endif
BuildRequires: pytalloc-devel >= %{talloc_version}
BuildRequires: python-devel
%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
Url: http://tevent.samba.org/
Version: 0.9.19
Release: 0
Summary: An event system based on the talloc memory management library
License: GPL-3.0+
Group: System/Libraries
Source: http://download.samba.org/pub/tevent/tevent-%{version}.tar.gz
Source1: http://download.samba.org/pub/tevent/tevent-%{version}.tar.asc
Source2: samba-library-distribution-key.asc
Source4: baselibs.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
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.
Tevent also provide helpers to deal with asynchronous code providing the
tevent_req (tevent request) functions.
%define libtevent_name libtevent0
%package -n %{libtevent_name}
PreReq: /sbin/ldconfig
Summary: Samba tevent Library
Group: System/Libraries
%description -n %{libtevent_name}
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.
%package -n libtevent-devel
Summary: Libraries and Header Files to Develop Programs with tevent0 Support
Group: Development/Libraries/C and C++
Requires: %{libtevent_name} = %{version}
Requires: libtalloc-devel >= %{talloc_version}
%if 0%{?suse_version} > 1020
Requires: pkg-config
%else
Requires: pkgconfig
%endif
%description -n libtevent-devel
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.
Tevent also provide helpers to deal with asynchronous code providing the
tevent_req (tevent request) functions.
This package contains libraries and header files need for development.
%package -n python-tevent
Summary: Python bindings for the Tevent library
Group: Development/Libraries/Python
Requires: %{libtevent_name} = %{version}
PreReq: /sbin/ldconfig
%description -n python-tevent
This package contains the python bindings for the Tevent library.
%prep
%if 0%{?suse_version} > 1220
gzip -dc %{SOURCE0} >${RPM_SOURCE_DIR}/%{name}-%{version}.tar
%{?gpg_verify: %gpg_verify --keyring %{SOURCE2} %{SOURCE1}}
rm ${RPM_SOURCE_DIR}/%{name}-%{version}.tar
%endif
%setup -n tevent-%{version} -q
%build
%if 0%{?suse_version} && 0%{?suse_version} < 911
OPTIMIZATION="-O"
%else
# use the default optimization
unset OPTIMIZATION
%endif
export CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE ${OPTIMIZATION} -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS"
CONFIGURE_OPTIONS="\
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--disable-rpath \
--bundled-libraries=NONE \
--builtin-libraries=replace \
"
./configure ${CONFIGURE_OPTIONS}
%{__make} %{build_make_smp_mflags} \
all
%check
%{__make} test
%install
DESTDIR=${RPM_BUILD_ROOT} make install
# 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 {} \;
%post -n %{libtevent_name} -p /sbin/ldconfig
%postun -n %{libtevent_name} -p /sbin/ldconfig
%post -n python-tevent -p /sbin/ldconfig
%postun -n python-tevent -p /sbin/ldconfig
%files -n %{libtevent_name}
%defattr(-,root,root)
%{_libdir}/libtevent.so.*
%files -n libtevent-devel
%defattr(-,root,root)
%{_includedir}/tevent.h
%{_libdir}/libtevent.so
%{_libdir}/pkgconfig/tevent.pc
%files -n python-tevent
%defattr(-,root,root)
%attr(0755,root,root)
%{python_sitearch}/tevent.py
%{python_sitearch}/_tevent.so
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 11 || 0%{?rhel_version} > 599
%{python_sitearch}/tevent.pyc
%{python_sitearch}/tevent.pyo
%endif
%changelog