mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 02:03:15 +02:00
* updated for new zip names
This commit is contained in:
parent
c784367dfc
commit
eab53234cd
@ -89,12 +89,21 @@ checkpath ()
|
|||||||
|
|
||||||
# Install files from binary-*.tar
|
# Install files from binary-*.tar
|
||||||
# $1 = cpu-target
|
# $1 = cpu-target
|
||||||
|
# $2 = cross prefix
|
||||||
installbinary ()
|
installbinary ()
|
||||||
{
|
{
|
||||||
BINARYTAR=binary.$1.tar
|
if [ "$2" == "" ]; then
|
||||||
|
FPCTARGET=$1
|
||||||
|
CROSSPREFIX=
|
||||||
|
else
|
||||||
|
FPCTARGET=`echo $2 | sed 's/-$//'`
|
||||||
|
CROSSPREFIX=$2
|
||||||
|
fi
|
||||||
|
|
||||||
|
BINARYTAR=${CROSSPREFIX}binary.$1.tar
|
||||||
|
|
||||||
# conversion from long to short archname for ppc<x>
|
# conversion from long to short archname for ppc<x>
|
||||||
case $1 in
|
case $FPCTARGET in
|
||||||
m68k*)
|
m68k*)
|
||||||
PPCSUFFIX=68k;;
|
PPCSUFFIX=68k;;
|
||||||
sparc*)
|
sparc*)
|
||||||
@ -110,31 +119,30 @@ installbinary ()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Install compiler/RTL. Mandatory.
|
# Install compiler/RTL. Mandatory.
|
||||||
echo Installing compiler and RTL for $1...
|
echo "Installing compiler and RTL for $FPCTARGET..."
|
||||||
unztarfromtar $BINARYTAR base${OSNAME}.tar.gz $PREFIX
|
unztarfromtar $BINARYTAR ${CROSSPREFIX}base.$1.tar.gz $PREFIX
|
||||||
|
|
||||||
# Install symlink
|
# Install symlink
|
||||||
rm -f $EXECDIR/ppc${PPCSUFFIX}
|
rm -f $EXECDIR/ppc${PPCSUFFIX}
|
||||||
ln -sf $LIBDIR/ppc${PPCSUFFIX} $EXECDIR/ppc${PPCSUFFIX}
|
ln -sf $LIBDIR/ppc${PPCSUFFIX} $EXECDIR/ppc${PPCSUFFIX}
|
||||||
|
|
||||||
echo Installing utilities...
|
echo "Installing utilities..."
|
||||||
unztarfromtar $BINARYTAR util${OSNAME}.tar.gz $PREFIX
|
unztarfromtar $BINARYTAR ${CROSSPREFIX}utils.$1.tar.gz $PREFIX
|
||||||
if yesno "Install FCL"; then
|
if yesno "Install FCL"; then
|
||||||
unztarfromtar $BINARYTAR unitsfcl${OSNAME}.tar.gz $PREFIX
|
unztarfromtar $BINARYTAR ${CROSSPREFIX}units-fcl.$1.tar.gz $PREFIX
|
||||||
fi
|
fi
|
||||||
if yesno "Install packages"; then
|
if yesno "Install packages"; then
|
||||||
listtarfiles $BINARYTAR packages units
|
listtarfiles $BINARYTAR packages units
|
||||||
for f in $packages
|
for f in $packages
|
||||||
do
|
do
|
||||||
if [ $f != unitsfcl${OSNAME}.tar.gz ]; then
|
if [ $f != ${CROSSPREFIX}units-fcl.$1.tar.gz ]; then
|
||||||
basename $f .tar.gz |\
|
p=`echo "$f" | sed -e 's+^.*units-\([^\.]*\)\..*+\1+'`
|
||||||
sed -e s/units// -e s/${OSNAME}// |\
|
echo "Installing $p"
|
||||||
xargs echo Installing
|
|
||||||
unztarfromtar $BINARYTAR $f $PREFIX
|
unztarfromtar $BINARYTAR $f $PREFIX
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
rm -f *${OSNAME}.tar.gz
|
rm -f *.$1.tar.gz
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -182,10 +190,11 @@ DOCDIR=$PREFIX/share/doc/fpc-$VERSION
|
|||||||
DEMODIR=$DOCDIR/examples
|
DEMODIR=$DOCDIR/examples
|
||||||
|
|
||||||
# Install all binary releases
|
# Install all binary releases
|
||||||
for f in binary*.tar
|
for f in *binary*.tar
|
||||||
do
|
do
|
||||||
a=`echo $f | sed "s+binary.\(.*\).tar+\1+"`
|
target=`echo $f | sed 's+^.*binary\.\(.*\)\.tar$+\1+'`
|
||||||
installbinary $a
|
cross=`echo $f | sed 's+binary\..*\.tar$++'`
|
||||||
|
installbinary $target $cross
|
||||||
done
|
done
|
||||||
|
|
||||||
echo Done.
|
echo Done.
|
||||||
@ -194,33 +203,32 @@ echo
|
|||||||
# Install the sources. Optional.
|
# Install the sources. Optional.
|
||||||
if yesno "Install sources"; then
|
if yesno "Install sources"; then
|
||||||
echo Installing sources in $SRCDIR ...
|
echo Installing sources in $SRCDIR ...
|
||||||
unztarfromtar sources.tar basesrc.tar.gz $PREFIX
|
unztarfromtar sources.tar base.source.tar.gz $PREFIX
|
||||||
if yesno "Install compiler source"; then
|
if yesno "Install compiler source"; then
|
||||||
unztarfromtar sources.tar compilersrc.tar.gz $PREFIX
|
unztarfromtar sources.tar compiler.source.tar.gz $PREFIX
|
||||||
fi
|
fi
|
||||||
if yesno "Install RTL source"; then
|
if yesno "Install RTL source"; then
|
||||||
unztarfromtar sources.tar rtlsrc.tar.gz $PREFIX
|
unztarfromtar sources.tar rtl.source.tar.gz $PREFIX
|
||||||
fi
|
fi
|
||||||
if yesno "Install FCL source"; then
|
if yesno "Install FCL source"; then
|
||||||
unztarfromtar sources.tar fclsrc.tar.gz $PREFIX
|
unztarfromtar sources.tar fcl.source.tar.gz $PREFIX
|
||||||
fi
|
fi
|
||||||
if yesno "Install IDE source"; then
|
if yesno "Install IDE source"; then
|
||||||
unztarfromtar sources.tar idesrc.tar.gz $PREFIX
|
unztarfromtar sources.tar ide.source.tar.gz $PREFIX
|
||||||
fi
|
fi
|
||||||
if yesno "Install installer source"; then
|
if yesno "Install installer source"; then
|
||||||
unztarfromtar sources.tar installersrc.tar.gz $PREFIX
|
unztarfromtar sources.tar installer.source.tar.gz $PREFIX
|
||||||
fi
|
fi
|
||||||
if yesno "Install Packages source"; then
|
if yesno "Install Packages source"; then
|
||||||
listtarfiles sources.tar packages units
|
listtarfiles sources.tar packages units
|
||||||
for f in $packages
|
for f in $packages
|
||||||
do
|
do
|
||||||
basename $f .tar.gz |\
|
p=`echo "$f" | sed -e 's+^.*units-\([^\.]*\)\..*+\1+'`
|
||||||
sed -e s/units// -e s/src// |\
|
echo "Installing sources for $p"
|
||||||
xargs echo Installing sources for
|
|
||||||
unztarfromtar sources.tar $f $PREFIX
|
unztarfromtar sources.tar $f $PREFIX
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
# rm -f *src.tar.gz
|
rm -f *.source.tar.gz
|
||||||
echo Done.
|
echo Done.
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
@ -6,6 +6,15 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Al
|
||||||
|
unset FPCDIR
|
||||||
|
|
||||||
|
# Goto the toplevel if necessary
|
||||||
|
[ -d install ] || cd ..
|
||||||
|
|
||||||
|
# Retrieve version from compiler/Makefile.fpc
|
||||||
|
VERSION=`grep '^version' compiler/Makefile.fpc | sed 's+[^=]*= *\(.*\)+\1+'`
|
||||||
|
|
||||||
# Retrieve current system info by calling FPC. We need
|
# Retrieve current system info by calling FPC. We need
|
||||||
# to use the | head -n1 to fix a bug in fpc 1.9.4 and earlier
|
# to use the | head -n1 to fix a bug in fpc 1.9.4 and earlier
|
||||||
# that uses exitcode 1 also when printing info resulting in
|
# that uses exitcode 1 also when printing info resulting in
|
||||||
@ -14,41 +23,41 @@ SOURCECPU=`fpc -iSP | head -n1`
|
|||||||
SOURCEOS=`fpc -iSO | head -n1`
|
SOURCEOS=`fpc -iSO | head -n1`
|
||||||
|
|
||||||
if [ $# -ne 0 ]; then
|
if [ $# -ne 0 ]; then
|
||||||
if [ $# -ne 2 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
echo "Usage: makepack [<cpu> <os>]"
|
echo "Usage: makepack [<cpu>-<os>]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
TARGETCPU=$1
|
TARGETCPU=`echo $1 | sed 's+\([^-]*\)-.*+\1+'`
|
||||||
TARGETOS=$2
|
TARGETOS=`echo $1 | sed 's+[^-]*-\(.*\)+\1+'`
|
||||||
else
|
else
|
||||||
TARGETCPU=$SOURCECPU
|
TARGETCPU=$SOURCECPU
|
||||||
TARGETOS=$SOURCEOS
|
TARGETOS=$SOURCEOS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FULLTARGET=$TARGETCPU-$TARGETOS
|
FULLTARGET=$TARGETCPU-$TARGETOS
|
||||||
|
FULLSOURCE=$SOURCECPU-$SOURCEOS
|
||||||
|
|
||||||
if [ "$TARGETCPU" != "$SOURCECPU" ] || [ "$TARGETOS" != "$SOURCEOS" ]; then
|
echo "FPC Source: $FULLSOURCE"
|
||||||
|
echo "FPC Target: $FULLTARGET"
|
||||||
|
|
||||||
|
if [ "$FULLTARGET" != "$FULLSOURCE" ]; then
|
||||||
CROSS="cross"
|
CROSS="cross"
|
||||||
|
CROSSPREFIX=$FULLTARGET-
|
||||||
|
else
|
||||||
|
CROSS=
|
||||||
|
CROSSPREFIX=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset FPCDIR
|
|
||||||
|
|
||||||
# Goto the toplevel if necessary
|
|
||||||
[ -d install ] || cd ..
|
|
||||||
|
|
||||||
# Build everything using the makefiles
|
# Build everything using the makefiles
|
||||||
make distclean CPU_TARGET=$TARGETCPU OS_TARGET=$TARGETOS
|
make distclean CPU_TARGET=$TARGETCPU OS_TARGET=$TARGETOS
|
||||||
make ${CROSS}zipinstall CPU_TARGET=$TARGETCPU OS_TARGET=$TARGETOS SNAPSHOT=1
|
make ${CROSS}zipinstall CPU_TARGET=$TARGETCPU OS_TARGET=$TARGETOS
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "Failed to make distribution archive."
|
echo "Failed to make distribution archive."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Retrieve version info before it gets cleaned below
|
|
||||||
VERSION=`cd compiler && ./utils/fpc -iV`
|
|
||||||
|
|
||||||
if [ "$CROSS" == "" ]; then
|
if [ "$CROSS" == "" ]; then
|
||||||
make docs
|
make makepackdocs
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "Failed to make documentation archive."
|
echo "Failed to make documentation archive."
|
||||||
exit 1
|
exit 1
|
||||||
@ -60,44 +69,46 @@ if [ "$CROSS" == "" ]; then
|
|||||||
fi
|
fi
|
||||||
make docsrc
|
make docsrc
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo Failed to make documentation source archive.
|
echo "Failed to make documentation source archive."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
make demozip
|
make demozip
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo Failed to make demo source archive.
|
echo "Failed to make demo source archive."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build filename
|
# binary.*.tar
|
||||||
if [ "$CROSS" == "" ]; then
|
BINARYTAR=${CROSSPREFIX}binary.$FULLTARGET.tar
|
||||||
TARNAME=fpc-$VERSION.$FULLTARGET.tar
|
|
||||||
else
|
|
||||||
TARNAME=fpc-$FULLTARGET-$VERSION.$SOURCECPU-$SOURCEOS.tar
|
|
||||||
fi
|
|
||||||
BINARYTAR=binary-$FULLTARGET.tar
|
|
||||||
|
|
||||||
SOURCES=`/bin/ls *src.tar.gz`
|
|
||||||
FILES=`/bin/ls *linux.tar.gz`
|
|
||||||
RELFILES="binary.$FULLTARGET.tar sources.tar demo.tar.gz docs.tar.gz install.sh"
|
|
||||||
|
|
||||||
echo "Creating $BINARYTAR"
|
echo "Creating $BINARYTAR"
|
||||||
tar cf $BINARYTAR $FILES
|
BINPACKAGES="base ide units utils"
|
||||||
|
BINFILES=
|
||||||
|
for p in $BINPACKAGES; do
|
||||||
|
BINFILES="$BINFILES ${CROSSPREFIX}$p*.$FULLSOURCE.tar.gz"
|
||||||
|
done
|
||||||
|
tar cf $BINARYTAR $BINFILES
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "Failed to create $BINARYTAR"
|
echo "Failed to create $BINARYTAR"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# sources.tar
|
||||||
echo "Creating sources.tar"
|
echo "Creating sources.tar"
|
||||||
tar cf sources.tar $SOURCES
|
tar cf sources.tar *.source.tar.gz
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "Failed to create sources.tar"
|
echo "Failed to create sources.tar"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# install.sh
|
||||||
echo "Copying install.sh"
|
echo "Copying install.sh"
|
||||||
sed s+%version%+$VERSION+ install/install.sh > install.sh
|
sed s+%version%+$VERSION+ install/install.sh > install.sh
|
||||||
chmod 755 install.sh
|
chmod 755 install.sh
|
||||||
|
|
||||||
|
# Files to be added to the .tar
|
||||||
|
RELFILES="$BINARYTAR sources.tar demo.tar.gz docs.tar.gz install.sh"
|
||||||
|
TARNAME=${CROSSPREFIX}fpc-$VERSION.$FULLSOURCE.tar
|
||||||
echo "Creating $TARNAME"
|
echo "Creating $TARNAME"
|
||||||
tar cf $TARNAME $RELFILES
|
tar cf $TARNAME $RELFILES
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user