File commoncpp2.spec of Package commoncpp2

#
# spec file for package commoncpp2
#
# Copyright (c) 2015 SUSE LINUX 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:           commoncpp2
%define lname	libcommoncpp2-1_8-0
Version:        1.8.1
Release:        0
Summary:        A GNU lirbary package for creating portable C++ programs
License:        GPL-2.0+
Group:          Development/Libraries/C and C++
Url:            https://www.gnu.org/software/commoncpp/

Source:         https://ftp.gnu.org/gnu/commoncpp/%name-%version.tar.gz
Source1:        https://ftp.gnu.org/gnu/commoncpp/%name-%version.tar.gz.sig
Source2:        %name.keyring
Patch1:         commoncpp2-overflow.patch
Patch2:         commoncpp2-applog.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Common C++ is a GNU package which offers portable "abstraction" of
system services such as threads, networks, and sockets.  Common C++
also offers individual frameworks generally useful to developing
portable C++ applications including a object persistance engine, math
libraries, threading, sockets, etc.  Common C++ is small, and highly
portable. Common C++ will support most Unix operating systems as well
as Win32, in addition to GNU/Linux.

%package -n %lname
Summary:        A GNU library package for creating portable C++ programs
Group:          System/Libraries
# Added for 13.1
Obsoletes:      commoncpp2 < %version-%release
Provides:       commoncpp2 = %version-%release

%description -n %lname
Common C++ is a GNU package which offers portable "abstraction" of
system services such as threads, networks, and sockets.  Common C++
also offers individual frameworks generally useful to developing
portable C++ applications including a object persistance engine, math
libraries, threading, sockets, etc.

%package devel
Summary:        Files for developing CommonC++ applications
Group:          Development/Libraries/C and C++
Requires:       %lname = %version
Requires:       libstdc++-devel
Requires:       zlib-devel
Provides:       CommonC++-devel = %version
Provides:       commonc++-devel < %version
Obsoletes:      CommonC++-devel = %version
Obsoletes:      commonc++-devel < %version

%description devel
This package contains include files, static libraries and some
documentation for the CommonC++ package. It is needed for developing
and compiling CommonC++ applications.

%package doc
Summary:        Documentation for GNU commoncpp
Group:          Documentation/HTML
Requires:       %name = %version
Provides:       CommonC++-doc = %version
Obsoletes:      CommonC++-doc < %version

%description doc
Common C++ is a GNU package which offers portable "abstraction" of
system services such as threads, networks, and sockets.  Common C++
also offers individual frameworks generally useful to developing
portable C++ applications including a object persistance engine, math
libraries, threading, sockets, etc.  Common C++ is small, and highly
portable. Common C++ will support most Unix operating systems as well
as Win32, in addition to GNU/Linux.

%prep
%setup -q
%patch -P 1 -P 2 -p1

%build
autoreconf -fiv
%configure --enable-shared --disable-static --with-pic
# Do not include build date in documentation
echo "HTML_TIMESTAMP = NO" >> doc/Doxyfile
# Practice has shown it does not always fly.
make -j1

%install
b="%buildroot"
mkdir -p "$b/%_mandir/man3"
make DESTDIR="$b" install %{?_smp_mflags}
install -d "$b/%_defaultdocdir/%name/html"
install -m 644 doc/html/* "$b/%_defaultdocdir/%name/html/"
install -m 644 AUTHORS COPYING COPYING.addendum NEWS README TODO ChangeLog "$b/%_defaultdocdir/%name/"
rm -f "$b/%_infodir/commoncpp2.info"*
find "$b" -type f -name "*.la" -delete -print
%fdupes %buildroot/%_prefix

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

%files -n %lname
%defattr(-,root,root)
%_libdir/libcc*-1.8.so.0*

%files devel
%defattr(-,root,root)
%_includedir/cc++
%_datadir/aclocal/ost_check2.m4
%_libdir/libcc*.so
%_bindir/ccgnu2-config
%_libdir/pkgconfig/*.pc

%files doc
%defattr(-,root,root)
%doc %_defaultdocdir/%name/

%changelog
openSUSE Build Service is sponsored by