Summary:       A front end for testing other programs.
Summary(ja):   各種プログラムをテストするためのフロントエンド
Name:          dejagnu
Version:       1.4.4
Release:       2%{?_dist_release}
Epoch:         1

Group:         Development/Tools
License:       GPLv2

Source:        ftp://ftp.gnu.org/gnu/dejagnu/dejagnu-%{version}.tar.gz
Source2:       dejagnu.texi
Patch1:        dejagnu-1.4.4-smp-1.patch
Patch3:        dejagnu-1.4.4-testsuite.patch
Patch4:        dejagnu-1.4.4-runtest.patch

Requires:      tcl >= 8.0, expect >= 5.21
BuildRoot:     %{_tmppath}/%{name}-%{version}-root
BuildArch:     noarch
BuildRequires: jadetex docbook-utils-pdf
BuildRequires: texinfo

Vendor:       Project Vine
Distribution: Vine Linux
Packager:     MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>


%description
DejaGnu is an Expect/Tcl based framework for testing other programs.
DejaGnu has several purposes: to make it easy to write tests for any
program; to allow you to write tests which will be portable to any
host or target where a program must be tested; and to standardize the
output format of all tests (making it easier to integrate the testing
into software development).


%prep
%setup -q -n dejagnu-%{version}
find . -name \*.rej -exec rm {} \;
%patch1 -p1
%patch3 -p1
%patch4 -p1


%build
%configure -v
makeinfo %{SOURCE2} -o doc/%{name}.info

make
mv doc/html doc/overview
echo ============TESTING===============
LANG=C make -k check RUNTESTFLAGS="RUNTEST=`pwd`/runtest" || :
echo ============END TESTING===========


%install
rm -rf $RPM_BUILD_ROOT
%makeinstall 
chmod a-x $RPM_BUILD_ROOT/%{_datadir}/dejagnu/runtest.exp

pushd doc
make man1dir=%{buildroot}%{_mandir}/man1 install-man
install -D -m 644 dejagnu.info ${RPM_BUILD_ROOT}/%{_infodir}/%{name}.info
popd

mv $RPM_BUILD_ROOT%{_libexecdir}/config.guess $RPM_BUILD_ROOT%{_datadir}/dejagnu                                                                                
rm -rf $RPM_BUILD_ROOT%{_libexecdir}


%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/install-info %{_infodir}/%{name}.info.gz --dir-file=%{_infodir}/dir ||:


%preun
if [ $1 = 0 ]; then
    /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir ||:
fi


%files
%defattr(-,root,root)
%doc COPYING NEWS README AUTHORS INSTALL ChangeLog doc/overview.pdf
%{_bindir}/runtest
%{_datadir}/dejagnu
%{_includedir}/dejagnu.h
%{_mandir}/*/*
%{_infodir}/*

 
%changelog
* Sun May 22 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.4.4-2
- rebuilt with current VineSeed
- added BR: texinfo

* Fri Sep 26 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.4.4-1
- new versioning policy; spec in UTF-8
- add Source2, Patch3 and Patch4 from Fedora 1.4.4-13

* Sun Mar 06 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.4.4-0vl3
- rebuilt with gcc-4.1.x
- imported Patch1 from FC 1.4.4-5

* Sat May 20 2006 NAKAMURA Kenta <kenta@vinelinux.org> 1.4.4-0vl2
- use License instead of Copyright

* Tue Mar 08 2005 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.4.4-0vl1
- updated to 1.4.4

* Sun May 09 2004 Satoshi MACHINO <machino@vinelinux.org> 1.4.2-6vl2
- moved %%{_libexecdir}/config.guess into %%{_datadir}/dejagnu
- included overview docs
- added BuildRequires

* Sun Nov 10 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.4.2-6vl1
- based on 1.4.2-6 from Rawhide and built for Vine Linux

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Apr 29 2002 Jakub Jelinek <jakub@redhat.com> 1.4.2-4
- fix makefile style variable passing (#63984)

* Thu Feb 28 2002 Jakub Jelinek <jakub@redhat.com> 1.4.2-3
- rebuild

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Wed Nov 28 2001 Jakub Jelinek <jakub@redhat.com> 1.4.2-1
- update to 1.4.2, mainly so that it can be built with gcc3+

* Fri Sep  7 2001 Jakub Jelinek <jakub@redhat.com> 1.4.1-3
- make it noarch again

* Wed Aug 29 2001 Jakub Jelinek <jakub@redhat.com>
- fix a typo (#52404)

* Thu Jun 28 2001 Tim Powers <timp@redhat.com>
- rebuilt for the distro

* Tue Feb 27 2001 Tim Powers <timp@redhat.com>
- minor modifications to the spec file. Built for Powertools.
- added Epoch

* Wed Feb 21 2001 Rob Savoye <rob@welcomehome.org>
- Fixed Requires line, and changed the URL to the new ftp site.

* Sun Oct 31 1999 Rob Savoye <rob@welcomehome.org>
- updated to the latest snapshot
- added doc files
- added the site.exp config file

* Mon Jul 12 1999 Tim Powers <timp@redhat.com>
- updated to 19990628
- updated patches as needed
- added %defattr in files section

* Wed Mar 10 1999 Jeff Johnson <jbj@redhat.com>
- add alpha expect patch (#989)
- use %configure

* Thu Dec 17 1998 Jeff Johnson <jbj@redhat.com>
- Update to 19981215.

* Thu Nov 12 1998 Jeff Johnson <jbj@redhat.com>
- Update to 1998-10-29.

* Wed Jul  8 1998 Jeff Johnson <jbj@redhat.com>
- Update to 1998-05-28.

* Sun Feb  1 1998 Jeff Johnson <jbj@jbj.org>
- Create.
 
