File libzrtpcpp2.spec of Package libzrtpcpp2

#
# spec file for package libzrtpcpp2
#
# Copyright (c) 2014 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:           libzrtpcpp2
Version:        2.3.4
Release:        0
Summary:        A ccrtp extension for ZRTP support
License:        GPL-3.0+
Group:          Development/Libraries/C and C++
Url:            http://www.gnutelephony.org/index.php/GNU_ZRTP

#Freecode-URL:	http://freecode.com/projects/libzrtpcpp
Source:         ftp://ftp.gnu.org/pub/gnu/ccrtp/libzrtpcpp-%version.tar.gz
Source2:        ftp://ftp.gnu.org/pub/gnu/ccrtp/libzrtpcpp-%version.tar.gz.sig
Source3:        %name.keyring
BuildRequires:  ccrtp-devel >= 2.0.0
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libopenssl-devel >= 0.9.8
BuildRequires:  pkgconfig
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This library is a GPL licensed extension to the GNU RTP Stack, ccrtp,
that offers compatibility with Phil Zimmermann's zrtp/Zfone voice
encryption, and which can be directly embedded into telephony
applications.

%package devel
Summary:        Headers and link library for libzrtpcpp
Group:          Development/Libraries/Other
Requires:       %name = %version
Requires:       ccrtp-devel >= 2.0.0
Conflicts:      libzrtpcpp-devel

%description devel
This package provides the header files, link libraries, and
documentation for building applications that use libzrtpcpp.

%prep
%setup -qn libzrtpcpp-%version

%build
mkdir build
cd build

cmake -DCMAKE_INSTALL_PREFIX="%_prefix" \
      -DSYSCONFDIR="%_sysconfdir" \
      -DMANDIR="%_mandir" \
      -DCMAKE_VERBOSE_MAKEFILE=TRUE \
      -DCMAKE_C_FLAGS_RELEASE:STRING="%optflags" \
      -DCMAKE_CXX_FLAGS_RELEASE:STRING="%optflags" \
%if "%_lib" == "lib64"
      -DLIB_SUFFIX=64 \
%endif
      ..

make %{?_smp_mflags} V=1

%install
cd build
make install DESTDIR="%buildroot"

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,0755)
%doc AUTHORS COPYING README.md
%_libdir/libzrtpcpp.so.2*

%files devel
%defattr(-,root,root,0755)
%_libdir/libzrtpcpp.so
%_libdir/pkgconfig/libzrtpcpp.pc
%_includedir/libzrtpcpp/

%changelog
openSUSE Build Service is sponsored by