File libsigc++12.spec of Package libsigc++12

#
# spec file for package libsigc++12
#
# Copyright (c) 2018 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/
#


%define _name libsigc++
Name:           libsigc++12
Version:        1.2.7
Release:        0
Summary:        Typesafe Signal Framework for C++
License:        LGPL-2.1-or-later
Group:          Development/Libraries/C and C++
URL:            http://libsigc.sourceforge.net/
Source:         ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/1.2/%{_name}-%{version}.tar.bz2
Patch1:         configure.in.diff
Patch4:         examples.diff
Patch5:         makefile.diff
# PATCH-FIX-UPSTREAM libsigc++12-automake1.11.patch vuntz@novell.com -- (no bug since not actively maintained upstream) Fix build with automake 1.11
Patch6:         libsigc++12-automake1.11.patch
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkgconfig

%description
This library implements a full callback system for use in widget
libraries, abstract interfaces, and general programming. It is the most
complete library of its kind with the ability to connect an abstract
callback to a class method, function, or function object. It contains
adaptor classes for connection of dissimilar callbacks and has an ease
of use unmatched by other C++ callback libraries.

%package -n libsigc-1_2-5
Summary:        Typesafe Signal Framework for C++
Group:          System/Libraries
Obsoletes:      libsigc++12 <= %{version}
Provides:       libsigc++12 = %{version}

%description -n libsigc-1_2-5
This library implements a full callback system for use in widget
libraries, abstract interfaces, and general programming. It is the most
complete library of its kind with the ability to connect an abstract
callback to a class method, function, or function object. It contains
adaptor classes for connection of dissimilar callbacks and has an ease
of use unmatched by other C++ callback libraries.

%package devel
Summary:        Typesafe Signal Framework for C++
Group:          Development/Libraries/C and C++
Requires:       libsigc-1_2-5 = %{version}
Requires:       libstdc++-devel
Requires:       pkgconfig

%description devel
This library implements a full callback system for use in widget
libraries, abstract interfaces, and general programming. It is the most
complete library of its kind with the ability to connect an abstract
callback to a class method, function, or function object. It contains
adaptor classes for connection of dissimilar callbacks and has an ease
of use unmatched by other C++ callback libraries.

%prep
%setup -q -n %{_name}-%{version}
%patch1
%patch4
%patch5
%patch6 -p1

%build
autoreconf --force --install
%configure --disable-static
make %{?_smp_mflags}

%install
%make_install
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
cp AUTHORS ChangeLog FEATURES IDEAS NEWS README TODO %{buildroot}%{_defaultdocdir}/%{name}
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}/examples
cp examples/{Makefile,*.cc,*.m4} %{buildroot}%{_defaultdocdir}/%{name}/examples
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}/tests
cp tests/{Makefile,README,*.cc} %{buildroot}%{_defaultdocdir}/%{name}/tests
find %{buildroot} -type f -name "*.la" -delete -print

%check
make %{?_smp_mflags} check

%post   -n libsigc-1_2-5 -p /sbin/ldconfig
%postun -n libsigc-1_2-5 -p /sbin/ldconfig

%files -n libsigc-1_2-5
%license COPYING
%license COPYING.LIB
%doc %dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/AUTHORS
%doc %{_defaultdocdir}/%{name}/ChangeLog
%doc %{_defaultdocdir}/%{name}/FEATURES
%doc %{_defaultdocdir}/%{name}/IDEAS
%doc %{_defaultdocdir}/%{name}/NEWS
%doc %{_defaultdocdir}/%{name}/README
%doc %{_defaultdocdir}/%{name}/TODO
%{_libdir}/*.so.*

%files devel
%doc %{_defaultdocdir}/%{name}/examples
%doc %{_defaultdocdir}/%{name}/tests
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/sigc++-1.2
%{_includedir}/*

%changelog
openSUSE Build Service is sponsored by