File libcryptopp.spec of Package libcryptopp

#
# spec file for package libcryptopp
#
# 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:           libcryptopp
Version:        5.6.1
Release:        1
%define pkg_version 561
# This needs to be bumped manually with every ABI change since there is
# no upstream interface version information. Please keep in sync with
# Debian: http://packages.debian.org/en/source/experimental/libcrypto++
%define soname      9
Summary:        Crypto++ Library
# http://www.cryptopp.com/cryptopp%{pkg_version}.zip
Source:         cryptopp%{pkg_version}.tar.bz2
Patch1:         libcryptopp-shared.patch
Url:            http://www.cryptopp.com
Group:          Development/Libraries/C and C++
License:        Public Domain
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc-c++ libstdc++-devel
BuildRequires:  gcc glibc-devel make pkgconfig

%description
Crypto++ Library is a free C++ class library of cryptographic schemes.

%package -n %{name}%{soname}

Summary:        Cryptographic Library for C++
Group:          System/Libraries

%description -n %{name}%{soname}
Crypto++ Library is a free C++ class library of cryptographic schemes.

%package -n %{name}-devel

Summary:        Cryptographic Library for C++
Group:          Development/Libraries/C and C++
Requires:       %{name}%{soname} = %{version}
# http://packman.links2linux.de/package/libcrypto++0
Conflicts:      libcrypto++0

%description -n %{name}-devel
Crypto++ Library is a free C++ class library of cryptographic schemes.

%prep
%setup -q -c "%{name}-%{version}"
%patch1

%build
%__make %{?jobs:-j%{jobs}} \
    CXXFLAGS="-DNDEBUG %{optflags} -fpic -fPIC" \
    DESTDIR="" \
    PREFIX="%{_prefix}" \
    LIB="%{_lib}" \
    CXX="%__cxx" \
    VERSION="%{soname}.0.0" \
    MAJOR="%{soname}" \
    all

%install
%__make \
    DESTDIR="%{buildroot}" \
    PREFIX="%{_prefix}" \
    LIB="%{_lib}" \
    CXX="%__cxx" \
    VERSION="%{soname}.0.0" \
    MAJOR="%{soname}" \
    install

%__rm -rf "%{buildroot}%{_bindir}"

%check
%__make test

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

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

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files -n %{name}%{soname}
%defattr(-,root,root)
%{_libdir}/libcryptopp.so.%{soname}
%{_libdir}/libcryptopp.so.%{soname}.*

%files -n %{name}-devel
%defattr(-,root,root)
%doc License.txt Readme.txt
%{_includedir}/cryptopp
%{_libdir}/libcryptopp.so
%changelog