Summary: An implementation of the Scheme programming language.
Summary(ja): Scheme プログラミング言語の実装
Name: umb-scheme
Version: 3.2
Release: 30%{?_dist_release}
License: GPL
Group: Development/Languages
Source: ftp://ftp.cs.umb.edu/pub/scheme/umb-scheme-3.2.tar.gz
Source1: http://swissnet.ai.mit.edu/ftpdir/scm/slib3a1.zip
Source2: slibcat
Patch0: umb-scheme-3.2-misc.patch
Patch1: umb-scheme-3.2-texinfo.patch
Patch2: umb-scheme-3.2-config.patch
Patch3: umb-scheme-3.2-man.patch
Patch4: umb-scheme-3.2-chapter.patch
Patch5: umb-scheme-3.2-slib2c7.patch
Patch6: umb-scheme-3.2-share.patch
Patch7: umb-scheme-3.2-vi.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Prereq: /sbin/install-info
BuildPrereq: texinfo


%description
UMB Scheme is a public domain implementation of the Scheme programming
language.  Scheme is a statically scoped and properly tail-recursive
dialect of the Lisp programming language, designed with clear and
simple semantics and a minimal number of ways to form expressions.

Install the umb-scheme package if you need an implementation of the
Scheme programming language.


%prep
%setup -q -n scheme-3.2
rm -fr slib
unzip -q -o %{SOURCE1}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1

%build
make "RPM_OPT_FLAGS=$RPM_OPT_FLAGS"
makeinfo scheme.texinfo


%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_infodir},%{_datadir}/umb-scheme,%{_mandir}/man1}

install -s -m755 scheme $RPM_BUILD_ROOT%{_bindir}/umb-scheme
install -m755 scheme.1 $RPM_BUILD_ROOT%{_mandir}/man1/umb-scheme.1
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/umb-scheme/slibcat

find slib | cpio -pdm $RPM_BUILD_ROOT%{_datadir}/umb-scheme
install -m644 prelude.scheme $RPM_BUILD_ROOT%{_datadir}/umb-scheme

install -m644 scheme.info $RPM_BUILD_ROOT%{_infodir}/umb-scheme.info
gzip -9nf $RPM_BUILD_ROOT%{_infodir}/umb-scheme.info

chmod -x $RPM_BUILD_ROOT%{_mandir}/*/*


%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT


%post
/sbin/install-info %{_infodir}/umb-scheme.info.gz %{_infodir}/dir \
  --entry="* umb-scheme: (umb-scheme).                     UMB Scheme Interpreter."


%preun
if [ "$1" = 0 ]; then
    /sbin/install-info --delete %{_infodir}/umb-scheme.info.gz %{_infodir}/dir \
      --entry="* umb-scheme: (umb-scheme).                     UMB Scheme Interpreter."
fi


%files
%defattr(-,root,root)
%doc slib/ANNOUNCE slib/FAQ slib/README
%attr(0755,root,root) %{_bindir}/umb-scheme
%attr(0755,root,root) %dir %{_datadir}/umb-scheme
%attr(0644,root,root) %{_datadir}/umb-scheme/prelude.scheme
%attr(0644,root,root) %{_datadir}/umb-scheme/slibcat
%attr(0755,root,root) %dir %{_datadir}/umb-scheme/slib
%attr(0644,root,root) %{_datadir}/umb-scheme/slib/*
%{_mandir}/man1/umb-scheme.1*
%{_infodir}/umb-scheme.info.gz


%changelog
* Mon Oct 13 2008 Shu KONNO <owa@bg.wakwak.com> 3.2-30vl5
- applied new versioning policy, spec in utf-8

* Tue Oct 25 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.2-29vl2
- updated slib to 3a1
- added Prereq: and BuildPrereq:

* Thu Feb 13 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.2-29vl1
- based on 3.2-29 from Rawhide
  - Added new slib library (#76693).
  - Updated slibcat as well.
  - Fixed unset EDITOR vi location (#76692).
  - Fixed Copyright: to License:.
  - Fixed problem with read-only /usr pollution of 
    /usr/share/umb-scheme/slibcat(#52742)
  - Fixed wrong slibcat version (#40395)

* Thu Dec 28 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 3.2-17vl1
- based on 3.2-17 from Rawhide
- added Japanese summary

* Tue Dec 19 2000 Philipp Knirsch <pknirsch@redhat.de>
- rebuild

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to slib 2c8

* Sat Jun 10 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix wacky permissions in slib directory (bug #11871)

* Sun Jun  4 2000 Nalin Dahyabhai <nalin@redhat.com>
- FHS fixes
- move slib to %%{_datadir}

* Tue Feb  8 2000 Nalin Dahyabhai <nalin@redhat.com>
- update slib to version 2c7
- generate new catalog for slib and include it

* Thu Feb  3 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- remove executable bit from man page (Bug #9035)
- deal with RPM compressing man pages

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 9)

* Tue Aug 11 1998 Jeff Johnson <jbj@redhat.com>
- build root

* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Fri Oct 24 1997 Marc Ewing <marc@redhat.com>
- install-info

* Fri Jul 18 1997 Erik Troan <ewt@redhat.com>
- built against glibc
