Get the package closer to what upstream intended

We used to move the header files in /usr/include/libev, whereas upstream
(and other distributions) put them in /usr/include.

This was confusing users of the library, who had to either come up with
clever tricks to build on Fedora (often as downstream changes to the
packages in Fedora) or worse, depend on the Fedora-only changes, so that
the software would not build anywhere else.

However, this means that the /usr/include/event.h file (which we used to
put in /usr/include/libev/event.h) now conflicts with the one from
libevent-devel.

To avoid making libev-devel conflict with libevent-devel (which would be
pretty terrible for users of both libraries, like the libverto
developers for example), this commit introduces a new
libev-libevent-devel subpackage just to contain this one header file, so
that only this subpackage conflicts with libevent-devel.

Given that the point of libev's event.h was to be a compatibility header
with libevent, this actually makes it easier for users to rely on it.

Finally, the pkgconfig file becomes completely unnecessary. As it was a
Fedora-specific change that libev upstream rejected several times when
it was proposed to them, this commit also drops it.

All in all, this should remove user confusion over the Fedora libev
package, and stop various upstreams from depending on Fedora-specific
changes.

Note that this should really not be pushed in Fedora <= 20 at this time,
but only to Rawhide.
This commit is contained in:
Mathieu Bridon 2013-11-26 13:24:30 +08:00
parent bb4d3cca0d
commit 160ea6a793
3 changed files with 31 additions and 11 deletions

View File

@ -4,16 +4,15 @@
Name: libev
Summary: High-performance event loop/event model with lots of features
Version: 4.15
Release: 2%{?dist}
Release: 3%{?dist}
License: BSD or GPLv2+
URL: http://software.schmorp.de/pkg/libev.html
Source0: http://dist.schmorp.de/libev/Attic/%{name}-%{version}.tar.gz
BuildRequires: autoconf automake libtool
Patch0: 0001-Add-pkgconfig-support.patch
Patch1: 0002-Modernize-the-configure.ac.patch
Patch2: 0003-Respect-the-CFLAGS-if-defined.patch
Patch0: libev-4.15-Modernize-the-configure.ac.patch
Patch1: libev-4.15-Respect-the-CFLAGS-if-defined.patch
%description
Libev is modeled (very loosely) after libevent and the Event Perl
@ -22,14 +21,25 @@ featureful. And also smaller.
%package devel
Summary: High-performance event loop/event model with lots of features
Summary: Development headers for libev
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%description devel
This package contains the development headers and libraries for libev.
%package libevent-devel
Summary: Compatibility development header with libevent for %{name}.
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
# The event.h file actually conflicts with the one from libevent-devel
Conflicts: libevent-devel
%description libevent-devel
This package contains a development header to make libev compatible with
libevent.
%package source
Summary: High-performance event loop/event model with lots of features
%if 0%{?fedora} >= 12 || 0%{?rhel} > 5
@ -45,13 +55,12 @@ This package contains the source code for libev.
%patch0 -p1
%patch1 -p1
%patch2 -p1
autoreconf -i
%build
%configure --disable-static --with-pic --includedir=%{_includedir}/%{name}
%configure --disable-static --with-pic
make %{?_smp_mflags}
@ -67,7 +76,7 @@ rm -rf %{buildroot}%{_libdir}/%{name}.la
# Make the source package
mkdir -p %{inst_srcdir}
find . -type f | grep -E '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | xargs tar cf - | (cd %{inst_srcdir} && tar xf -)
find . -type f | grep -E '.*\.(c|h|am|ac|inc|m4|h.in|man.pre|pl|txt)$' | xargs tar cf - | (cd %{inst_srcdir} && tar xf -)
install -p -m 0644 Changes ev.pod LICENSE README %{inst_srcdir}
@ -81,16 +90,27 @@ install -p -m 0644 Changes ev.pod LICENSE README %{inst_srcdir}
%{_libdir}/%{name}.so.4.0.0
%files devel
%{_includedir}/ev++.h
%{_includedir}/ev.h
%{_libdir}/%{name}.so
%{_includedir}/libev/
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man?/*
%files libevent-devel
%{_includedir}/event.h
%files source
%{source_dir}
%changelog
* Tue Nov 26 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 4.15-3
- Get the package closer to what upstream intended:
- Do not move the headers into a subfolder of /usr/include
- Make a libev-libevent-devel subpackage to contain the libevent
compatibility header, so that only this subpackage conflicts with
libevent-devel, not all of libev-devel
- Drop the pkgconfig file, as upstream rejected it several times already.
* Sun Sep 8 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 4.15-2
- Bump (koji was broken)