Ticket #9312: install

File install, 5.9 KB (added by drkirkby, 9 years ago)

Untested $SAGE_ROOT/spkg/install file, which adds GLPK

Line 
1#!/usr/bin/env bash
2
3CUR=`pwd`
4cd ..
5SAGE_ROOT=`pwd`
6# Storing the start time of the build process. The time is stored in
7# seconds since 1970-01-01 in a hidden file called
8# "SAGE_ROOT/.BUILDSTART". See ticket #6744.
9echo `date -u "+%s"` > .BUILDSTART
10cd "$CUR"
11SAGE_LOCAL="$SAGE_ROOT/local"
12SAGE_LOGS="$SAGE_ROOT/spkg/logs"
13PATH="$SAGE_ROOT:$SAGE_LOCAL/bin:$PATH"
14PYTHONPATH="$SAGE_LOCAL"
15PKGDIR=standard
16export PATH SAGE_ROOT SAGE_LOCAL SAGE_LOGS PYTHONPATH
17
18if [ ! -f "$SAGE_LOCAL/bin/sage-spkg" ]; then
19    if [ ! -d "$SAGE_LOCAL" ]; then
20        mkdir "$SAGE_LOCAL"
21    fi
22    if [ ! -d "$SAGE_LOCAL/bin" ]; then
23        mkdir "$SAGE_LOCAL/bin"
24    fi
25    cp base/sage-* base/testcc.sh base/testcxx.sh "$SAGE_LOCAL/bin/"
26fi
27
28if [ ! -d "$SAGE_LOGS" ]; then
29    mkdir -p "$SAGE_LOGS"
30fi
31
32############
33# Setup environment variables pointing to the newest versions
34# of the base packages
35############
36newest="$PKGDIR/newest_version -base "
37
38SAGE_BZIP2=`$newest bzip2`
39export SAGE_BZIP2
40
41DIR=`$newest dir`
42export DIR
43
44PREREQ=`$newest prereq`
45export PREREQ
46
47############
48# Setup environment variables pointing to the newest versions
49# of the standard packages
50############
51newest="$PKGDIR/newest_version"
52
53ATLAS=`$newest atlas`
54export ATLAS
55
56BLAS=`$newest blas`
57export BLAS
58
59BOEHM_GC=`$newest boehm_gc`
60export BOEHM_GC
61
62BOOST_CROPPED=`$newest boost-cropped`
63export BOOST_CROPPED
64
65CEPHES=`$newest cephes`
66export CEPHES
67
68CLIQUER=`$newest cliquer`
69export CLIQUER
70
71CDDLIB=`$newest cddlib`
72export CDDLIB
73
74ECL=`$newest ecl`
75export ECL
76
77CONWAY=`$newest conway_polynomials`
78if [ $? -ne 0 ]; then
79    echo "Error determining package name using spkg/standard/newest_version script."
80    exit 1
81fi
82export CONWAY
83
84ECLIB=`$newest eclib`
85export ECLIB
86
87ELLIPTIC_CURVES=`$newest elliptic_curves`
88export ELLIPTIC_CURVES
89
90CVXOPT=`$newest cvxopt`
91export CVXOPT
92
93DOCUTILS=`$newest docutils`
94export DOCUTILS
95
96ECM=`$newest ecm`
97export ECM
98
99EXAMPLES=`$newest examples`
100export EXAMPLES
101
102EXTCODE=`$newest extcode`
103export EXTCODE
104
105F2C=`$newest f2c`
106export F2C
107
108GLPK=`$newest glpk`
109export GLPK
110
111ICONV=`$newest iconv`
112export ICONV
113
114#############
115# This is all for GNUtls crypto
116LIBGCRYPT=`$newest libgcrypt`
117export LIBGCRYPT
118
119OPENCDK=`$newest opencdk`
120export OPENCDK
121
122GNUTLS=`$newest gnutls`
123export GNUTLS
124
125LIBGPG_ERROR=`$newest libgpg_error`
126export LIBGPG_ERROR
127
128PYGMENTS=`$newest pygments`
129export PYGMENTS
130
131PYTHON_GNUTLS=`$newest python_gnutls`
132export PYTHON_GNUTLS
133############# end gnutls crypto
134
135PIL=`$newest pil`
136export PIL
137
138LIBM4RI=`$newest libm4ri`
139export LIBM4RI
140
141FORTRAN=`$newest fortran`
142export FORTRAN
143
144FPLLL=`$newest libfplll`
145export FPLLL
146
147FREETYPE=`$newest freetype`
148export FREETYPE
149
150GAP=`$newest gap`
151export GAP
152
153G2RED=`$newest genus2reduction`
154export G2RED
155
156GD=`$newest gd`
157export GD
158
159GDMODULE=`$newest gdmodule`
160export GDMODULE
161
162GFAN=`$newest gfan`
163export GFAN
164
165GIVARO=`$newest givaro`
166export GIVARO
167
168MPIR=`$newest mpir`
169export MPIR
170
171GRAPHS=`$newest graphs`
172export GRAPHS
173
174GSL=`$newest gsl`
175export GSL
176
177IPYTHON=`$newest ipython`
178export IPYTHON
179
180LAPACK=`$newest lapack`
181export LAPACK
182
183LCALC=`$newest lcalc`
184export LCALC
185
186LIBPNG=`$newest libpng`
187export LIBPNG
188
189LINBOX=`$newest linbox`
190export LINBOX
191
192IML=`$newest iml`
193export IML
194
195JINJA=`$newest jinja`
196export JINJA
197
198JINJA2=`$newest jinja2` 
199export JINJA2
200
201MATPLOTLIB=`$newest matplotlib`
202export MATPLOTLIB
203
204MAXIMA=`$newest maxima`
205export MAXIMA
206
207MERCURIAL=`$newest mercurial`
208export MERCURIAL
209
210MPFI=`$newest mpfi`
211export MPFI
212
213MOIN=`$newest moin`
214export MOIN
215
216MPFR=`$newest mpfr`
217export MPFR
218
219MPMATH=`$newest mpmath`
220export MPMATH
221
222NETWORKX=`$newest networkx`
223export NETWORKX
224
225NUMPY=`$newest numpy`
226export NUMPY
227
228NTL=`$newest ntl`
229export NTL
230
231#OPENSSL=`$newest openssl`
232#export OPENSSL
233
234#PYOPENSSL=`$newest pyopenssl`
235#export PYOPENSSL
236
237PALP=`$newest palp`
238export PALP
239
240PARI=`$newest pari`
241export PARI
242
243PEXPECT=`$newest pexpect`
244export PEXPECT
245
246POLYBORI=`$newest polybori`
247export POLYBORI
248
249PYNAC=`$newest pynac`
250export PYNAC
251
252CYTHON=`$newest cython`
253export CYTHON
254
255RATPOINTS=`$newest ratpoints`
256export RATPOINTS
257
258SAGENB=`$newest sagenb`
259export SAGENB
260
261SAGETEX=`$newest sagetex`
262export SAGETEX
263
264SPHINX=`$newest sphinx`
265export SPHINX
266
267SQLALCHEMY=`$newest sqlalchemy`
268export SQLALCHEMY
269
270SQLITE=`$newest sqlite`
271export SQLITE
272
273FLINTQS=`$newest flintqs`
274export FLINTQS
275
276FLINT=`$newest flint`
277export FLINT
278
279POLYTOPES_DB=`$newest polytopes_db`
280export POLYTOPES_DB
281
282PYCRYPTO=`$newest pycrypto`
283export PYCRYPTO
284
285PYTHON=`$newest python`
286export PYTHON
287
288R=`$newest r`
289export R
290
291READLINE=`$newest readline`
292export READLINE
293
294RUBIKS=`$newest rubiks`
295export RUBIKS
296
297SAGE=`$newest sage`
298export SAGE
299
300SAGE_SCRIPTS=`$newest sage_scripts`
301export SAGE_SCRIPTS
302
303SCIPY=`$newest scipy`
304export SCIPY
305
306SCIPY_SANDBOX=`$newest scipy_sandbox`
307export SCIPY_SANDBOX
308
309TACHYON=`$newest tachyon`
310export TACHYON
311
312TWISTED=`$newest twisted`
313export TWISTED
314
315SCONS=`$newest scons`
316export SCONS
317
318SETUPTOOLS=`$newest setuptools`
319export SETUPTOOLS
320
321SINGULAR=`$newest singular`
322export SINGULAR
323
324SYMPOW=`$newest sympow`
325export SYMPOW
326
327SYMPY=`$newest sympy`
328export SYMPY
329
330SYMMETRICA=`$newest symmetrica`
331export SYMMETRICA
332
333TERMCAP=`$newest termcap`
334export TERMCAP
335
336WEAVE=`$newest weave`
337export WEAVE
338
339ZLIB=`$newest zlib`
340export ZLIB
341
342ZODB=`$newest zodb3`
343export ZODB
344
345ZNPOLY=`$newest zn_poly`
346export ZNPOLY
347
348########
349# NOW do the actual build
350if [ "$SAGE_PARALLEL_SPKG_BUILD" = "yes" ] && [ -n "$MAKE" ]; then
351    time $MAKE -f standard/deps $1
352else
353    time make -f standard/deps $1
354fi
355
356# added by Burcin Erocal, see trac #6295.
357if [ $? -ne 0 ]; then
358    echo "Error building Sage."
359    exit 1
360fi
361
362if [ "$1" = "all" -a $? = 0 ]; then
363    echo "To install gap, gp, singular, etc., scripts"
364    echo "in a standard bin directory, start sage and"
365    echo "type something like"
366    echo "   sage: install_scripts('/usr/local/bin')"
367    echo "at the Sage command prompt."
368    echo ""
369    echo "To build the documentation, run"
370    echo "   make doc"
371    echo ""
372    echo "Sage build/upgrade complete!"
373fi