CppUnit RPM .spec file updates

Ross Burton <[email protected]> 06 Jan 2003 15:00:49 +0000
Newsgroups gmane.comp.lib.cppunit.devel
Organization OneEighty Software Ltd.
Message-ID <[email protected]>
Hi,

We needed to build a RPM of CppUnit to distribute around the office, but
the .spec file is a little simple and does not use the groovy macros for
clever installs (thus files appear in the wrong location on RH7x/RH8).

Attached is a new .spec.in file (based on the file from cppunit-1.8.0)
which works a lot better for me. Assuming the 1.9.x changes didn't
radically re-arrange the installed files it should work fine.

Regards,
Ross
-- 
Ross Burton                     Software Engineer
OneEighty Software Ltd          Tel: +44 20 8680 8712
Cygnet House                    Fax: +44 20 8680 8453
12-14 Sydenham Road             [email protected]
Croydon, Surrey CR9 2ET, UK     http://www.180sw.com./
====================================================================
Under the Regulation of Investigatory Powers (RIP) Act 2000 together
with any and all Regulations in force pursuant to the Act OneEighty
Software Ltd reserves the right to monitor any or all incoming or
outgoing communications as provided for under the Act
cppunit.spec.in (text/plain, 1.8 KB)
%define  RELEASE 1
%define  rel     %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}

Name: @PACKAGE@
Version: @VERSION@
Release: %rel

Summary: C++ Port of JUnit Testing Framework
Copyright: LGPL
Group: Development/Libraries
Vendor: The CppUnit Project 
Packager: Bastiaan Bakker <[email protected]>
URL: http://cppunit.sourceforge.net/
Source: ftp://download.sourceforge.net/pub/sourceforge/cppunit/%{name}-%{version}.tar.gz
BuildRequires:	doxygen
BuildRequires:	libstdc++-devel
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 CppUnit
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

%build
%configure --enable-doxygen
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

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

%files
%defattr(-,root,root,755)
%doc AUTHORS BUGS COPYING NEWS README THANKS TODO ChangeLog
%attr(755,root,root) %{_bindir}/cppunit-config
%{_includedir}/cppunit
%{_datadir}/aclocal/cppunit.m4
%{_mandir}/man1/cppunit-config.1*
%attr(755,root,root) %{_libdir}/lib*.so.*
%attr(755,root,root) %{_libdir}/lib*.so
%attr(755,root,root) %{_libdir}/lib*.la
%attr(644,root,root) %{_libdir}/*.*a

%files doc
%doc doc/html/*

%changelog
* Mon Jan  6 2003 Ross Burton <[email protected]>
- Editted .spec file to use macros so it installs cleanly on RH73.