Ticket #8316: install

File install, 5.8 KB (added by mpatel, 12 years ago)

Updated spkg/install. Based on #8306.

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
108ICONV=`$newest iconv`
109export ICONV
110
111#############
112# This is all for GNUtls crypto
113LIBGCRYPT=`$newest libgcrypt`
114export LIBGCRYPT
115
116OPENCDK=`$newest opencdk`
117export OPENCDK
118
119GNUTLS=`$newest gnutls`
120export GNUTLS
121
122LIBGPG_ERROR=`$newest libgpg_error`
123export LIBGPG_ERROR
124
125PYGMENTS=`$newest pygments`
126export PYGMENTS
127
128PYTHON_GNUTLS=`$newest python_gnutls`
129export PYTHON_GNUTLS
130############# end gnutls crypto
131
132PIL=`$newest pil`
133export PIL
134
135LIBM4RI=`$newest libm4ri`
136export LIBM4RI
137
138FORTRAN=`$newest fortran`
139export FORTRAN
140
141FPLLL=`$newest libfplll`
142export FPLLL
143
144FREETYPE=`$newest freetype`
145export FREETYPE
146
147GAP=`$newest gap`
148export GAP
149
150G2RED=`$newest genus2reduction`
151export G2RED
152
153GD=`$newest gd`
154export GD
155
156GDMODULE=`$newest gdmodule`
157export GDMODULE
158
159GFAN=`$newest gfan`
160export GFAN
161
162GIVARO=`$newest givaro`
163export GIVARO
164
165GHMM=`$newest ghmm`
166export GHMM
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
195JINJA2=`$newest jinja2` 
196export JINJA2
197
198MATPLOTLIB=`$newest matplotlib`
199export MATPLOTLIB
200
201MAXIMA=`$newest maxima`
202export MAXIMA
203
204MERCURIAL=`$newest mercurial`
205export MERCURIAL
206
207MPFI=`$newest mpfi`
208export MPFI
209
210MOIN=`$newest moin`
211export MOIN
212
213MPFR=`$newest mpfr`
214export MPFR
215
216MPMATH=`$newest mpmath`
217export MPMATH
218
219NETWORKX=`$newest networkx`
220export NETWORKX
221
222NUMPY=`$newest numpy`
223export NUMPY
224
225NTL=`$newest ntl`
226export NTL
227
228#OPENSSL=`$newest openssl`
229#export OPENSSL
230
231#PYOPENSSL=`$newest pyopenssl`
232#export PYOPENSSL
233
234PALP=`$newest palp`
235export PALP
236
237PARI=`$newest pari`
238export PARI
239
240PEXPECT=`$newest pexpect`
241export PEXPECT
242
243POLYBORI=`$newest polybori`
244export POLYBORI
245
246PYNAC=`$newest pynac`
247export PYNAC
248
249CYTHON=`$newest cython`
250export CYTHON
251
252RATPOINTS=`$newest ratpoints`
253export RATPOINTS
254
255SAGENB=`$newest sagenb`
256export SAGENB
257
258SAGETEX=`$newest sagetex`
259export SAGETEX
260
261SPHINX=`$newest sphinx`
262export SPHINX
263
264SQLALCHEMY=`$newest sqlalchemy`
265export SQLALCHEMY
266
267SQLITE=`$newest sqlite`
268export SQLITE
269
270FLINTQS=`$newest flintqs`
271export FLINTQS
272
273FLINT=`$newest flint`
274export FLINT
275
276POLYTOPES_DB=`$newest polytopes_db`
277export POLYTOPES_DB
278
279PYCRYPTO=`$newest pycrypto`
280export PYCRYPTO
281
282PYTHON=`$newest python`
283export PYTHON
284
285R=`$newest r`
286export R
287
288READLINE=`$newest readline`
289export READLINE
290
291RUBIKS=`$newest rubiks`
292export RUBIKS
293
294SAGE=`$newest sage`
295export SAGE
296
297SAGE_SCRIPTS=`$newest sage_scripts`
298export SAGE_SCRIPTS
299
300SCIPY=`$newest scipy`
301export SCIPY
302
303SCIPY_SANDBOX=`$newest scipy_sandbox`
304export SCIPY_SANDBOX
305
306TACHYON=`$newest tachyon`
307export TACHYON
308
309TWISTED=`$newest twisted`
310export TWISTED
311
312SCONS=`$newest scons`
313export SCONS
314
315SETUPTOOLS=`$newest setuptools`
316export SETUPTOOLS
317
318SINGULAR=`$newest singular`
319export SINGULAR
320
321SYMPOW=`$newest sympow`
322export SYMPOW
323
324SYMPY=`$newest sympy`
325export SYMPY
326
327SYMMETRICA=`$newest symmetrica`
328export SYMMETRICA
329
330TERMCAP=`$newest termcap`
331export TERMCAP
332
333WEAVE=`$newest weave`
334export WEAVE
335
336ZLIB=`$newest zlib`
337export ZLIB
338
339ZODB=`$newest zodb3`
340export ZODB
341
342ZNPOLY=`$newest zn_poly`
343export ZNPOLY
344
345########
346# NOW do the actual build
347if [ "$SAGE_PARALLEL_SPKG_BUILD" = "yes" ] && [ -n "$MAKE" ]; then
348    time $MAKE -f standard/deps $1
349else
350    time make -f standard/deps $1
351fi
352
353# added by Burcin Erocal, see trac #6295.
354if [ $? -ne 0 ]; then
355    echo "Error building Sage."
356    exit 1
357fi
358
359if [ "$1" = "all" -a $? = 0 ]; then
360    echo "To install gap, gp, singular, etc., scripts"
361    echo "in a standard bin directory, start sage and"
362    echo "type something like"
363    echo "   sage: install_scripts('/usr/local/bin')"
364    echo "at the Sage command prompt."
365    echo ""
366    echo "To build the documentation, run"
367    echo "   make doc"
368    echo ""
369    echo "Sage build/upgrade complete!"
370fi