Blob Blame History Raw
Summary:      platform independent library for scheme
Name:         slib
Version:      3a1
Release:      5
License:      SLIB
Group:        Development/Languages
BuildArch:    noarch
Source0:      ftp://swissnet.ai.mit.edu/pub/scm/slib%{version}.zip
Source1:      slibcat
URL:          http://swissnet.ai.mit.edu/~jaffer/SLIB.html
BuildRoot:    %{_tmppath}/%{name}-%{version}-root
BuildRequires: texi2html

%description
"SLIB" is a portable library for the programming language Scheme.
It provides a platform independent framework for using "packages" of
Scheme procedures and syntax.  As distributed, SLIB contains useful
packages for all Scheme implementations.  Its catalog can be
transparently extended to accomodate packages specific to a site,
implementation, user, or directory.

%prep
%setup -q -n %{name}
for i in *; do
  cp -f ${i} ${i}.orig
  sed -s "s,/usr/local/lib,%{_datadir},g" < ${i} > ${i}.orig
  sed -s "s,/usr/lib,%{_datadir},g" < ${i}.orig > ${i}
  sed -s "s,/usr/local,/usr,g" < ${i}.orig > ${i}
  rm -f ${i}.orig
done
cp -f %{SOURCE1} %{SOURCE1}.orig
sed -s "s,/usr/share,%{_datadir},g" < %{SOURCE1}.orig > %{SOURCE1}
rm -f %{SOURCE1}.orig

%build
gzip -9nf slib.info
texi2html slib.texi

%install
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/slib
cp *.scm *.init *.xyz *.txt ${RPM_BUILD_ROOT}%{_datadir}/slib
mkdir -p ${RPM_BUILD_ROOT}%{_infodir}
install -m644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/slib/slibcat
install -m644 slib.info.gz ${RPM_BUILD_ROOT}%{_infodir}

%clean
rm -rf ${RPM_BUILD_ROOT}

%preun
cd %{_datadir}/slib/
rm -f clrnamdb.scm srcdir.mk slib.image *.txi

%files
%defattr(-,root,root)
%dir %{_datadir}/slib
%doc ANNOUNCE README COPYING FAQ ChangeLog slib.html
%{_datadir}/slib/*
%{_datadir}/info/slib.info.gz

%changelog
* Thu Sep  8 2005 Jindrich Novy <jnovy@redhat.com> 3a1-5
- regenerate slibcat to remove all links to umb-scheme
  to make gnucash work with slib
- don't ship slib.spec from the upstream tarball
- replace bogus links to /usr/lib
- don't ship unneeded files in slib directory
- add slib html documentation

* Thu Sep 08 2005 Florian La Roche <laroche@redhat.com> 3a1-4
- no need to provide slib for this package

* Tue Sep  6 2005 Jindrich Novy <jnovy@redhat.com> 3a1-3
- use _datadir instead of /usr/local/lib and don't use
  /usr/local prefix (#167490)

* Wed Dec  8 2004 Jindrich Novy <jnovy@redhat.com> 3a1-2
- remove symlinks creation for guile, it's done by guile itself

* Wed Oct  6 2004 Jindrich Novy <jnovy@redhat.com> 3a1-1
- new package
- original spec file from R. J. Meier and Radey Shouman