2011-02-15 17:34:50 +01:00
#
2012-08-08 11:11:32 +02:00
# spec file for package libev
2011-02-15 17:34:50 +01:00
#
2020-07-26 11:31:03 +02:00
# Copyright (c) 2020 SUSE LLC
2011-02-15 17:34:50 +01: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.
2019-07-18 06:19:20 +02:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2011-02-15 17:34:50 +01:00
#
2017-08-02 15:34:24 +02:00
%define library_name libev4
2011-02-15 17:34:50 +01:00
Name : libev
2020-07-26 11:31:03 +02:00
Version : 4.33
2011-11-16 17:18:43 +01:00
Release : 0
2017-10-08 10:29:24 +02:00
Summary : An event loop library
2012-08-08 11:11:32 +02:00
License : BSD-2-Clause
2011-02-15 17:34:50 +01:00
Group : Development/Libraries/C and C++
2020-07-26 11:31:03 +02:00
URL : http://software.schmorp.de/pkg/libev.html
Source : http://dist.schmorp.de/%{name} /Attic/%{name} -%{version} .tar.gz
2012-08-08 11:11:32 +02:00
# Upstream has received patches to add pkg-config support for years but it always ignored them (yes, no answer at all). But since every distribution creates it we just follow.
Source1 : libev.pc
2020-07-26 11:31:03 +02:00
Source2 : http://dist.schmorp.de/%{name} /Attic/%{name} -%{version} .tar.gz.sig
Source3 : http://dist.schmorp.de/signing-key.pub
2015-07-29 12:05:00 +02:00
Source99 : baselibs.conf
2013-04-16 11:34:32 +02:00
Patch0 : libev-4.15_compiler_warnings.patch
2020-07-26 11:31:03 +02:00
Patch1 : libev-4.33-nonvoid-return.patch
2012-08-08 11:11:32 +02:00
BuildRequires : pkgconfig
2020-07-26 11:31:03 +02:00
%if 0%{?sle_version} >= 150200 || 0%{?suse_version} > 1500
BuildRequires : signify
%endif
2012-08-08 11:11:32 +02:00
2011-02-15 17:34:50 +01:00
%description
2017-10-08 10:29:24 +02:00
An event loop that is loosely modeled after libevent.
2011-02-15 17:34:50 +01:00
%package -n %{library_name}
2017-10-08 10:29:24 +02:00
Summary : An event loop library
Group : System/Libraries
2012-08-08 11:11:32 +02:00
2011-02-15 17:34:50 +01:00
%description -n %{library_name}
2017-10-08 10:29:24 +02:00
An event loop that is loosely modeled after libevent. Features
include child/PID watchers, periodic timers based on wallclock
(absolute) time (in addition to timers using relative timeouts), as
well as epoll/kqueue/event ports/inotify/eventfd/signalfd support,
timer management, time jump detection and correction.
2011-02-15 17:34:50 +01:00
This package holds the shared libraries of libev.
%package devel
Summary : Development files for libev
2012-08-08 11:11:32 +02:00
Group : Development/Libraries/C and C++
Requires : %{library_name} = %{version}
2011-02-15 17:34:50 +01:00
%description devel
2017-10-08 10:29:24 +02:00
An event loop that is loosely modeled after libevent. Features
include child/PID watchers, periodic timers based on wallclock
(absolute) time (in addition to timers using relative timeouts), as
well as epoll/kqueue/event ports/inotify/eventfd/signalfd support,
timer management, time jump detection and correction.
It can be used as a libevent replacement using its emulation API, or
directly embedded into programs. An optional Perl interface is
available.
2011-02-15 17:34:50 +01:00
This package holds the development files for libev.
%prep
2020-07-26 11:31:03 +02:00
%if 0%{?sle_version} >= 150200 || 0%{?suse_version} > 1500
signify -V -p %{SOURCE3} -m %{SOURCE0}
%endif
2012-08-08 11:11:32 +02:00
%setup -q
%patch0
2020-07-26 11:31:03 +02:00
%patch1 -p1
2011-02-15 17:34:50 +01:00
%build
2012-08-08 11:11:32 +02:00
CFLAGS=" %{optflags} - f n o - s t r i c t - a l i a s i n g - W n o - u n u s e d "
2013-04-16 11:34:32 +02:00
%configure \
--docdir=%{_docdir} \
--disable-static
2012-08-08 11:11:32 +02:00
make %{?_smp_mflags}
2011-02-15 17:34:50 +01:00
%check
2017-08-02 15:34:24 +02:00
make %{?_smp_mflags} check
2011-02-15 17:34:50 +01:00
%install
2017-08-02 15:34:24 +02:00
%make_install
2011-02-15 17:34:50 +01:00
2012-08-08 11:11:32 +02:00
rm -v %{buildroot} %{_libdir} /libev.la
mkdir -p %{buildroot} %{_libdir} /pkgconfig
2019-07-18 06:19:20 +02:00
sed -i 's;@prefix@;%{_prefix};' %{SOURCE1}
sed -i 's;@lib_suffix@;%{_lib};' %{SOURCE1}
sed -i 's;@VERSION@;%{version};' %{SOURCE1}
2012-08-08 11:11:32 +02:00
cp %{SOURCE1} %{buildroot} %{_libdir} /pkgconfig/libev.pc
2011-02-15 17:34:50 +01:00
%post -n %{library_name} -p /sbin/ldconfig
%postun -n %{library_name} -p /sbin/ldconfig
%files devel
2020-07-26 11:31:03 +02:00
%license LICENSE
%doc README ev.pod Changes
2011-02-15 17:34:50 +01:00
%{_includedir} /ev++.h
%{_includedir} /ev.h
%{_includedir} /event.h
%{_libdir} /libev.so
2020-07-26 11:31:03 +02:00
%{_mandir} /man3/ev.3%{?ext_man}
2011-02-15 17:34:50 +01:00
%{_libdir} /pkgconfig/libev.pc
%files -n %{library_name}
%{_libdir} /libev.so.4*
%changelog