File libofetion.spec of Package libofetion

#
# spec file for package libofetion
#
# 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:           libofetion
Version:        2.2.2
Release:        1
License:        SUSE-GPL-2.0+-with-openssl-exception
Summary:        Library implementing the Fetion protocol
Url:            http://code.google.com/p/ofetion/
Group:          System/Libraries
Source0:        http://ofetion.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(sqlite3)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Fetion is an IM provided by China Mobile, with features like text chat,
voice call, file sharing, etc.

This library provides support for the Fetion protocol.

%package -n libofetion1
License:        SUSE-GPL-2.0+-with-openssl-exception
Summary:        Library implementing the Fetion protocol -- Development Files
Group:          System/Libraries

%description -n libofetion1
Fetion is an IM provided by China Mobile, with features like text chat,
voice call, file sharing, etc.

This library provides support for the Fetion protocol.

%package devel
Summary:        Library implementing the Fetion protocol
Group:          Development/Libraries/C and C++
Requires:       libofetion1 = %{version}

%description devel
Fetion is an IM provided by China Mobile, with features like text chat,
voice call, file sharing, etc.

This library provides support for the Fetion protocol.

%prep
%setup -q

%build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
      -DLIB_INSTALL_DIR=%{_libdir} \
      -DCMAKE_BUILD_TYPE=release ..
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} -C build install
rm %{buildroot}%{_libdir}/libofetion.a

%post -n libofetion1 -p /sbin/ldconfig

%postun -n libofetion1 -p /sbin/ldconfig

%files -n libofetion1
%defattr(-,root,root)
%doc AUTHORS COPYING LICENSE License.OpenSSL README
%{_datadir}/libofetion1/
%{_libdir}/libofetion.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/libofetion/
%{_libdir}/libofetion.so
%{_libdir}/pkgconfig/ofetion.pc

%changelog
openSUSE Build Service is sponsored by