Browse Source

Improved install script

master
Carsten Sonne Larsen 7 months ago
parent
commit
65fafb750f
5 changed files with 120 additions and 32 deletions
  1. +1
    -0
      .gitignore
  2. +32
    -0
      build/doc
  3. +79
    -24
      builddist
  4. +4
    -4
      buildsrc
  5. +4
    -4
      configure

+ 1
- 0
.gitignore View File

@ -17,3 +17,4 @@ doxygen.warn
*.deb
*.zip
Makefile
/dist

+ 32
- 0
build/doc View File

@ -0,0 +1,32 @@
#! /bin/sh
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# Tell groff not to emit SGR escape sequences (ANSI color escapes).
GROFF_NO_SGR=1
export GROFF_NO_SGR
echo ".am TH
.hy 0
.na
..
.rm }H
.rm }F" | nroff -man - ${1+"$@"} | perl -ne '
binmode STDIN, '\'':encoding(utf8)'\'';
binmode STDOUT, '\'':encoding(utf8)'\'';
chomp;
s/.\010//g;
s/\s*$//;
if (/^$/) {
$sawblank = 1;
next;
} else {
if ($sawblank && $didprint) {
print "\n";
$sawblank = 0;
}
print "$_\n";
$didprint = 1;
}
'

+ 79
- 24
builddist View File

@ -1,5 +1,6 @@
#!/bin/sh
#
# Build Classic AmigaOS distribtion package
# This file is public domain
#
# Project homepage:
@ -11,62 +12,116 @@
set -e
rm -f amath.lha
rm -Rf amath
rm -Rf dist
mkdir dist
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 dist/amath.000
mv amath ${builddir}/amath
make clean
./configure --disable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68020 -noixemul"
make static
mv amath dist/amath.020
mv amath ${builddir}/amath.020
make clean
./configure --disable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
make static
mv amath dist/amath.030
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 dist/amath-test.000
mv amath ${builddir}/amath-test
make clean
./configure --enable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68020 -noixemul"
make static
mv amath dist/amath-test.020
mv amath ${builddir}/amath-test.020
make clean
./configure --enable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
make static
mv amath dist/amath-test.030
mv amath ${builddir}/amath-test.030
make clean
cd dist
# Build catalogs
make catalogs
# 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.000 >>hashkeys
sha1sum amath >>hashkeys
sha1sum amath.020 >>hashkeys
sha1sum amath.030 >>hashkeys
sha1sum amath-test.000 >>hashkeys
sha1sum amath-test >>hashkeys
sha1sum amath-test.020 >>hashkeys
sha1sum amath-test.030 >>hashkeys
sha256sum amath.000 >>hashkeys
sha256sum amath >>hashkeys
sha256sum amath.020 >>hashkeys
sha256sum amath.030 >>hashkeys
sha256sum amath-test.000 >>hashkeys
sha256sum amath-test >>hashkeys
sha256sum amath-test.020 >>hashkeys
sha256sum amath-test.030 >>hashkeys
cd ..
make catalogs
cp LICENSE dist/
cp HISTORY dist/
# 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
mkdir dist/script
cp script/* dist/script/
date -Ru >dist/build_date
#uname -srmo >dist/build_host
# Cleanup
rm -Rf distcat
rm -Rf ${builddir}
mv dist amath
#lha-ac a amath.lha amath
# Install source
./buildsrc
mv amath-1.9.0 ${distdir}/

+ 4
- 4
buildsrc View File

@ -1,5 +1,6 @@
#!/bin/sh
#
# Build source distribtion package
# This file is public domain
#
# Project homepage:
@ -9,13 +10,12 @@
# DO NOT USE THIS SCRIPT UNLESS YOU KNOW WHAT YOU ARE DOING !
version='1.9.0'
stamp="202101110000"
srcdir="amath-rc"
stamp="202101120000"
srcdir="."
distdir="amath-${version}"
cd ..
rm -f amath-${version}.tar.gz
rm -Rf amath-${version}
rm -Rf ${distdir}
mkdir -m 775 ${distdir}
mkdir -m 775 ${distdir}/src/


+ 4
- 4
configure View File

@ -1194,10 +1194,10 @@ echo " cd src/cplex && \${MAKE} doc"
echo
echo "catalogs:"
echo " cd build/flexcat && \${MAKE}"
echo " \${MKDIR} dist/catalog/english"
echo " \${FLXCAT} text/help.cd catalog/english/amath-help.ct CATALOG dist/catalog/english/amath-help.catalog"
echo " \${FLXCAT} text/ident.cd catalog/english/amath-ident.ct CATALOG dist/catalog/english/amath-ident.catalog"
echo " \${FLXCAT} text/text.cd catalog/english/amath-text.ct CATALOG dist/catalog/english/amath-text.catalog"
echo " \${MKDIR} distcat/catalog/english"
echo " \${FLXCAT} text/help.cd catalog/english/amath-help.ct CATALOG distcat/catalog/english/amath-help.catalog"
echo " \${FLXCAT} text/ident.cd catalog/english/amath-ident.ct CATALOG distcat/catalog/english/amath-ident.catalog"
echo " \${FLXCAT} text/text.cd catalog/english/amath-text.ct CATALOG distcat/catalog/english/amath-text.catalog"
echo
echo "shared-libs:"
echo " cd src/lib && \${MAKE} shared"


Loading…
Cancel
Save