File libircclient.spec of Package libircclient

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


Name:           libircclient
%define soname 1
Version:        1.6
Release:        0
Summary:        Library implementing client-server IRC protocol
License:        LGPL-2.0+
Group:          System/Libraries
Url:            http://libircclient.sourceforge.net/
Source0:        libircclient-%{version}.tar.bz2
Patch1:         libircclient-memory-overflow.diff
Patch2:         libircclient-make.diff
BuildRequires:  automake
%if 0%{?suse_version} > 1010
BuildRequires:  fdupes
%endif
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  libopenssl-devel
BuildRequires:  libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
It is designed to be small, fast, portable and compatible to RFC standards and most IRC clients.

%package -n %{name}%{soname}
Summary:        Library implementing client-server IRC protocol
Group:          Development/Libraries/C and C++

%description -n %{name}%{soname}
It is designed to be small, fast, portable and compatible to RFC standards and most IRC clients.

%package -n %{name}-devel
Summary:        Header files and libraries for compiling against libircclient
Group:          Development/Libraries/C and C++
Requires:       %{name}%{soname} = %{version}

%description -n %{name}-devel
It is designed to be small, fast, portable and compatible to RFC standards and most IRC clients.

%package -n %{name}-doc
Summary:        Documentation for libircclient
Group:          Development/Libraries/C and C++

%description -n %{name}-doc
It is designed to be small, fast, portable and compatible to RFC standards and most IRC clients.

%prep
%setup -q
%patch1 -p1
%patch2 -p1

%build
#autoreconf -fi
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CPPFLAGS="$CFLAGS"
%configure --enable-ipv6 --enable-openssl --enable-shared
make %{?_smp_mflags}

%install
%makeinstall
rm -f "%{buildroot}/%{_libdir}"/*.la
mkdir -p "%{buildroot}/%{_mandir}/man3";
install -pm0644 doc/man/man3/*.3 "%{buildroot}/%{_mandir}/man3/";
%if 0%{?suse_version} > 1010
%fdupes -s %{buildroot}
%endif

%post -n %{name}%{soname} -p /sbin/ldconfig

%postun -n %{name}%{soname} -p /sbin/ldconfig

%files -n %{name}%{soname}
%defattr(-,root,root)
%doc Changelog LICENSE README THANKS
%{_libdir}/libircclient.so.%{soname}

%files -n %{name}-devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/libircclient.so
%{_mandir}/man3/*

%files -n %{name}-doc
%defattr(-,root,root)
%doc doc/html examples/*.cpp examples/*.c

%changelog
openSUSE Build Service is sponsored by