summaryrefslogtreecommitdiffstats
path: root/slib.spec
diff options
context:
space:
mode:
Diffstat (limited to 'slib.spec')
-rw-r--r--slib.spec106
1 files changed, 60 insertions, 46 deletions
diff --git a/slib.spec b/slib.spec
index 857e25c..6c7c424 100644
--- a/slib.spec
+++ b/slib.spec
@@ -1,23 +1,18 @@
-%define name slib
-%define version 3a2
-%define release 1
-
-Name: %{name}
-Release: %{release}
-Version: %{version}
+Summary: platform independent library for scheme
+Name: slib
+Version: 3a2
+Release: 2
+Group: Development/Languages
+BuildArch: noarch
Packager: Aubrey Jaffer <agj@alum.mit.edu>
Copyright: distributable, see individual files for copyright
Vendor: Aubrey Jaffer <agj @ alum.mit.edu>
-Group: Development/Tools
Provides: slib
-BuildArch: noarch
-Summary: platform independent library for scheme
Source: ftp://swiss.csail.mit.edu/pub/scm/slib%{version}.zip
URL: http://swiss.csail.mit.edu/~jaffer/SLIB.html
-BuildRoot: %{_tmppath}/%{name}%{version}
-Prefix: /usr
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
"SLIB" is a portable library for the programming language Scheme.
@@ -27,73 +22,92 @@ packages for all Scheme implementations. Its catalog can be
transparently extended to accomodate packages specific to a site,
implementation, user, or directory.
-%define __os_install_post /usr/lib/rpm/brp-compress
-
%prep
-%setup -n slib -c -T
-cd ..
-unzip ${RPM_SOURCE_DIR}/slib%{version}.zip
+%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
%build
-gzip -f slib.info
+gzip -9nf slib.info
%install
-mkdir -p ${RPM_BUILD_ROOT}%{prefix}/lib/slib
-mkdir -p ${RPM_BUILD_ROOT}%{prefix}/bin
-cp -r *.scm *.init *.xyz saturate.txt resenecolours.txt grapheps.ps Makefile ${RPM_BUILD_ROOT}%{prefix}/lib/slib
-mkdir -p ${RPM_BUILD_ROOT}/usr/info
-cp slib.info.gz ${RPM_BUILD_ROOT}/usr/info
-
-echo '#! /bin/sh' > ${RPM_BUILD_ROOT}%{prefix}/bin/slib
-echo SCHEME_LIBRARY_PATH=%{prefix}/lib/slib/ >> ${RPM_BUILD_ROOT}%{prefix}/bin/slib
-echo export SCHEME_LIBRARY_PATH >> ${RPM_BUILD_ROOT}%{prefix}/bin/slib
-echo VERSION=%{version} >> ${RPM_BUILD_ROOT}%{prefix}/bin/slib
-echo "S48_VICINITY=\"%{prefix}/lib/scheme48\";export S48_VICINITY" >> ${RPM_BUILD_ROOT}%{prefix}/bin/slib
-cat slib.sh >> ${RPM_BUILD_ROOT}%{prefix}/bin/slib
-chmod +x ${RPM_BUILD_ROOT}%{prefix}/bin/slib
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/slib
+mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
+cp *.scm *.init *.xyz *.txt grapheps.ps Makefile ${RPM_BUILD_ROOT}%{_datadir}/slib
+mkdir -p ${RPM_BUILD_ROOT}%{_infodir}
+install -m644 slib.info.gz ${RPM_BUILD_ROOT}%{_infodir}
+
+echo '#! /bin/sh' > ${RPM_BUILD_ROOT}%{_bindir}/slib
+echo SCHEME_LIBRARY_PATH=%{_datadir}/slib/ >> ${RPM_BUILD_ROOT}%{_bindir}/slib
+echo export SCHEME_LIBRARY_PATH >> ${RPM_BUILD_ROOT}%{_bindir}/slib
+echo VERSION=%{version} >> ${RPM_BUILD_ROOT}%{_bindir}/slib
+echo "S48_VICINITY=\"%{_datadir}/scheme48\";export S48_VICINITY" >> ${RPM_BUILD_ROOT}%{_bindir}/slib
+cat slib.sh >> ${RPM_BUILD_ROOT}%{_bindir}/slib
+chmod +x ${RPM_BUILD_ROOT}%{_bindir}/slib
%clean
rm -rf ${RPM_BUILD_ROOT}
%post
-/sbin/install-info /usr/info/slib.info.gz /usr/info/dir
+# /sbin/install-info ${RPM_BUILD_ROOT}%{_infodir}/slib.info.gz %{_infodir}/dir
# This symlink is made as in the spec file of Robert J. Meier.
if [ -L /usr/share/guile/slib ]; then
rm /usr/share/guile/slib
- ln -s %{prefix}/lib/slib /usr/share/guile/slib
+ ln -s %{_datadir}/slib /usr/share/guile/slib
fi
# Rebuild catalogs for as many implementations as possible.
export PATH=$PATH:/usr/local/bin
echo PATH=${PATH}
-cd %{prefix}/lib/slib/
+cd %{_datadir}/slib/
make catalogs
+# %postun
+# if [ $1 = 0 ]; then
+# /sbin/install-info --delete %{_infodir}/slib.info.gz %{_infodir}/dir
+# fi
+
%preun
-cd %{prefix}/lib/slib/
+cd %{_datadir}/slib/
rm -f srcdir.mk slib.image
%files
%defattr(-, root, root)
-%{prefix}/bin/slib
-%dir %{prefix}/lib/slib
-%{prefix}/lib/slib/*.scm
-%{prefix}/lib/slib/*.init
-%{prefix}/lib/slib/cie1931.xyz
-%{prefix}/lib/slib/cie1964.xyz
-%{prefix}/lib/slib/saturate.txt
-%{prefix}/lib/slib/resenecolours.txt
-%{prefix}/lib/slib/grapheps.ps
-/usr/info/slib.info.gz
+%{_bindir}/slib
+%dir %{_datadir}/slib
+%{_datadir}/slib/*.scm
+%{_datadir}/slib/*.init
+%{_datadir}/slib/cie1931.xyz
+%{_datadir}/slib/cie1964.xyz
+%{_datadir}/slib/nbs-iscc.txt
+%{_datadir}/slib/saturate.txt
+%{_datadir}/slib/resenecolours.txt
+%{_datadir}/slib/grapheps.ps
+%{_infodir}/slib.info.gz
# The Makefile is included as it is useful for building documentation.
-%{prefix}/lib/slib/Makefile
+%{_datadir}/slib/Makefile
%doc ANNOUNCE README COPYING FAQ ChangeLog
%changelog
+* Sun Sep 25 2005 Aubrey Jaffer <agj@alum.mit.edu>
+- Updated from RedHat version from Jindrich Novy.
+
+* Fri Jun 22 2005 Aubrey Jaffer <agj@alum.mit.edu>
+- slib.spec (install): Make slib executable.
+
* Sat Jun 18 2004 Aubrey Jaffer <agj@alum.mit.edu>
- Fixed for RPMbuild version 4.3.1
- Make slib executable.
+* Thu Nov 03 2002 Aubrey Jaffer <agj@alum.mit.edu>
+- slib.spec (%post): Improved catalog-building scripts.
+- Make clrnamdb.scm.
+
* Wed Mar 14 2001 Radey Shouman <shouman@ne.mediaone.net>
- Adapted from the spec file of R. J. Meier.