This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-goldedplus/dist-gpl.sh

64 lines
2.6 KiB
Bash
Raw Normal View History

2011-02-26 23:01:21 +00:00
#!/bin/bash
# $Id$
2005-11-06 14:05:27 +00:00
# Create a archive 'gpl-*.zip' (gplYMMDD.zip) with binary linux build
2005-11-06 12:50:23 +00:00
# of the Golded+.
2011-02-26 23:01:21 +00:00
srcdatefile=srcdate.h
build=`sed -n 's/.*"\([[:digit:]]\{8\}\)".*/\1/p' $srcdatefile`
date="$build"
shortdate=${date/???/}
platform="lnx"
binsuffix="lnx"
binesdir="bin"
dizfile="$binesdir/File_ID.Diz"
2005-11-06 12:50:23 +00:00
shortname=../gpl${shortdate}.zip
2005-11-26 01:29:49 +00:00
name=../gpl115-${date}.zip
2011-02-26 23:01:21 +00:00
requirements_file="${binesdir}/requirements.txt"
2005-11-06 12:50:23 +00:00
2006-02-18 14:08:47 +00:00
echo Build a Golded+/lnx binary package: ${name} and ${shortname}
if [ ! -f golded3/mygolded.h ]; then
cp golded3/mygolded.__h golded3/mygolded.h
2006-02-20 08:42:13 +00:00
echo "golded3/mygolded.h is created now. Please edit this file"
exit 1
fi
2005-11-06 12:50:23 +00:00
2011-02-26 23:01:21 +00:00
bines="${binesdir}/ged${binsuffix} ${binesdir}/gn${binsuffix} ${binesdir}/rddt${binsuffix}"
files="${bines} docs/copying docs/copying.lib ${requirements_file}"
files="${files} bin/golded bin/openbsd-vt220.sh ${dizfile}"
2005-11-06 12:50:23 +00:00
files="${files} docs/golded.html docs/golded.txt docs/goldnode.html"
files="${files} docs/goldnode.txt docs/license.txt docs/notework.txt"
files="${files} docs/rddt.html docs/rddt.txt docs/readme.txt docs/notework.rus"
2007-01-01 19:02:29 +00:00
files="${files} docs/rusfaq.txt docs/rusfaq.koi8r docs/rusfaq.utf8 docs/tips.txt docs/todowork.txt"
2011-02-26 23:01:21 +00:00
files="${files} docs/tokencfg.txt docs/tokentpl.txt"
2007-01-01 19:02:29 +00:00
files="${files} docs/notework.rus docs/notework.koi8r docs/notework.utf8"
2005-11-06 12:50:23 +00:00
2011-02-26 23:01:21 +00:00
compilerver=`gcc -v 2>&1 | sed -n -e '/^gcc version/{s/gcc version \([[:digit:].]\{2,\}\)\s\((\([[:alnum:]]\{2,\}\)\sspecial\).*/\1 \3/p;q}'`
printf 'GoldED+1.1.5 beta at %8.8s\r\n' $build >${dizfile}
printf '%-5s binaries compiled using\r\n' "`uname`" >>${dizfile}
printf 'GNU C/C++ %13.13s\r\n' "$compilerver" >>${dizfile}
printf 'This is unstable release and\r\n' >>${dizfile}
printf 'it should be used for testing\r\n' >>${dizfile}
printf -- '-----------------------------\r\n' >>${dizfile}
printf ' *http://golded-plus.sf.net* \r\n' >>${dizfile}
for f in ${bines}; do rm $f; done
2011-03-04 19:10:13 +00:00
make PLATFORM=${platform} clean all strip docs || (echo "Error $?" ; exit)
2006-02-20 08:39:04 +00:00
for i in ${bines} ; do
if [ ! -f ${i} ] ; then echo "File ${i} not exists, stop!"; exit 1 ; fi
2006-02-20 08:39:04 +00:00
done
2007-01-01 19:02:29 +00:00
iconv -c -f cp866 -t koi8-r docs/rusfaq.txt | sed 2s/cp866/koi8-r/ >docs/rusfaq.koi8r
iconv -c -f cp866 -t utf8 docs/rusfaq.txt | sed 2s/cp866/utf-8/ >docs/rusfaq.utf8
iconv -c -f cp866 -t koi8-r docs/notework.rus | sed 2s/cp866/koi8-r/ >docs/notework.koi8r
iconv -c -f cp866 -t utf8 docs/notework.rus | sed 2s/cp866/utf-8/ >docs/notework.utf8
echo Required libraries: >bin/requirements.txt
2011-02-26 23:01:21 +00:00
ldd ${binesdir}/ged${binsuffix} | sed -e "s/ =.*//" -e /\\/lib\\//d -e "s/\\.so\\./ /" >>${requirements_file}
2007-01-01 19:02:29 +00:00
2011-02-26 23:01:21 +00:00
zip -9DXj ${name} $files
2010-03-14 18:44:24 +00:00
ln ${name} ${shortname} || cp ${name} ${shortname}