3
# Free Pascal installation script for Solaris
4
# Copyright 1996-2002 Michael Van Canneyt and Peter Vreman
6
# Don't edit this file.
7
# Everything can be set when the script is run.
13
# some useful functions
14
# ask displays 1st parameter, and ask new value for variable, whose name is
15
# in the second parameter.
20
eval echo -n \""$1 [$old] : "\"
22
eval test -z \"\$$askvar\" && eval $askvar=\'$old\'
24
# yesno gives 1 on no, 0 on yes $1 gives text to display.
37
# Untar files ($3,optional) from file ($1) to the given directory ($2)
40
./gzip -d $HERE/$1.tar.gz
41
./gtar -xvf $HERE/$1.tar --directory $2 $3
44
# Make all the necessary directories to get $1
51
OLDIFS=$IFS;IFS=/;eval set $1; IFS=$OLDIFS
54
test -d $i || mkdir $i || break
60
# check to see if something is in the path
64
OLDIFS=$IFS; IFS=":";eval set $PATH;IFS=$OLDIFS
67
if [ $i = $ARG ]; then
74
# --------------------------------------------------------------------------
79
echo "This shell script will attempt to install the Free Pascal Compiler"
80
echo "version $VERSION with the items you select"
83
# Here we start the thing.
86
# Install in /usr/local or /usr ?
87
if checkpath /usr/local/bin; then
92
ask "Install prefix (/usr or /usr/local) " PREFIX
93
makedirhierarch $PREFIX
96
LIBDIR=$PREFIX/lib/fpc
97
SRCDIR=$PREFIX/src/fpc
98
DOCDIR=$PREFIX/doc/fpc
99
DEMODIR=$DOCDIR/examples
102
# Install compiler/RTL. Mandatory.
105
echo Installing compiler and RTL ...
106
unztar basesun $PREFIX
107
rm -f $EXECDIR/ppc386
108
ln -sf $LIBDIR/$VERSION/ppc386 $EXECDIR/ppc386
109
echo Installing GNU Assembler and Linker Mandatory.
110
unztar asldsun $PREFIX
111
echo Installing utilities...
112
unztar utilsun $PREFIX
113
if yesno "Install GNU Tools"; then
114
unztar makesun $PREFIX
116
if yesno "Install FCL"; then
117
unztar ufclsun $PREFIX
119
if yesno "Install Regular expression Package"; then
120
unztar uregexprsun $PREFIX
122
if yesno "Install paszlib Package"; then
123
unztar upaszlibsun $PREFIX
129
# Install the sources. Optional.
130
if yesno "Install sources"; then
133
echo Installing sources in $SRCDIR ...
134
unztar basesrc $PREFIX
135
if yesno "Install compiler source"; then
136
unztar compilersrc $PREFIX
138
if yesno "Install RTL source"; then
139
unztar rtlsrc $PREFIX
141
if yesno "Install FCL source"; then
142
unztar fclsrc $PREFIX
144
if yesno "Install paszlib source"; then
145
unztar upaszlibsrc $PREFIX
147
if yesno "Install regexpr source"; then
148
unztar uregexprsrc $PREFIX
150
if yesno "Install Utils source"; then
151
unztar utilssrc $PREFIX
158
# Install the documentation. Optional.
159
if yesno "Install documentation"; then
160
echo Installing documentation in $DOCDIR ...
161
unztar fpcdoc $PREFIX/doc
166
# Install the demos. Optional.
167
if yesno "Install demos"; then
168
ask "Install demos in" DEMODIR
169
echo Installing demos in $DEMODIR ...
170
makedirhierarch $DEMODIR
176
# Install /etc/fpc.cfg, this is done using the samplecfg script
177
$LIBDIR/$VERSION/samplecfg $LIBDIR/$VERSION
181
echo End of installation.
183
echo Refer to the documentation for more information.