File dejagnu.spec of Package dejagnu

# spec file for package dejagnu
# Copyright (c) 2011 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

Name:           dejagnu
License:        GPL-2.0+
BuildRequires:  automake
Group:          Development/Tools/Building
Requires:       tcl expect
Version:        1.4.4
Release:        0
Summary:        Framework for Running Test Suites on Software Tools
Source:         %{name}-%{version}.tar.bz2
Source1:        site.exp
Patch0:         %{name}-make_doc.patch
Patch4:         dejagnu-ignore-libwarning.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

DejaGnu is a framework for testing other programs.  Its purpose is to
provide a single front-end for all tests.  Beyond this, DejaGnu offers
several advantages for testing:

1. The flexibility and consistency of the DejaGnu framework make it
   easy to write tests for any program.

1. DejaGnu provides a layer of abstraction that allows you to write
   tests that are portable to any host or target where a program
   must be tested.  For instance, a test for GDB can run (from any
   Unix-based host) on any target architecture that DejaGnu

1. All tests have the same output format.  This makes it easy to
   integrate testing into other software development processes.
   DejaGnu's output is designed to be parsed by other filtering
   scripts and it is also human-readable.

DejaGnu is written in expect, which in turn uses "Tcl"--Tool command

Running tests requires two things: the testing framework and the test
suites themselves.

%setup -q -n %{name}-%{version}
%patch4 -p1
# argh, auto* requires this file
touch example/calc/ChangeLog

autoreconf -f -i
%configure --verbose
make %{?_smp_mflags}
#cd doc
#makeinfo dejagnu.texi

#install -d $RPM_BUILD_ROOT%{_defaultdocdir}/dejagnu
install -d $RPM_BUILD_ROOT%{_sysconfdir}/dejagnu
#install -d $RPM_BUILD_ROOT%{_datadir}/dejagnu
install %{S:1} $RPM_BUILD_ROOT%{_sysconfdir}/dejagnu/site.exp
ln -s -f %{_sysconfdir}/dejagnu/site.exp $RPM_BUILD_ROOT%{_datadir}/dejagnu/site.exp
# install doc
make install-doc \
    mandir=%{_mandir} \
    pkgdatadir=%{_docdir}/dejagnu \
# we currently don't want some doc...
rm -f $RPM_BUILD_ROOT%{_defaultdocdir}/dejagnu/{,dejagnu.rtf}
# add some text files
install -m 644 ChangeLog COPYING NEWS README AUTHORS TODO $RPM_BUILD_ROOT%{_defaultdocdir}/dejagnu/
# install examples
install -m 755 -d $RPM_BUILD_ROOT%{_defaultdocdir}/dejagnu/example
# examples
for exmp in calc hello ; do
    cp -r example/$exmp $RPM_BUILD_ROOT%{_defaultdocdir}/dejagnu/example/
    pushd $RPM_BUILD_ROOT%{_defaultdocdir}/dejagnu/example/$exmp;
        autoreconf -fi
        make distclean
        rm -rf *~ autom4te.cache
# info pages
#mkdir -p $RPM_BUILD_ROOT/%{_infodir}
#install -m 644 doc/* $RPM_BUILD_ROOT/%{_infodir}

%defattr(-, root, root)
%doc %{_defaultdocdir}/dejagnu
%dir %{_datadir}/dejagnu
%dir %{_sysconfdir}/dejagnu
%doc %{_mandir}/man1/*
#%doc %{_infodir}/*
%config(noreplace) %{_sysconfdir}/dejagnu/site.exp

openSUSE Build Service is sponsored by