I have run into two problems in the 1.10.2 spec file, as delivered.
1) Doesn't work on SUSE Enterprise 9 x86_64
2) does not build if doxygen not present.
3) unpackaged files
4) obsolete "Copyright" tag needs to be changed to "License" (fix for FC4 compile)
I have made a couple of adjustments to fix this. Below is the updated file:
%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 doc
Summary: HTML formatted API documention for Log for C++
Group: Development/Libraries
Requires: %name = %version
%description doc
The %name-doc package contains HTML formatted API documention generated by
the popular doxygen documentation generation tool.
make prefix=$RPM_BUILD_ROOT%{prefix} install
if [ ! -e $RPM_BUILD_ROOT%{prefix}/%{_lib} ]; then
mv $RPM_BUILD_ROOT%{prefix}/lib $RPM_BUILD_ROOT%{prefix}/%{_lib}
fi
I have run into two problems in the 1.10.2 spec file, as delivered.
1) Doesn't work on SUSE Enterprise 9 x86_64
2) does not build if doxygen not present.
3) unpackaged files
4) obsolete "Copyright" tag needs to be changed to "License" (fix for FC4 compile)
I have made a couple of adjustments to fix this. Below is the updated file:
%define RELEASE 1
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
%define _unpackaged_files_terminate_build 0
%define build_docs 0
%{?_without_docs: %{expand: %%define build_docs 0}}
%{?_with_docs: %{expand: %%define build_docs 1}}
%define lib_name cppunit
Name: cppunit
Version: 1.10.2
Release: %rel
Summary: C++ Port of JUnit Testing Framework
License: LGPL
Group: Development/Libraries
Vendor: The CppUnit Project
Packager: Bastiaan Bakker <bastiaan.bakker@lifeline.nl>
Url: http://cppunit.sourceforge.net/
Source: ftp://download.sourceforge.net/pub/sourceforge/cppunit/%name-%version.tar.gz
Prefix: %_prefix
BuildRoot: %_tmppath/%name-%version-root
%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 doc
Summary: HTML formatted API documention for Log for C++
Group: Development/Libraries
Requires: %name = %version
%description doc
The %name-doc package contains HTML formatted API documention generated by
the popular doxygen documentation generation tool.
%prep
rm -rf $RPM_BUILD_ROOT
%setup
%if %{build_docs}
ENABLE_DOXYGEN="--enable-doxygen"
%endif
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} $ENABLE_DOXYGEN
%build
make
%install
rm -rf $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT%{prefix} install
if [ ! -e $RPM_BUILD_ROOT%{prefix}/%{_lib} ]; then
mv $RPM_BUILD_ROOT%{prefix}/lib $RPM_BUILD_ROOT%{prefix}/%{_lib}
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,755)
%attr(755,root,root) %prefix/%{_lib}/lib*.so.*
%doc AUTHORS COPYING INSTALL NEWS README THANKS ChangeLog
%attr(755,root,root) %prefix/bin/cppunit-config
%prefix/include/*
%prefix/man/*
%prefix/share/*
%attr(755,root,root) %prefix/%{_lib}/lib*.so
%attr(644,root,root) %prefix/%{_lib}/*.*a
%if %{build_docs}
%files doc
%doc doc/html/*
%endif