File libcppunit-1_12-0.spec of Package libcppunit-1_12-0

#
# spec file for package libcppunit-1_12-0
#
# 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:           libcppunit-1_12-0
Provides:       cppunit = 1.10.2
Obsoletes:      cppunit <= 1.10.2
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
Url:            http://sourceforge.net/projects/cppunit/
Summary:        C++ Port of the JUnit Testing Framework
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Version:        1.12.0
Release:        0
Source:         cppunit-%{version}.tar.bz2
Source1:        cppunit-devel.desktop
Patch:          cppunit.diff
Patch1:         cppunit-%{version}-quotefix.diff
Patch2:         cppunit_libdl.diff

%description
CppUnit is the C++ port of the famous JUnit framework for unit testing.
Test output is in XML for automatic testing and GUI based for
supervised tests.

%package -n libcppunit-devel
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/C and C++
Provides:       cppunit-devel = 1.10.2
Obsoletes:      cppunit-devel <= 1.10.2

%description -n libcppunit-devel
This package contains all necessary include files and libraries needed
to develop applications that require these.

%prep
%setup -q -n cppunit-%version
%patch
%patch1
%patch2 -p1
autoreconf -fi

%build
export CXXFLAGS="$RPM_OPT_FLAGS"
%configure --enable-doxygen
make %{?_smp_mflags}

%install
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
make DESTDIR=$RPM_BUILD_ROOT install
# this got also installed to %_defaultdocdir
rm -rf $RPM_BUILD_ROOT/usr/share/cppunit/html/
find $RPM_BUILD_ROOT/usr/include -type f | xargs chmod a-x
# install susehelp file
mkdir -p $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
install %SOURCE1 $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
%suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/cppunit-devel.desktop

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING 
%_libdir/libcppunit*.so.*
/usr/share/cppunit

%files -n libcppunit-devel
%defattr(-,root,root,755)
%doc NEWS README THANKS ChangeLog
/usr/bin/DllPlugInTester
/usr/bin/cppunit-config
%_libdir/libcppunit*.so
%_libdir/libcppunit*a
%_libdir/pkgconfig/cppunit.pc
/usr/share/susehelp
/usr/include/*
%_mandir/*/*
/usr/share/aclocal/cppunit.m4
%doc doc/html/*

%changelog
openSUSE Build Service is sponsored by