File libev.spec of Package libev

#
# spec file for package libev
#
# Copyright (c) 2011 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/
#

# norootforbuild


Name:           libev
Version:        4.01
Release:        1
#
License:        BSD
Group:          Development/Libraries/C and C++
#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#
Url:            http://software.schmorp.de/pkg/libev.html
Source:         http://dist.schmorp.de/%{name}/%{name}-%{version}.tar.bz2
Patch:          libev-4.00_compiler_warnings.patch
Patch1:         libev-3.9_pkg-config.patch
#
%if 0%{?suse_version} < 1000
BuildRequires:  pkgconfig
%else
BuildRequires:  pkg-config
%endif
#
Summary:        A full-featured and high-performance event loop library

%description
A full-featured and high-performance event loop that is loosely modelled after
libevent, but without its limitations and bugs. It is used, among others, in
the GNU Virtual Private Ethernet and rxvt-unicode packages.


Authors:
---------
    - Marc Lehmann
    - Emanuele Giaquinta

%define library_name libev4

%package -n %{library_name}

Group:          Development/Libraries/C and C++
#
Summary:        A full-featured and high-performance event loop library

%description -n %{library_name}
A full-featured and high-performance event loop that is loosely modelled after
libevent, but without its limitations and bugs. It is used, among others, in
the GNU Virtual Private Ethernet and rxvt-unicode packages.


This package holds the shared libraries of libev.


Authors:
---------
    - Marc Lehmann
    - Emanuele Giaquinta


%package devel
License:        BSD
Group:          Development/Libraries/C and C++
Requires:       %{library_name} = %{version}
#
Summary:        Development files for libev

%description devel
A full-featured and high-performance event loop that is loosely modelled after
libevent, but without its limitations and bugs. It is used, among others, in
the GNU Virtual Private Ethernet and rxvt-unicode packages.


This package holds the development files for libev.


Authors:
---------
    - Marc Lehmann
    - Emanuele Giaquinta


%prep
%setup
%patch
%patch1

%build
export CFLAGS="%{optflags} -fno-strict-aliasing -Wno-unused"
autoreconf -fi
%configure --disable-static
%{__make}

%check
%{__make} check

%install
%makeinstall
%{__rm} -v %{buildroot}%{_libdir}/libev.la

%clean
%{__rm} -rf %{buildroot}

%post   -n %{library_name} -p /sbin/ldconfig

%postun -n %{library_name} -p /sbin/ldconfig

%files devel
%defattr(-,root,root,-)
%doc LICENSE README ev.pod Changes
%{_includedir}/ev++.h
%{_includedir}/ev.h
%{_includedir}/event.h
%{_libdir}/libev.so
%{_mandir}/man3/ev.3*
%{_libdir}/pkgconfig/libev.pc

%files -n %{library_name}
%defattr(-,root,root,-)
%{_libdir}/libev.so.4*

%changelog
openSUSE Build Service is sponsored by