Blame SPECS/libevent2.spec

8126c6
%global libname libevent
8126c6
8126c6
Name:           libevent2
8126c6
Version:        2.0.21
8126c6
Release:        1.1%{?dist}
8126c6
Summary:        Abstract asynchronous event notification library
8126c6
8126c6
Group:          System Environment/Libraries
8126c6
License:        BSD
8126c6
URL:            http://sourceforge.net/projects/levent/
8126c6
Source0:        http://downloads.sourceforge.net/levent/%{libname}-%{version}-stable.tar.gz
8126c6
8126c6
BuildRequires:  doxygen openssl-devel
8126c6
8126c6
Patch00: libevent-2.0.10-stable-configure.patch
8126c6
# Disable network tests
8126c6
Patch01: libevent-nonettests.patch
8126c6
8126c6
%description
8126c6
The libevent API provides a mechanism to execute a callback function
8126c6
when a specific event occurs on a file descriptor or after a timeout
8126c6
has been reached. libevent is meant to replace the asynchronous event
8126c6
loop found in event driven network servers. An application just needs
8126c6
to call event_dispatch() and can then add or remove events dynamically
8126c6
without having to change the event loop.
8126c6
8126c6
8126c6
%package devel
8126c6
Summary: Header files, libraries and development documentation for %{name}
8126c6
Group: Development/Libraries
8126c6
Requires: %{name}%{?_isa} = %{version}-%{release}
8126c6
# same headers provided by both versions.
8126c6
Conflicts: %{libname}-devel
8126c6
8126c6
%description devel
8126c6
This package contains the header files, static libraries and development
8126c6
documentation for %{name}. If you like to develop programs using %{name},
8126c6
you will need to install %{name}-devel.
8126c6
8126c6
%package doc
8126c6
Summary: Development documentation for %{name}
8126c6
Group: Development/Libraries
8126c6
Requires: %{name}-devel = %{version}-%{release}
8126c6
BuildArch: noarch
8126c6
8126c6
%description doc
8126c6
This package contains the development documentation for %{name}.
8126c6
If you like to develop programs using %{name}-devel, you will
8126c6
need to install %{name}-doc.
8126c6
8126c6
%prep
8126c6
%setup -q -n %{libname}-%{version}-stable
8126c6
8126c6
# 477685 -  libevent-devel multilib conflict
8126c6
%patch00 -p1
8126c6
%patch01 -p1 -b .nonettests
8126c6
8126c6
%build
8126c6
%configure \
8126c6
    --disable-dependency-tracking --disable-static
8126c6
make %{?_smp_mflags} all
8126c6
8126c6
# Create the docs
8126c6
make doxygen
8126c6
8126c6
%install
8126c6
rm -rf $RPM_BUILD_ROOT
8126c6
make DESTDIR=$RPM_BUILD_ROOT install
8126c6
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
8126c6
8126c6
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}-devel-%{version}/html
8126c6
(cd doxygen/html; \
8126c6
        install -p -m 644 *.* $RPM_BUILD_ROOT/%{_docdir}/%{name}-devel-%{version}/html)
8126c6
8126c6
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}-devel-%{version}/sample
8126c6
(cd sample; \
8126c6
        install -p -m 644 *.c Makefile* $RPM_BUILD_ROOT/%{_docdir}/%{name}-devel-%{version}/sample)
8126c6
8126c6
%clean
8126c6
rm -rf $RPM_BUILD_ROOT
8126c6
8126c6
%check
8126c6
make check
8126c6
8126c6
%post -p /sbin/ldconfig
8126c6
8126c6
%postun -p /sbin/ldconfig
8126c6
8126c6
%files
8126c6
%defattr(-,root,root,-)
8126c6
%doc ChangeLog LICENSE README
8126c6
%{_libdir}/libevent-*.so.*
8126c6
%{_libdir}/libevent_core-*.so.*
8126c6
%{_libdir}/libevent_extra-*.so.*
8126c6
%{_libdir}/libevent_openssl-*.so.*
8126c6
%{_libdir}/libevent_pthreads-*.so.*
8126c6
8126c6
%files devel
8126c6
%defattr(-,root,root,-)
8126c6
%{_includedir}/event.h
8126c6
%{_includedir}/evdns.h
8126c6
%{_includedir}/evhttp.h
8126c6
%{_includedir}/evrpc.h
8126c6
%{_includedir}/evutil.h
8126c6
%{_includedir}/event2/*.h
8126c6
%{_libdir}/libevent.so
8126c6
%{_libdir}/libevent_core.so
8126c6
%{_libdir}/libevent_extra.so
8126c6
%{_libdir}/libevent_openssl.so
8126c6
%{_libdir}/libevent_pthreads.so
8126c6
%{_libdir}/pkgconfig/libevent.pc
8126c6
%{_libdir}/pkgconfig/libevent_openssl.pc
8126c6
%{_libdir}/pkgconfig/libevent_pthreads.pc
8126c6
%{_bindir}/event_rpcgen.*
8126c6
8126c6
%files doc
8126c6
%defattr(-,root,root,-)
8126c6
%{_docdir}/%{name}-devel-%{version}/html/*
8126c6
%{_docdir}/%{name}-devel-%{version}/sample/*
8126c6
8126c6
%changelog
8126c6
* Wed Sep 09 2015 Paul Wouters <pwouters@redhat.com> - 2.0.21-1.1
8126c6
- Bump version to build for extras-rhel-6
8126c6
* Fri Aug 21 2015 Paul Wouters <pwouters@redhat.com> - 2.0.21-1
8126c6
- Resolves: rhbz#1242637 add libevent2 to RHEL6