| 1 |
#!/bin/bash |
| 2 |
############################################################################### |
| 3 |
# BRLTTY - A background process providing access to the console screen (when in |
| 4 |
# text mode) for a blind person using a refreshable braille display. |
| 5 |
# |
| 6 |
# Copyright (C) 1995-2026 by The BRLTTY Developers. |
| 7 |
# |
| 8 |
# BRLTTY comes with ABSOLUTELY NO WARRANTY. |
| 9 |
# |
| 10 |
# This is free software, placed under the terms of the |
| 11 |
# GNU Lesser General Public License, as published by the Free Software |
| 12 |
# Foundation; either version 2.1 of the License, or (at your option) any |
| 13 |
# later version. Please see the file LICENSE-LGPL for details. |
| 14 |
# |
| 15 |
# Web Page: http://brltty.app/ |
| 16 |
# |
| 17 |
# This software is maintained by Dave Mielke <[email protected]>. |
| 18 |
############################################################################### |
| 19 |
|
| 20 |
readonly configureOptions=( |
| 21 |
--without-libbraille |
| 22 |
--without-flite |
| 23 |
--without-mikropuhe |
| 24 |
--without-speechd |
| 25 |
--without-swift |
| 26 |
--without-theta |
| 27 |
) |
| 28 |
|
| 29 |
. "`dirname "${0}"`/prologue.sh" |
| 30 |
|
| 31 |
[ "${#}" -gt 0 ] || syntaxError "missing source root" |
| 32 |
sourceRoot="${1}" |
| 33 |
shift |
| 34 |
cd "${sourceRoot}" || exit "${?}" |
| 35 |
sourceRoot="`pwd`" |
| 36 |
|
| 37 |
if [ "${#}" -eq 0 ] |
| 38 |
then |
| 39 |
archiveName="`basename "${sourceRoot}"`" |
| 40 |
else |
| 41 |
archiveName="${1}" |
| 42 |
shift |
| 43 |
fi |
| 44 |
|
| 45 |
if [ "${#}" -eq 0 ] |
| 46 |
then |
| 47 |
archiveFile="${archiveName}.tar" |
| 48 |
else |
| 49 |
archiveFile="${1}" |
| 50 |
shift |
| 51 |
fi |
| 52 |
[ "${archiveFile#/}" = "${archiveFile}" ] && archiveFile="${initialDirectory}/${archiveFile}" |
| 53 |
|
| 54 |
[ "${#}" -eq 0 ] || syntaxError "too many parameters" |
| 55 |
|
| 56 |
needTemporaryDirectory |
| 57 |
set -e |
| 58 |
|
| 59 |
cp -p -r -- "${sourceRoot}" "${archiveName}" |
| 60 |
cd "${archiveName}" |
| 61 |
|
| 62 |
"${sourceRoot}/getrevid" "${sourceRoot}" >REVISION |
| 63 |
./autogen |
| 64 |
./configure --quiet "${configureOptions[@]}" |
| 65 |
|
| 66 |
( set -e |
| 67 |
cd "${documentsSubdirectory}" |
| 68 |
make -s clean |
| 69 |
make -s all |
| 70 |
) |
| 71 |
"${sourceRoot}/mkdocs" -o "doc" -s "${sourceRoot}" -b "." |
| 72 |
|
| 73 |
specFile="brltty.spec" |
| 74 |
mv -- "${specFile}" "${temporaryDirectory}" |
| 75 |
make -s distclean |
| 76 |
mv -- "${temporaryDirectory}/${specFile}" . |
| 77 |
|
| 78 |
rm -f -r -- .git |
| 79 |
find . -name .gitignore -exec rm {} \; |
| 80 |
rm -f -r -- .svn |
| 81 |
|
| 82 |
cd .. |
| 83 |
tar --create --no-anchored --file "${archiveFile}" "${archiveName}" |
| 84 |
exit 0 |