|
| 1 | +Name: libevent2 |
| 2 | +Version: 2.0.21 |
| 3 | +Release: 1 |
| 4 | +License: BSD-3-Clause |
| 5 | +Group: Development/Libraries/C and C++ |
| 6 | +URL: http://libevent.org/ |
| 7 | +Summary: An event notification library |
| 8 | + |
| 9 | +Source: %name-%version.tar.gz |
| 10 | + |
| 11 | +Prefix: %_prefix |
| 12 | +BuildRoot: %{_tmppath}/%name-%version-root |
| 13 | + |
| 14 | +BuildRequires: libtool automake autoconf |
| 15 | + |
| 16 | +%description |
| 17 | +The libevent API provides a mechanism to execute a callback function when |
| 18 | +a specific event occurs on a file descriptor or after a timeout has been |
| 19 | +reached. Furthermore, libevent also support callbacks due to signals or regular |
| 20 | +timeouts. |
| 21 | + |
| 22 | +libevent is meant to replace the event loop found in event driven network |
| 23 | +servers. An application just needs to call event_dispatch() and then add or |
| 24 | +remove events dynamically without having to change the event loop. |
| 25 | + |
| 26 | +Currently, libevent supports /dev/poll, kqueue(2), event ports, select(2), |
| 27 | +poll(2) and epoll(4). The internal event mechanism is completely independent of |
| 28 | +the exposed event API, and a simple update of libevent can provide new |
| 29 | +functionality without having to redesign the applications. As a result, Libevent |
| 30 | +allows for portable application development and provides the most scalable event |
| 31 | +notification mechanism available on an operating system. Libevent can also be |
| 32 | +used for multi-threaded applications; see Steven Grimm's explanation. Libevent |
| 33 | +should compile on Linux, *BSD, Mac OS X, Solaris and Windows. |
| 34 | + |
| 35 | +%package -n libevent2-devel |
| 36 | +Group: Development/Languages/C and C++ |
| 37 | +Summary: Development files for %{name} |
| 38 | +Requires: %{name} = %{version} |
| 39 | +Provides: pkgconfig(libevent) |
| 40 | + |
| 41 | +%description -n libevent2-devel |
| 42 | +Development files for %{name} |
| 43 | + |
| 44 | +# Preparation step (unpackung and patching if necessary) |
| 45 | +%prep |
| 46 | +%setup -q |
| 47 | + |
| 48 | +%build |
| 49 | +./autogen.sh |
| 50 | +%configure --includedir=%{_includedir}/libevent2 --bindir=%{_bindir} --libdir=%{_libdir} \ |
| 51 | + --disable-static |
| 52 | +%__make %{?_smp_mflags} |
| 53 | + |
| 54 | +%install |
| 55 | +%__make install DESTDIR=%{buildroot} |
| 56 | + |
| 57 | +%clean |
| 58 | +[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
| 59 | + |
| 60 | +%post -p /sbin/ldconfig |
| 61 | + |
| 62 | +%postun -p /sbin/ldconfig |
| 63 | + |
| 64 | +%changelog |
| 65 | + |
| 66 | +%files |
| 67 | +%defattr(-,root,root) |
| 68 | +%doc LICENSE README |
| 69 | +%{_libdir}/libevent*.so.* |
| 70 | + |
| 71 | +# Development stuff |
| 72 | +%files -n libevent2-devel |
| 73 | +%defattr(-,root,root) |
| 74 | +%{_bindir}/event2_rpcgen.py |
| 75 | +%{_libdir}/pkgconfig/*.pc |
| 76 | +%{_includedir}/libevent2/*.h |
| 77 | +%{_includedir}/libevent2/event2/ |
| 78 | +%{_libdir}/libevent*.so |
| 79 | +%exclude %{_libdir}/libevent*.la |
0 commit comments