Simple command line calculator https://amath.innolan.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

128 lines
3.6 KiB

#!/bin/sh
#
# Build Classic AmigaOS distribtion package
# This file is public domain
#
# Project homepage:
# https://amath.innolan.net
#
# Add compiler path before invoking. Fx:
# export PATH="/opt/m68k-amigaos/bin/:$PATH"
set -e
distdir="dist"
builddir="tmp"
bindir="bin"
stamp="202101120000"
rm -Rf ${distdir}
rm -Rf ${builddir}
mkdir -p ${builddir}
# Build binaries
./configure --disable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68000 -noixemul"
make clean
make static
mv amath ${builddir}/amath
make clean
./configure --disable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68020 -noixemul"
make static
mv amath ${builddir}/amath.020
make clean
./configure --disable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
make static
mv amath ${builddir}/amath.030
make clean
# Build test binaries
./configure --enable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68000 -noixemul"
make static
mv amath ${builddir}/amath-test
make clean
./configure --enable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68020 -noixemul"
make static
mv amath ${builddir}/amath-test.020
make clean
./configure --enable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
make static
mv amath ${builddir}/amath-test.030
make clean
# Build catalogs
make catalogs
make clean
# Build documentation
#./build/doc >${builddir}/amath.doc amath.1
groff >${builddir}/amath.html amath.1 -mandoc -Thtml
# Generate hashkeys
cd ${builddir}
touch hashkeys
sha1sum amath >>hashkeys
sha1sum amath.020 >>hashkeys
sha1sum amath.030 >>hashkeys
sha1sum amath-test >>hashkeys
sha1sum amath-test.020 >>hashkeys
sha1sum amath-test.030 >>hashkeys
sha256sum amath >>hashkeys
sha256sum amath.020 >>hashkeys
sha256sum amath.030 >>hashkeys
sha256sum amath-test >>hashkeys
sha256sum amath-test.020 >>hashkeys
sha256sum amath-test.030 >>hashkeys
cd ..
# Build distribution directory structure
mkdir -m 775 ${distdir}
mkdir -m 775 ${distdir}/amath
mkdir -m 775 ${distdir}/amath/ARexx
mkdir -m 775 ${distdir}/amath/Catalog
mkdir -m 775 ${distdir}/amath/Catalog/english
mkdir -m 775 ${distdir}/amath/Script
mkdir -m 775 ${distdir}/amath/Test
# Install icons
install -m 664 ${bindir}/root/*.info ${distdir}/
install -m 664 ${bindir}/prog/*.info ${distdir}/amath/
install -m 664 ${bindir}/catalog/*.info ${distdir}/amath/Catalog/
install -m 664 ${bindir}/script/*.info ${distdir}/amath/Script/
# Install documentation
install -m 664 HISTORY ${distdir}/amath/
install -m 664 LICENSE ${distdir}/amath/
install -m 664 ${builddir}/hashkeys ${distdir}/amath/
install -m 664 ${builddir}/amath.html ${distdir}/amath/
install -m 664 ${bindir}/amath.doc ${distdir}/amath/
install -m 664 ${bindir}/amath.readme ${distdir}/amath/
# Install scripts
install -m 755 arexx/* ${distdir}/amath/ARexx/
install -m 755 script/* ${distdir}/amath/Script/
# Install binaries
install -m 755 ${builddir}/amath ${distdir}/amath/
install -m 755 ${builddir}/amath.020 ${distdir}/amath/
install -m 755 ${builddir}/amath.030 ${distdir}/amath/
install -m 755 ${builddir}/amath-test ${distdir}/amath/Test/
install -m 755 ${builddir}/amath-test.020 ${distdir}/amath/Test/
install -m 755 ${builddir}/amath-test.030 ${distdir}/amath/Test/
# Install catalogs
install -m 755 distcat/catalog/english/*.catalog ${distdir}/amath/Catalog/english/
# Sign build with date
date -Ru >${distdir}/amath/build_date
#uname -srmo >${distdir}/amath/build_host
for f in $(find ${distdir} -name '*'); do touch -amt ${stamp}.00 $f; done
# Cleanup
rm -Rf distcat
rm -Rf ${builddir}
# Install source
./buildsrc
mv amath-1.9.0 ${distdir}/