File libmsn.spec of Package libmsn

#
# spec file for package libmsn
#
# 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:           libmsn
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  kde4-filesystem
BuildRequires:  libopenssl-devel
BuildRequires:  pkg-config
Summary:        Reusable, open-source library for MSN Messenger
License:        SUSE-GPL-2.0+-with-openssl-exception
Group:          Development/Libraries/C and C++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://sourceforge.net/projects/libmsn
Version:        4.2.1
Release:        0
Source:         http://surfnet.dl.sourceforge.net/sourceforge/libmsn/libmsn-%{version}.tar.bz2
Patch1:         gcc-warnings.diff
Patch2:         literal-string-compare.diff
Patch3:         install-xmlparser.patch
Patch4:         libmsn-gcc47.patch
Source99:       COPYING.LGPL
%define debug_package_requires libmsn0_1 = %{version}-%{release}

%description
Libmsn is a reusable, open-source, fully documented library for
connecting to Microsoft's MSN Messenger service.



%package -n libmsn0_3
Summary:        Reusable, open-source library for MSN Messenger
Group:          Development/Libraries/C and C++

%description -n libmsn0_3
Libmsn is a reusable, open-source, fully documented library for
connecting to Microsoft's MSN Messenger service.



%package devel
Summary:        Reusable, open-source library for MSN Messenger
Group:          Development/Libraries/C and C++
Requires:       libmsn0_3 = %version
Requires:       libopenssl-devel

%description devel
Libmsn is a reusable, open-source, fully documented library for
connecting to Microsoft's MSN Messenger service.



%prep
%setup -q
%patch1
%patch2
%patch3 -p1
%patch4 -p1
cp %{S:99} .

%build
export RPM_OPT_FLAGS="%optflags -fvisibility-inlines-hidden"
%cmake_kde4 -d build
%make_jobs

%install
cd build
make DESTDIR=%{buildroot} install

%post -n libmsn0_3 -p /sbin/ldconfig

%postun -n libmsn0_3 -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files -n libmsn0_3
%defattr(-,root,root)
%doc README COPYING COPYING.LGPL TODO
%{_libdir}/libmsn.so.0.*

%files devel
%defattr(-,root,root)
/usr/bin/msntest
/usr/include/msn
%{_libdir}/libmsn.so
%{_libdir}/pkgconfig/libmsn.pc

%changelog