blob: 4be109cc94e1b2a78015a9c25b25eff712061ddd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
%define name scm
%define version 5d6
%define release 1
%define implpath %{prefix}/lib/scm
# rpm seems to require all on one line, bleah.
%define features cautious bignums arrays inexact dump dynamic-linking macro engineering-notation
Name: %{name}
Release: %{release}
Version: %{version}
Packager: Radey Shouman <shouman@ne.mediaone.net>
Copyright: GPL
Vendor: Aubrey Jaffer <agj @ alum.mit.edu>
Group: Development/Languages
Provides: scm
Requires: slib
Summary: SCM Scheme implementation.
Source: ftp://swissnet.ai.mit.edu/pub/scm/scm%{version}.zip
URL: http://swissnet.ai.mit.edu/~jaffer/SCM.html
BuildRoot: %{_tmppath}/%{name}%{version}
Prefix: /usr
%description
Scm conforms to Revised^5 Report on the Algorithmic Language Scheme and
the IEEE P1178 specification. Scm provides a machine independent
platform for JACAL, a symbolic algebra system.
This distribution requires libdl.so from the glibc-devel package and the
slib Scheme library package. If your machine lacks XFree86 or readline,
install with --nodeps.
%define __os_install_post /usr/lib/rpm/brp-compress
%prep
rm -rf /var/tmp/%{name}%{version}
%setup -n scm -c -T
cd ..
unzip $RPM_SOURCE_DIR/scm%{version}.zip
%build
# SLIB is required to build SCM.
if [ -n "$SCHEME_LIBRARY_PATH" ]; then
echo using SLIB $SCHEME_LIBRARY_PATH
elif [ -d /usr/share/slib ]; then
export SCHEME_LIBRARY_PATH=/usr/share/slib/
elif [ -d /usr/lib/slib ]; then
export SCHEME_LIBRARY_PATH=/usr/lib/slib/
fi
make scmlit
make clean
export PATH=.:$PATH # to get scmlit in the path.
# Build the executable.
./build -h system -o udscm5 -l debug -s %{implpath} -F %{features}
echo "(quit)" | ./udscm5 -no-init-file -r5 -o scm
make check
# Build dlls
make x.so
./build -h system -F curses -t dll
./build -h system -t dll -c sc2.c rgx.c record.c gsubr.c ioext.c posix.c \
unix.c socket.c ramap.c
./build -h system -F edit-line -t dll
./build -h system -F x -t dll
# Build libscm.a static library
./build -h system -F cautious bignums arrays inexact dynamic-linking -t lib
%install
mkdir -p ${RPM_BUILD_ROOT}%{prefix}/bin
mkdir -p ${RPM_BUILD_ROOT}%{prefix}/lib/scm
mkdir -p ${RPM_BUILD_ROOT}%{prefix}/man/man1
make prefix=${RPM_BUILD_ROOT}%{prefix}/ install
make prefix=${RPM_BUILD_ROOT}%{prefix}/ installlib
rm -f ${RPM_BUILD_ROOT}%{prefix}/bin/scm
cp udscm5 ${RPM_BUILD_ROOT}%{prefix}/bin/
# Assume SLIB is in /usr/share/slib, as installed by the slib rpm.
cat > ${RPM_BUILD_ROOT}%{prefix}/lib/scm/require.scm <<EOF
(set! library-vicinity (lambda () "%{prefix}/share/slib/"))
EOF
mkdir -p ${RPM_BUILD_ROOT}%{prefix}/info/
gzip *.info
cp *.info.gz ${RPM_BUILD_ROOT}%{prefix}/info/
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/install-info /usr/info/scm.info.gz /usr/info/dir
/sbin/install-info /usr/info/hobbit.info.gz /usr/info/dir
/sbin/install-info /usr/info/Xlibscm.info.gz /usr/info/dir
echo "(quit)" | %{prefix}/bin/udscm5 -no-init-file -r5 -o %{prefix}/bin/scm
ln -s %{prefix}/bin/scm /usr/local/bin/scm
ln -s %{prefix}/lib/scm /usr/local/lib/
/usr/bin/scm -c "(require 'new-catalog)"
%verifyscript
cp -f %{prefix}/lib/scm/r4rstest.scm /tmp/
(cd /tmp
%{prefix}/bin/scm -fr4rstest.scm -e'(test-sc4)(test-cont)(test-delay)(gc)')
%preun
rm -f %{prefix}/lib/scm/slibcat %{prefix}/lib/scm/implcat
if [ -L /usr/local/bin/scm ] && \
ls -l /usr/local/bin/scm | grep -q "> %{prefix}/bin/scm"; then
rm -f /usr/local/bin/scm
fi
if [ -L /usr/local/lib/scm ] && \
ls -l /usr/local/lib/scm | grep -q "> %{prefix}/lib/scm"; then
rm -f /usr/local/lib/scm
fi
rm -f %{prefix}/bin/scm
%files
%defattr(-, root, root)
%{prefix}/bin/scmlit
%{prefix}/bin/udscm5
%dir %{prefix}/lib/scm
# No wildcards here because we need to segregate files by package.
%{prefix}/lib/scm/crs.so
%{prefix}/lib/scm/gsubr.so
%{prefix}/lib/scm/posix.so
%{prefix}/lib/scm/record.so
%{prefix}/lib/scm/sc2.so
%{prefix}/lib/scm/unix.so
%{prefix}/lib/scm/ioext.so
%{prefix}/lib/scm/ramap.so
%{prefix}/lib/scm/socket.so
%{prefix}/lib/scm/rgx.so
%{prefix}/lib/scm/Init%{version}.scm
%{prefix}/lib/scm/require.scm
%{prefix}/lib/scm/Macexp.scm
%{prefix}/lib/scm/Macro.scm
%{prefix}/lib/scm/Tscript.scm
%{prefix}/lib/scm/Transcen.scm
%{prefix}/lib/scm/mkimpcat.scm
%{prefix}/lib/scm/Link.scm
%{prefix}/lib/scm/compile.scm
%{prefix}/lib/scm/hobbit.scm
%{prefix}/lib/scm/scmhob.scm
%{prefix}/lib/scm/scmhob.h
%{prefix}/lib/scm/build.scm
%{prefix}/lib/scm/build
%{prefix}/lib/scm/Iedline.scm
%{prefix}/lib/scm/edline.so
%{prefix}/lib/scm/x.so
%{prefix}/lib/scm/xevent.scm
%{prefix}/lib/scm/xatoms.scm
%{prefix}/lib/scm/x11.scm
%{prefix}/lib/scm/keysymdef.scm
%{prefix}/lib/scm/r4rstest.scm
/usr/info/Xlibscm.info.gz
/usr/info/hobbit.info.gz
/usr/info/scm.info.gz
/usr/man/man1/scm.1.gz
%{prefix}/lib/libscm.a
%{prefix}/include/scm.h
%{prefix}/include/scmfig.h
%{prefix}/include/scmflags.h
%doc ANNOUNCE COPYING QUICKREF README ChangeLog
%changelog
|