Initial commit.
This commit is contained in:
commit
364d2fd412
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
.config
|
||||
.vscode
|
||||
data
|
||||
dist
|
||||
src
|
30
README.md
Normal file
30
README.md
Normal file
@ -0,0 +1,30 @@
|
||||
# FIDOIP
|
||||
|
||||
This repository contains set of scripts that will help you to get fidoip node up and running.
|
||||
|
||||
**Currently able to work only as point!**
|
||||
|
||||
## Requirements
|
||||
|
||||
### Building fido software
|
||||
|
||||
* autotools
|
||||
* cmake
|
||||
* hunspell
|
||||
* git
|
||||
* GNU awk
|
||||
* iconv
|
||||
* patchelf
|
||||
|
||||
### Runtime
|
||||
|
||||
* Bash 5+.
|
||||
* xdg-open (for opening links in GoldED+).
|
||||
|
||||
## Using
|
||||
|
||||
First, build full stack with:
|
||||
|
||||
```shell
|
||||
./fido build
|
||||
```
|
58
fidoip
Executable file
58
fidoip
Executable file
@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC2046,SC1091
|
||||
ROOTDIR="$(dirname $(realpath -s $0))"
|
||||
|
||||
echo ". Running from \"${ROOTDIR}\""
|
||||
|
||||
source "${ROOTDIR}/scripts/binkd.sh"
|
||||
source "${ROOTDIR}/scripts/configure.sh"
|
||||
source "${ROOTDIR}/scripts/golded.sh"
|
||||
source "${ROOTDIR}/scripts/help.sh"
|
||||
source "${ROOTDIR}/scripts/husky_build.sh"
|
||||
source "${ROOTDIR}/scripts/husky_configure.sh"
|
||||
source "${ROOTDIR}/scripts/sync.sh"
|
||||
|
||||
case $1 in
|
||||
build)
|
||||
shift
|
||||
binkd_build "$@"
|
||||
husky_build "$@"
|
||||
golded_build "$@"
|
||||
;;
|
||||
build_binkd)
|
||||
shift
|
||||
binkd_build "$@"
|
||||
;;
|
||||
build_golded)
|
||||
golded_build
|
||||
;;
|
||||
build_husky)
|
||||
shift
|
||||
husky_build "$@"
|
||||
;;
|
||||
configure)
|
||||
configure_start
|
||||
binkd_configure
|
||||
husky_configure
|
||||
golded_configure
|
||||
;;
|
||||
golded)
|
||||
golded_start
|
||||
;;
|
||||
setup)
|
||||
shift
|
||||
binkd_build "$@"
|
||||
husky_build "$@"
|
||||
golded_build "$@"
|
||||
binkd_configure
|
||||
husky_configure
|
||||
golded_configure
|
||||
;;
|
||||
sync)
|
||||
sync
|
||||
;;
|
||||
*)
|
||||
help_show
|
||||
;;
|
||||
esac
|
123
patches/bsopack.patch
Normal file
123
patches/bsopack.patch
Normal file
@ -0,0 +1,123 @@
|
||||
From dfb746cfd54f2e256983a048762d89f936ade5ff Mon Sep 17 00:00:00 2001
|
||||
From: Eugene Lamskoy <e.lamskoy@gmail.com>
|
||||
Date: Sat, 18 Dec 2021 13:09:35 +0200
|
||||
Subject: [PATCH 1/2] Added CMakeLists.txt to be able to compile with cmake
|
||||
|
||||
---
|
||||
CMakeLists.txt | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 85 insertions(+)
|
||||
create mode 100644 CMakeLists.txt
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..9ee4d61
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,85 @@
|
||||
+cmake_minimum_required(VERSION 2.8.11)
|
||||
+PROJECT(sqpack C)
|
||||
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
+
|
||||
+option(BUILD_SHARED_LIBS "Build shared libs" ON)
|
||||
+
|
||||
+if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
+ ADD_DEFINITIONS(-g -DDEBUG -D_DEBUG)
|
||||
+ set(CMAKE_CONFIGURATION_TYPES "Debug" CACHE STRING "My multi config types" FORCE)
|
||||
+else(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
+ ADD_DEFINITIONS(-DNDEBUG)
|
||||
+ set(CMAKE_CONFIGURATION_TYPES "Release" CACHE STRING "My multi config types" FORCE)
|
||||
+endif(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
+
|
||||
+if (MSVC)
|
||||
+ if (BUILD_SHARED_LIBS)
|
||||
+ ADD_DEFINITIONS(-D_DLL -D_MAKE_DLL)
|
||||
+ else()
|
||||
+ set(CompilerFlags
|
||||
+ CMAKE_CXX_FLAGS
|
||||
+ CMAKE_CXX_FLAGS_DEBUG
|
||||
+ CMAKE_CXX_FLAGS_RELEASE
|
||||
+ CMAKE_C_FLAGS
|
||||
+ CMAKE_C_FLAGS_DEBUG
|
||||
+ CMAKE_C_FLAGS_RELEASE
|
||||
+ )
|
||||
+ foreach(CompilerFlag ${CompilerFlags})
|
||||
+ string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
|
||||
+ endforeach()
|
||||
+ endif()
|
||||
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../out/lib")
|
||||
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../out/bin")
|
||||
+ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
|
||||
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_SOURCE_DIR}/../huskylib;${CMAKE_CURRENT_SOURCE_DIR}/../fidoconf;${CMAKE_CURRENT_SOURCE_DIR}/../smapi;")
|
||||
+ if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
+ list( APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../out/lib/Debug" )
|
||||
+ else(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
+ list( APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../out/lib/Release" )
|
||||
+ endif(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
+else ()
|
||||
+ if (NOT BUILD_SHARED_LIBS)
|
||||
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
+ endif()
|
||||
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_SOURCE_DIR}/h;${CMAKE_CURRENT_SOURCE_DIR}/../huskylib;${CMAKE_CURRENT_SOURCE_DIR}/../fidoconf;${CMAKE_CURRENT_SOURCE_DIR}/../smapi;")
|
||||
+ ADD_DEFINITIONS(-Wall -DUNIX)
|
||||
+endif (MSVC)
|
||||
+
|
||||
+find_library(husky_LIB NAMES husky PATHS "${CMAKE_FIND_ROOT_PATH}")
|
||||
+find_library(fidoconfig_LIB NAMES fidoconfig PATHS "${CMAKE_FIND_ROOT_PATH}")
|
||||
+find_library(smapi_LIB NAMES smapi PATHS "${CMAKE_FIND_ROOT_PATH}")
|
||||
+
|
||||
+message("-------------------------")
|
||||
+message("System : ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
|
||||
+message("Compiler : ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
|
||||
+message("Prefix : ${CMAKE_INSTALL_PREFIX} (run \"cmake . -DCMAKE_INSTALL_PREFIX:PATH=/other\" for other prefix)")
|
||||
+message("libhusky : ${husky_LIB}")
|
||||
+message("libfidoconfig : ${fidoconfig_LIB}")
|
||||
+message("libsmapi : ${smapi_LIB}")
|
||||
+message("Build shared : ${BUILD_SHARED_LIBS}")
|
||||
+message("Build type : ${CMAKE_CONFIGURATION_TYPES}")
|
||||
+message("-------------------------")
|
||||
+
|
||||
+ADD_EXECUTABLE(bsopack
|
||||
+ src/config.c src/bsoutil.c src/bsopack.c
|
||||
+)
|
||||
+target_link_libraries(bsopack ${fidoconfig_LIB} ${smapi_LIB} ${husky_LIB})
|
||||
+
|
||||
+ INSTALL(TARGETS bsopack
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ )
|
||||
+if (NOT MSVC)
|
||||
+ set(CPACK_GENERATOR ${CPACK_GENERATOR} TGZ)
|
||||
+else()
|
||||
+ set(CPACK_GENERATOR ${CPACK_GENERATOR} 7Z)
|
||||
+endif (NOT MSVC)
|
||||
+
|
||||
+set (CPACK_STRIP_FILES TRUE)
|
||||
+set (CPACK_PACKAGE_VERSION_MAJOR "1")
|
||||
+set (CPACK_PACKAGE_VERSION_MINOR "9")
|
||||
+file(READ cvsdate.h CPACK_PACKAGE_VERSION_PATCH LIMIT 10 OFFSET 17)
|
||||
+string(SUBSTRING ${CPACK_PACKAGE_VERSION_PATCH} 0 10 CPACK_PACKAGE_VERSION_PATCH)
|
||||
+string(REGEX REPLACE "-" "" CPACK_PACKAGE_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH})
|
||||
+set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
|
||||
+INCLUDE(CPack)
|
||||
|
||||
From 803ee4d24204608cf450e374e056c6d612f6f9c0 Mon Sep 17 00:00:00 2001
|
||||
From: Eugene Lamskoy <e.lamskoy@gmail.com>
|
||||
Date: Sat, 18 Dec 2021 13:11:49 +0200
|
||||
Subject: [PATCH 2/2] Duplicate symbol definition removed
|
||||
|
||||
---
|
||||
src/config.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/config.c b/src/config.c
|
||||
index 71fe4f4..b92494c 100644
|
||||
--- a/src/config.c
|
||||
+++ b/src/config.c
|
||||
@@ -13,7 +13,6 @@ s_fidoconfig *config;
|
||||
char *logFileName=NULL;
|
||||
char *fidoConfigFile=NULL;
|
||||
int fidocfg_in_env=0;
|
||||
-char *versionStr;
|
||||
|
||||
void Usage()
|
||||
{
|
76
scripts/binkd.sh
Normal file
76
scripts/binkd.sh
Normal file
@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source "${ROOTDIR}/scripts/binkd_vars.sh"
|
||||
source "${ROOTDIR}/scripts/helpers/git.sh"
|
||||
|
||||
function binkd_build() {
|
||||
local configure_params=$*
|
||||
|
||||
echo "* Starting building binkd..."
|
||||
echo "* Additional configure parameters: ${configure_params}"
|
||||
|
||||
git_source "binkd" "${_BINKD_GIT}"
|
||||
|
||||
if ! cd "${_BINKD_SOURCE_DIR}"; then
|
||||
echo "! Failed to change directory to '${_BINKD_SOURCE_DIR}'!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp mkfls/unix/* .
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
if ! ./configure ${_BINKD_CONFIGURE_PARAMS}; then
|
||||
echo "! Failed to configure binkd sources!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make; then
|
||||
echo "! Failed to compile binkd!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make install; then
|
||||
echo "! Failed to install binkd!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "* binkd installed."
|
||||
}
|
||||
|
||||
function binkd_configure() {
|
||||
echo "* Configuring binkd..."
|
||||
|
||||
mkdir -p "${_DATA_ROOT}"/{localinb,logs,protinb,tempinb}
|
||||
|
||||
cat >"${_BINKD_CONFIG_FILE}" <<EOF
|
||||
domain fidonet ${_DATA_ROOT}/outbound 2
|
||||
address ${FTN_ADDR}@fidonet
|
||||
sysname "${MACHINE_NAME}"
|
||||
location "${LOCATION}"
|
||||
sysop "${REAL_NAME}"
|
||||
nodeinfo 1M,TCP,BINKP
|
||||
call-delay 20
|
||||
rescan-delay 5
|
||||
try 1
|
||||
hold 5
|
||||
send-if-pwd
|
||||
log ${_DATA_ROOT}/logs/binkd.log
|
||||
loglevel 4
|
||||
conlog 4
|
||||
percents
|
||||
printq
|
||||
inbound ${_DATA_ROOT}/localinb
|
||||
inbound-nonsecure ${_DATA_ROOT}/protinb
|
||||
temp-inbound ${_DATA_ROOT}/tempinb
|
||||
minfree 2048
|
||||
minfree-nonsecure 2048
|
||||
kill-dup-partial-files
|
||||
kill-old-partial-files 86400
|
||||
kill-old-bsy 43200
|
||||
prescan
|
||||
node ${UPLINK_FTN} ${UPLINK_ADDR} ${PASSWORD}
|
||||
EOF
|
||||
|
||||
echo "* binkd configured."
|
||||
}
|
10
scripts/binkd_vars.sh
Normal file
10
scripts/binkd_vars.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source "${ROOTDIR}/scripts/vars.sh"
|
||||
|
||||
_BINKD_SOURCE_DIR="${ROOTDIR}/src/binkd"
|
||||
_BINKD_BIN_DIR="${ROOTDIR}/dist/binkd"
|
||||
_BINKD_GIT="https://github.com/pgul/binkd"
|
||||
_BINKD_CONFIGURE_PARAMS="--prefix=${_BINKD_BIN_DIR} --with-debug --with-zlib"
|
||||
_BINKD_CONFIG_FILE="${_CONFIG_ROOT}/binkd.config"
|
104
scripts/configure.sh
Normal file
104
scripts/configure.sh
Normal file
@ -0,0 +1,104 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source "${ROOTDIR}/scripts/vars.sh"
|
||||
|
||||
function configure_dirs() {
|
||||
echo "* Configuring directories..."
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2162,SC2129
|
||||
function configure_start() {
|
||||
echo "* Starting fidoip configuration."
|
||||
echo "! Password inputs aren't masked, ensure that you're alone :)"
|
||||
echo ""
|
||||
|
||||
echo -n "Uplink IP or domain name: "
|
||||
read uplink_addr
|
||||
export UPLINK_ADDR="${uplink_addr}"
|
||||
|
||||
echo -n "Uplink FTN address: "
|
||||
read uplink_ftn
|
||||
export UPLINK_FTN="${uplink_ftn}"
|
||||
|
||||
echo -n "Uplink real name: "
|
||||
read uplink_name
|
||||
export UPLINK_NAME="${uplink_name}"
|
||||
|
||||
echo -n "Your real name: "
|
||||
read real_name
|
||||
export REAL_NAME="${real_name}"
|
||||
|
||||
echo -n "Your location (city, country): "
|
||||
read location
|
||||
export LOCATION="${location}"
|
||||
|
||||
echo -n "Your FTN address: "
|
||||
read ftn_addr
|
||||
export FTN_ADDR="${ftn_addr}"
|
||||
|
||||
echo -n "Your machine name: "
|
||||
read machine_name
|
||||
export MACHINE_NAME="${machine_name}"
|
||||
|
||||
echo -n "Your password: "
|
||||
read password
|
||||
export PASSWORD="${password}"
|
||||
|
||||
echo -n "AreaFix password: "
|
||||
read afpass
|
||||
export AREAFIX_PASSWORD="${afpass}"
|
||||
|
||||
echo -n "FileFix password: "
|
||||
read ffpass
|
||||
export FILEFIX_PASSWORD="${ffpass}"
|
||||
|
||||
echo "* Verify configuration:"
|
||||
echo ""
|
||||
echo "---"
|
||||
echo "Uplink address: ${UPLINK_ADDR}"
|
||||
echo "Uplink FTN: ${UPLINK_FTN}"
|
||||
echo "Uplink real name: ${UPLINK_NAME}"
|
||||
echo "---"
|
||||
echo "Your real name: ${REAL_NAME}"
|
||||
echo "Your FTN: ${FTN_ADDR}"
|
||||
echo "Your location: ${LOCATION}"
|
||||
echo "Your machine name: ${MACHINE_NAME}"
|
||||
echo "Your password: ${PASSWORD}"
|
||||
echo "---"
|
||||
echo "AreaFix password: ${AREAFIX_PASSWORD}"
|
||||
echo "FileFix password: ${FILEFIX_PASSWORD}"
|
||||
echo "---"
|
||||
echo ""
|
||||
|
||||
echo -n "Is that correct? [y/N] "
|
||||
getresponse
|
||||
echo ""
|
||||
if [ "$(echo ${_RESP} | awk {' print tolower($1) '})" != "y" ]; then
|
||||
echo "! Please, restart configuration process!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "* Configuration confirmed."
|
||||
|
||||
mkdir -p "${_CONFIG_ROOT}" "${_DATA_ROOT}"
|
||||
|
||||
echo "export UPLINK_ADDR=${UPLINK_ADDR}" >"${ROOTDIR}/.config"
|
||||
echo "export UPLINK_FTN=${UPLINK_FTN}" >>"${ROOTDIR}/.config"
|
||||
echo "export UPLINK_NAME=${UPLINK_NAME}" >>"${ROOTDIR}/.config"
|
||||
echo "export REAL_NAME=${REAL_NAME}" >>"${ROOTDIR}/.config"
|
||||
echo "export FTN_ADDR=${FTN_ADDR}" >>"${ROOTDIR}/.config"
|
||||
echo "export LOCATION=${LOCATION}" >>"${ROOTDIR}/.config"
|
||||
echo "export MACHINE_NAME=${MACHINE_NAME}" >>"${ROOTDIR}/.config"
|
||||
echo "export PASSWORD=${PASSWORD}" >>"${ROOTDIR}/.config"
|
||||
echo "export AREAFIX_PASSWORD=${AREAFIX_PASSWORD}" >>"${ROOTDIR}/.config"
|
||||
echo "export FILEFIX_PASSWORD=${FILEFIX_PASSWORD}" >>"${ROOTDIR}/.config"
|
||||
|
||||
}
|
||||
|
||||
function getresponse() {
|
||||
stty raw
|
||||
_RESP=$(dd bs=1 count=1 2>/dev/null)
|
||||
export _RESP
|
||||
stty cooked
|
||||
}
|
163
scripts/golded.sh
Normal file
163
scripts/golded.sh
Normal file
@ -0,0 +1,163 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
_GOLDED_BIN_DIR="${ROOTDIR}/dist/golded"
|
||||
_GOLDED_GIT="https://github.com/golded-plus/golded-plus"
|
||||
|
||||
function golded_build() {
|
||||
echo "* Building golded+..."
|
||||
|
||||
git_source "golded" "${_GOLDED_GIT}"
|
||||
|
||||
cp "golded3/mygolded.__h" "golded3/mygolded.h"
|
||||
|
||||
iconv -c -f cp866 -t utf8 docs/rusfaq.txt | sed 2s/cp866/utf-8/ >docs/rusfaq.utf8
|
||||
iconv -c -f cp866 -t utf8 docs/notework.rus | sed 2s/cp866/utf-8/ >docs/notework_rus.utf8
|
||||
iconv -c -f cp866 -t koi8-r docs/rusfaq.txt | sed 2s/cp866/koi8/ >docs/rusfaq.koi8
|
||||
iconv -c -f cp866 -t koi8-r docs/notework.rus | sed 2s/cp866/koi8/ >docs/notework_rus.koi8
|
||||
|
||||
cd cfgs/config || (
|
||||
echo "! Failed to cd to configs directory!"
|
||||
exit 1
|
||||
)
|
||||
|
||||
for i in *.ru?; do
|
||||
iconv -c -f cp866 -t koi8-r ${i} | sed 2s/cp866/koi8/ >${i}.koi8
|
||||
iconv -c -f cp866 -t utf-8 ${i} | sed 2s/cp866/utf-8/ >${i}.utf8
|
||||
done
|
||||
iconv -c -f cp866 -t koi8-r aliasru.cfg | sed 2s/cp866/koi8/ >aliasru.koi8
|
||||
iconv -c -f cp866 -t utf-8 aliasru.cfg | sed 2s/cp866/utf-8/ >aliasru.utf8
|
||||
|
||||
cd ../template || (
|
||||
echo "! Failed to cd to templates directory!"
|
||||
exit 1
|
||||
)
|
||||
|
||||
iconv -c -f cp866 -t koi8-r rusCP866.tpl | sed 2s/cp866/koi8/ >rusKOI8.tpl
|
||||
iconv -c -f cp866 -t utf-8 rusCP866.tpl | sed 2s/cp866/utf-8/ >rusUTF8.tpl
|
||||
|
||||
cd ../.. || (
|
||||
echo "! Failed to cd to sources directory!"
|
||||
exit 1
|
||||
)
|
||||
|
||||
make WIDE_NCURSES=0 USE_NCURSES=1 KOI8=1
|
||||
|
||||
mkdir -p "${_GOLDED_BIN_DIR}/share/goldedplus"/{docs,charset,colorset,config,template}
|
||||
install -d "${_GOLDED_BIN_DIR}/bin"
|
||||
install -m 755 bin/rddtlnx "${_GOLDED_BIN_DIR}/bin/rddt"
|
||||
install -m 755 bin/gnlnx "${_GOLDED_BIN_DIR}/bin/goldnode"
|
||||
install -m 755 bin/gedlnx "${_GOLDED_BIN_DIR}/bin/gedlnx"
|
||||
install -m 755 ../golded "${_GOLDED_BIN_DIR}/bin/golded"
|
||||
patchelf --set-rpath /usr/lib/ncurses-golded/lib "${_GOLDED_BIN_DIR}/bin/gedlnx"
|
||||
install -d "${_GOLDED_BIN_DIR}/man/man1"
|
||||
install -m 644 docs/*.1 "${_GOLDED_BIN_DIR}/man/man1/"
|
||||
install -m 644 etc/gecolor.conf "${_GOLDED_BIN_DIR}/share/goldedplus/colorset/gedcolor.cfg"
|
||||
install -m 644 cfgs/config/* "${_GOLDED_BIN_DIR}/share/goldedplus/config"
|
||||
install -m 644 cfgs/template/* "${_GOLDED_BIN_DIR}/share/goldedplus/template"
|
||||
install -m 644 cfgs/charset/* "${_GOLDED_BIN_DIR}/share/goldedplus/charset"
|
||||
install -m 644 cfgs/colorset/* "${_GOLDED_BIN_DIR}/share/goldedplus/colorset"
|
||||
install -m 644 docs/*.utf8 "${_GOLDED_BIN_DIR}/share/goldedplus/docs"
|
||||
install -m 644 docs/*.koi8 "${_GOLDED_BIN_DIR}/share/goldedplus/docs"
|
||||
install -m 644 docs/{tips,linux,notework}.txt "${_GOLDED_BIN_DIR}/share/goldedplus/docs"
|
||||
}
|
||||
|
||||
function golded_configure() {
|
||||
echo "* Configuring golded..."
|
||||
|
||||
mkdir -p "${_CONFIG_ROOT}/golded"
|
||||
|
||||
cat >"${_CONFIG_ROOT}/golded/golded.cfg" <<EOF
|
||||
##################################################################
|
||||
# Has to be in the coding KOI8-R codepage
|
||||
##################################################################
|
||||
username ${REAL_NAME}
|
||||
Address ${FTN_ADDR}
|
||||
XLATPATH ${_GOLDED_BIN_DIR}/share/goldedplus/charset/
|
||||
XLATLOCALSET KOI8
|
||||
XLATIMPORT CP866
|
||||
XLATEXPORT CP866
|
||||
XLATCHARSET KOI8 CP866 koi_866.chs
|
||||
XLATCHARSET CP866 KOI8 866_koi.chs
|
||||
IGNORECHARSET
|
||||
CTRLINFONET TEARLINE, ORIGIN
|
||||
CTRLINFOECHO TEARLINE, ORIGIN
|
||||
CTRLINFOLOCAL TEARLINE, ORIGIN
|
||||
TEARLINE binkd/1.1a-94/Darwin | hpt/mac 1.9.0-cur | @longpid @version
|
||||
ORIGIN "Per Aspera Ad Astra"
|
||||
TAGLINESUPPORT Yes
|
||||
TAGLINE You_Tagline
|
||||
COLOR MENU UNREAD YELLOW ON BLACK
|
||||
HighlightUnread Yes
|
||||
SEMAPHORE EXPORTLIST ${_DATA_ROOT}/logs/echotoss.log
|
||||
SEMAPHORE IMPORTLIST ${_DATA_ROOT}/logs/import.log
|
||||
AreaFile Fidoconfig ${_CONFIG_ROOT}/husky/areas.cfg
|
||||
LOADLANGUAGE ${_CONFIG_ROOT}/golded/goldlang.cfg
|
||||
AREASCAN *
|
||||
EditSoftCrXLat H
|
||||
UseSoftCRxlat Yes
|
||||
DispSoftCr Yes
|
||||
VIEWHIDDEN NO
|
||||
VIEWKLUDGE NO
|
||||
TwitName Bad User
|
||||
TwitName Urgy Spammer
|
||||
TwitMode Skip
|
||||
TwitTo Yes
|
||||
UuDecodePath ${_DATA_ROOT}/uudecode
|
||||
Invalidate Tearline "" ""
|
||||
Invalidate Origin "" ""
|
||||
EditCrlFTerm No
|
||||
ViewQuote Yes
|
||||
ImportBegin -Cut On @file-
|
||||
ImportEnd -Cut Off @file-
|
||||
OutPutFile ${_DATA_ROOT}/outfile/
|
||||
AttribsNet Loc Pvt
|
||||
DispMsgSize Kbytes
|
||||
DispAttachSize Kbytes
|
||||
NodelistWarn No
|
||||
TemplatePath ${_GOLDED_BIN_DIR}/share/goldedplus/template
|
||||
Template golded.tpl "Default Template"
|
||||
include ${_GOLDED_BIN_DIR}/share/goldedplus/colorset/gedcol10.cfg
|
||||
NodePath ${_DATA_ROOT}/nodelist
|
||||
NODELIST NODELIST.999
|
||||
NODELIST PNT5005.999
|
||||
NODELIST PNT5010.999
|
||||
NODELIST PNT5019.999
|
||||
NODELIST PNT5020.999
|
||||
NODELIST PNT5025.999
|
||||
NODELIST PNT5027.999
|
||||
NODELIST PNT5033.999
|
||||
NODELIST PNT5052.999
|
||||
NODELIST PNT5057.999
|
||||
NODELIST PNT5061.999
|
||||
NODELIST PNT5080.999
|
||||
RobotName AreaFix
|
||||
RobotName AllFix
|
||||
RobotName T-fix
|
||||
RobotName FAQServer
|
||||
LogFile ${_DATA_ROOT}/logs/golded.log
|
||||
AddressMacro af,AreaFix,${UPLINK_FTN},"${AREAFIX_PASSWORD}"
|
||||
AddressMacro ff,FileFix,${UPLINK_FTN},"${FILEFIX_PASSWORD}"
|
||||
AddressBookAdd Always
|
||||
^B READAddressBookAdd
|
||||
@F10 READUserBase
|
||||
AreaSep !NET "NM" 0 Net
|
||||
AreaSep !LOCAL "Local" 0 Local
|
||||
AreaSep !ECHO "Echos" 0 Echo
|
||||
ConfirmFile golded.cfm
|
||||
ConfirmResponse Ask
|
||||
AREALISTGROUPID YES
|
||||
AREALISTSORT TUE
|
||||
PeekURLOptions FromTop
|
||||
URLHANDLER -NoPause -NoKeepCtrl -Wipe xdg-open @url > /dev/null 2>&1 &
|
||||
DispHdrLocation Yes
|
||||
MsgListHeader 1
|
||||
KeybExt Yes
|
||||
QuoteCtrl No
|
||||
Include ${_GOLDED_BIN_DIR}/share/goldedplus/config/aliasru.koi8
|
||||
EOF
|
||||
}
|
||||
|
||||
function golded_start() {
|
||||
echo "* Starting golded+..."
|
||||
luit -encoding ru_RU.KOI8-R "${_GOLDED_BIN_DIR}"/bin/gedlnx -c"${_CONFIG_ROOT}/golded/golded.cfg"
|
||||
}
|
20
scripts/help.sh
Normal file
20
scripts/help.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function help_show() {
|
||||
echo "FidoIP control script."
|
||||
echo "Copyright (c) 2022, Stanislav N. aka pztrn."
|
||||
echo ""
|
||||
echo "Building:"
|
||||
echo ""
|
||||
echo -e "\tbuild\t\t\t\tBuild everything with default parameters."
|
||||
echo -e "\tbuild_binkd [configure_params]\tBuild binkd. Pass additional configure parameters"
|
||||
echo -e "\t\t\t\t\tfor ./configure script."
|
||||
echo -e "\tbuild_golded\t\t\tBuild golded+ editor."
|
||||
echo -e "\tbuild_husky [component]\t\tBuild husky. Pass component name (only one) to build only"
|
||||
echo -e "\t\t\t\t\tthat component (e.g. \"areafix\")."
|
||||
echo -e "\tconfigure\t\t\tConfigure everything. Will overwrite any modifications made to generated"
|
||||
echo -e "\t\t\t\t\tconfiguration files."
|
||||
echo -e "\tsetup\t\t\t\tBuild and configure everything. Will overwrite any modifications made to"
|
||||
echo -e "\t\t\t\t\tgenerated configuration files."
|
||||
echo -e "\tsync\t\t\t\tSync with remote node. Use this command if you're a point."
|
||||
}
|
33
scripts/helpers/git.sh
Normal file
33
scripts/helpers/git.sh
Normal file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function git_source() {
|
||||
local source_dir_name=$1
|
||||
local source_dir="${ROOTDIR}/src/${source_dir_name}"
|
||||
local remote_repo=$2
|
||||
|
||||
if [ ! -d "${source_dir}" ]; then
|
||||
echo "* Creating source directory '${source_dir_name}'..."
|
||||
if ! mkdir -p "${source_dir}"; then
|
||||
echo "! Failed to create '${source_dir_name}'!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! cd "${source_dir}"; then
|
||||
echo "! Failed to change current directory to '${source_dir}'!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d ".git" ]; then
|
||||
echo "* Getting sources in '${source_dir_name}'..."
|
||||
if ! git clone "${remote_repo}" .; then
|
||||
echo "! Failed to get sources in '${source_dir_name}'!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "* Updating sources in '${source_dir_name}'..."
|
||||
if ! git pull; then
|
||||
echo "! Failed to update sources in '${source_dir_name}'!"
|
||||
fi
|
||||
fi
|
||||
}
|
404
scripts/husky_build.sh
Normal file
404
scripts/husky_build.sh
Normal file
@ -0,0 +1,404 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source "${ROOTDIR}/scripts/husky_vars.sh"
|
||||
source "${ROOTDIR}/scripts/helpers/git.sh"
|
||||
|
||||
function husky_build() {
|
||||
local component=$1
|
||||
echo "* Building husky..."
|
||||
|
||||
# User might (re)build only one component.
|
||||
if [ "${component}" != "" ]; then
|
||||
echo "!!! Building only '${component}'!"
|
||||
|
||||
local funcname="husky_build_${component}"
|
||||
${funcname}
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Build sequence was taken from husky-git package from Arch Linux AUR.
|
||||
husky_build_huskylib
|
||||
husky_build_smapi
|
||||
husky_build_fidoconf
|
||||
husky_build_areafix
|
||||
husky_build_hptzip
|
||||
husky_build_hpt
|
||||
husky_build_areastat
|
||||
husky_build_hptsqfix
|
||||
husky_build_htick
|
||||
husky_build_hptkill
|
||||
husky_build_nltools
|
||||
husky_build_sqpack
|
||||
husky_build_bsopack
|
||||
}
|
||||
|
||||
function husky_build_areafix() {
|
||||
echo "* Building husky's areafix..."
|
||||
|
||||
_husky_build_common_start "areafix" "${_HUSKY_AREAFIX_GIT}"
|
||||
|
||||
rm fidoconf huskylib smapi &>/dev/null
|
||||
ln -s ../fidoconf/fidoconf fidoconf
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
ln -s ../smapi/smapi smapi
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-Dsmapi_LIB="${ROOTDIR}/dist/husky/lib/libsmapi.a" \
|
||||
-Dfidoconfig_LIB="${ROOTDIR}/dist/husky/lib/libfidoconfig.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure areafix!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "areafix"
|
||||
}
|
||||
|
||||
function husky_build_areastat() {
|
||||
echo "* Building husky's areastat..."
|
||||
|
||||
_husky_build_common_start "areastat" "${_HUSKY_AREASTAT_GIT}"
|
||||
|
||||
rm huskylib smapi &>/dev/null
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
ln -s ../smapi/smapi smapi
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
# areastat's cvsdate.h placed in different place.
|
||||
mv cvsdate.h h/cvsdate.h
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-Dsmapi_LIB="${ROOTDIR}/dist/husky/lib/libsmapi.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure areastat!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "areastat"
|
||||
}
|
||||
|
||||
function husky_build_bsopack() {
|
||||
echo "* Building husky's bsopack..."
|
||||
|
||||
_husky_build_common_start "bsopack" "${_HUSKY_BSOPACK_GIT}"
|
||||
|
||||
rm fidoconf huskylib smapi &>/dev/null
|
||||
ln -s ../fidoconf/fidoconf fidoconf
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
ln -s ../smapi/smapi smapi
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
# bsopack requires patch to work with cmake.
|
||||
git apply <"${ROOTDIR}/patches/bsopack.patch"
|
||||
|
||||
# bsopack's cvsdate.h placed in different place.
|
||||
#mv cvsdate.h h/cvsdate.h
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dfidoconfig_LIB="${ROOTDIR}/dist/husky/lib/libfidoconfig.a" \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-Dsmapi_LIB="${ROOTDIR}/dist/husky/lib/libsmapi.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure bsopack!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "bsopack"
|
||||
}
|
||||
|
||||
function husky_build_fidoconf() {
|
||||
echo "* Building husky's fidoconf..."
|
||||
|
||||
_husky_build_common_start "fidoconf" "${_HUSKY_FIDOCONF_GIT}"
|
||||
|
||||
rm huskylib smapi &>/dev/null
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
ln -s ../smapi/smapi smapi
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-Dsmapi_LIB="${ROOTDIR}/dist/husky/lib/libsmapi.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure fidoconf!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "fidoconf"
|
||||
}
|
||||
|
||||
function husky_build_hpt() {
|
||||
echo "* Building husky's hpt..."
|
||||
|
||||
_husky_build_common_start "hpt" "${_HUSKY_HPT_GIT}"
|
||||
|
||||
rm areafix fidoconf hptzip huskylib smapi &>/dev/null
|
||||
ln -s ../areafix/areafix areafix
|
||||
ln -s ../fidoconf/fidoconf fidoconf
|
||||
ln -s ../hptzip/hptzip hptzip
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
ln -s ../smapi/smapi smapi
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dareafix_LIB="${ROOTDIR}/dist/husky/lib/libareafix.a" \
|
||||
-Dfidoconfig_LIB="${ROOTDIR}/dist/husky/lib/libfidoconfig.a" \
|
||||
-Dhptzip_LIB="${ROOTDIR}/dist/husky/lib/libhptzip.a" \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-Dsmapi_LIB="${ROOTDIR}/dist/husky/lib/libsmapi.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure hpt!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "hpt"
|
||||
}
|
||||
|
||||
function husky_build_hptkill() {
|
||||
echo "* Building husky's hptkill..."
|
||||
|
||||
_husky_build_common_start "hptkill" "${_HUSKY_HPTKILL_GIT}"
|
||||
|
||||
rm fidoconf huskylib smapi &>/dev/null
|
||||
ln -s ../fidoconf/fidoconf fidoconf
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
ln -s ../smapi/smapi smapi
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dfidoconfig_LIB="${ROOTDIR}/dist/husky/lib/libfidoconfig.a" \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-Dsmapi_LIB="${ROOTDIR}/dist/husky/lib/libsmapi.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure hptkill!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "hptkill"
|
||||
}
|
||||
|
||||
function husky_build_hptsqfix() {
|
||||
echo "* Building husky's hptsqfix..."
|
||||
|
||||
_husky_build_common_start "hptsqfix" "${_HUSKY_HPTSQFIX_GIT}"
|
||||
|
||||
rm fidoconf huskylib smapi &>/dev/null
|
||||
ln -s ../fidoconf/fidoconf fidoconf
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
ln -s ../smapi/smapi smapi
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
# hptsqfix's cvsdate.h placed in different place.
|
||||
mv cvsdate.h h/cvsdate.h
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dfidoconfig_LIB="${ROOTDIR}/dist/husky/lib/libfidoconfig.a" \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-Dsmapi_LIB="${ROOTDIR}/dist/husky/lib/libsmapi.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure hptsqfix!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "hptsqfix"
|
||||
}
|
||||
|
||||
function husky_build_hptzip() {
|
||||
echo "* Building husky's hptzip..."
|
||||
|
||||
_husky_build_common_start "hptzip" "${_HUSKY_HPTZIP_GIT}"
|
||||
|
||||
rm huskylib &>/dev/null
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure hptzip!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "hptzip"
|
||||
}
|
||||
|
||||
function husky_build_htick() {
|
||||
echo "* Building husky's htick..."
|
||||
|
||||
_husky_build_common_start "htick" "${_HUSKY_HTICK_GIT}"
|
||||
|
||||
rm areafix fidoconf hptzip huskylib smapi &>/dev/null
|
||||
ln -s ../areafix/areafix areafix
|
||||
ln -s ../fidoconf/fidoconf fidoconf
|
||||
ln -s ../hptzip/hptzip hptzip
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
ln -s ../smapi/smapi smapi
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dareafix_LIB="${ROOTDIR}/dist/husky/lib/libareafix.a" \
|
||||
-Dfidoconfig_LIB="${ROOTDIR}/dist/husky/lib/libfidoconfig.a" \
|
||||
-Dhptzip_LIB="${ROOTDIR}/dist/husky/lib/libhptzip.a" \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-Dsmapi_LIB="${ROOTDIR}/dist/husky/lib/libsmapi.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure htick!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "htick"
|
||||
}
|
||||
|
||||
function husky_build_huskylib() {
|
||||
echo "* Building husky's huskylib..."
|
||||
|
||||
_husky_build_common_start "huskylib" "${_HUSKY_HUSKYLIB_GIT}"
|
||||
|
||||
if ! cmake \
|
||||
-Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure huskylib!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "huskylib"
|
||||
}
|
||||
|
||||
function husky_build_nltools() {
|
||||
echo "* Building husky's nltools..."
|
||||
|
||||
_husky_build_common_start "nltools" "${_HUSKY_NLTOOLS_GIT}"
|
||||
|
||||
rm fidoconf hptzip huskylib smapi &>/dev/null
|
||||
ln -s ../fidoconf/fidoconf fidoconf
|
||||
ln -s ../hptzip/hptzip hptzip
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
ln -s ../smapi/smapi smapi
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
# nltools's cvsdate.h placed in different place.
|
||||
mv cvsdate.h h/cvsdate.h
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dfidoconfig_LIB="${ROOTDIR}/dist/husky/lib/libfidoconfig.a" \
|
||||
-Dhptzip_LIB="${ROOTDIR}/dist/husky/lib/libhptzip.a" \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-Dsmapi_LIB="${ROOTDIR}/dist/husky/lib/libsmapi.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure nltools!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "nltools"
|
||||
}
|
||||
|
||||
function husky_build_smapi() {
|
||||
echo "* Building husky's smapi..."
|
||||
|
||||
_husky_build_common_start "smapi" "${_HUSKY_SMAPI_GIT}"
|
||||
|
||||
rm huskylib &>/dev/null
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
if ! cmake \
|
||||
-Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure smapi!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "smapi"
|
||||
}
|
||||
|
||||
function husky_build_sqpack() {
|
||||
echo "* Building husky's sqpack..."
|
||||
|
||||
_husky_build_common_start "sqpack" "${_HUSKY_SQPACK_GIT}"
|
||||
|
||||
rm fidoconf huskylib smapi &>/dev/null
|
||||
ln -s ../fidoconf/fidoconf fidoconf
|
||||
ln -s ../huskylib/huskylib huskylib
|
||||
ln -s ../smapi/smapi smapi
|
||||
|
||||
rm -rf build &>/dev/null
|
||||
|
||||
if ! cmake -Bbuild \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dfidoconfig_LIB="${ROOTDIR}/dist/husky/lib/libfidoconfig.a" \
|
||||
-Dhusky_LIB="${ROOTDIR}/dist/husky/lib/libhusky.a" \
|
||||
-Dsmapi_LIB="${ROOTDIR}/dist/husky/lib/libsmapi.a" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="${_HUSKY_BIN_DIR}"; then
|
||||
echo "! Failed to configure sqpack!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_build_common_end "sqpack"
|
||||
}
|
||||
|
||||
function _husky_build_common_end() {
|
||||
local name=$1
|
||||
|
||||
if ! cmake --build build; then
|
||||
echo "! Failed to build husky's ${name}!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! cd build; then
|
||||
echo "! Failed to change directory to build when trying to install ${name}!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! make install; then
|
||||
echo "! Failed to install husky's ${name}!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function _husky_build_common_start() {
|
||||
local name=$1
|
||||
local git_repo=$2
|
||||
|
||||
git_source "husky/${name}" "${git_repo}"
|
||||
|
||||
if ! cd "${ROOTDIR}/src/husky/${name}"; then
|
||||
echo "! Failed to change directory to husky's ${name} sources!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_husky_generate_version
|
||||
}
|
||||
|
||||
function _husky_generate_version() {
|
||||
echo "* Generating version file..."
|
||||
echo "char cvs_date[]=\"$(date +'%Y%m%d')-git\";" >"cvsdate.h"
|
||||
echo "* Version file: '$(cat cvsdate.h)'"
|
||||
}
|
156
scripts/husky_configure.sh
Normal file
156
scripts/husky_configure.sh
Normal file
@ -0,0 +1,156 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source "${ROOTDIR}/scripts/husky_vars.sh"
|
||||
|
||||
function husky_configure() {
|
||||
echo "* Configuring husky..."
|
||||
|
||||
mkdir -p "${_CONFIG_ROOT}/husky"
|
||||
|
||||
mkdir -p "${_DATA_ROOT}"/{announce,badarea,carbonarea,dupearea,fileecho,flags,inbound,magic,msgbasedir}
|
||||
mkdir -p "${_DATA_ROOT}"/{netmailarea,nodelist,outbound,protoinb,public,seq,tempinb,tempoutb,tics}
|
||||
|
||||
cat >"${_CONFIG_ROOT}/husky/husky.cfg" <<EOF
|
||||
Name ${MACHINE_NAME}
|
||||
Sysop ${REAL_NAME}
|
||||
Location ${LOCATION}
|
||||
Address ${FTN_ADDR}}@fidonet
|
||||
if "[module]"=="hpt"
|
||||
Origin High Portable Tosser
|
||||
else
|
||||
endif
|
||||
Inbound ${_DATA_ROOT}/inbound
|
||||
ProtInbound ${_DATA_ROOT}/protinb
|
||||
LocalInbound ${_DATA_ROOT}/localinb
|
||||
Outbound ${_DATA_ROOT}/outbound
|
||||
tempOutbound ${_DATA_ROOT}/tempoutb
|
||||
tempInbound ${_DATA_ROOT}/tempinb
|
||||
MsgBaseDir ${_DATA_ROOT}/msgbasedir
|
||||
public ${_DATA_ROOT}/public
|
||||
echotosslog ${_DATA_ROOT}/echotoss.log
|
||||
importlog ${_DATA_ROOT}/import.log
|
||||
logFileDir ${_DATA_ROOT}/
|
||||
DupeHistoryDir ${_DATA_ROOT}/msgbasedir
|
||||
NodelistDir ${_DATA_ROOT}/nodelist
|
||||
magic ${_DATA_ROOT}/magic
|
||||
lockfile ${_DATA_ROOT}/flags/hpt-lock
|
||||
AdvStatisticsFile ${_DATA_ROOT}/hpt-adv.sta
|
||||
NetmailFlag ${_DATA_ROOT}/flags/hpt-mail
|
||||
SEQDIR ${_DATA_ROOT}/seq
|
||||
AdvisoryLock 10
|
||||
LogLevels 134567890ABCDEFGJKLMNT
|
||||
LogEchoToScreen
|
||||
nodelist ${_DATA_ROOT}/nodelist
|
||||
LinkWithImportLog Kill
|
||||
#########################################################################
|
||||
# Так как hpt собран без поддержки архиваторов, то нужно установить
|
||||
# консольные zip, unzip, unrar
|
||||
# К примеру, использовать Macports - https://www.macports.org/
|
||||
# Что это такое можно узнать тут - https://ru.wikipedia.org/wiki/MacPorts
|
||||
#########################################################################
|
||||
Unpack "unzip -joLqq \$a -d \$p" 0 504b0304
|
||||
Pack zip zip -9jgq \$a \$f
|
||||
Unpack "unrar e -y -c- -o+ -inul \$a \$p \$f" 0 52617221
|
||||
LinkDefaults begin
|
||||
ArcmailSize 400
|
||||
PktSize 300
|
||||
allowEmptyPktPwd secure
|
||||
allowPktAddrDiffer off
|
||||
#########################################################################
|
||||
# Так как hpt собран без поддержки архиваторов, то нужно установить
|
||||
# консольные zip, unzip, unrar
|
||||
# К примеру, использовать Macports - https://www.macports.org/
|
||||
# Что это такое можно узнать тут - https://ru.wikipedia.org/wiki/MacPorts
|
||||
#########################################################################
|
||||
Packer zip
|
||||
Level 3000
|
||||
AccessGrp A
|
||||
ForwardRequests on
|
||||
AutoCreate on
|
||||
areafixName AreaFix
|
||||
EchomailFlavour Direct
|
||||
AutoAreaCreateSubdirs off
|
||||
filefixName FileFix
|
||||
FileEchoFlavour Normal
|
||||
AutoFileCreateSubdirs off
|
||||
LinkDefaults end
|
||||
Link ${UPLINK_NAME}
|
||||
Aka ${UPLINK_FTN}
|
||||
OurAKA ${FTN_ADDR}
|
||||
Password ${PASSWORD}
|
||||
AreafixAutoCreateDefaults -b Jam -dupeCheck move -dupeHistory 14
|
||||
AreafixAutoCreateFile ${_CONFIG_ROOT}/husky/areas.cfg
|
||||
FilefixAutoCreateFile ${_CONFIG_ROOT}/husky/fileareas.cfg
|
||||
LinkDefaults begin
|
||||
ArcmailSize 400
|
||||
PktSize 300
|
||||
allowEmptyPktPwd secure
|
||||
allowPktAddrDiffer off
|
||||
#########################################################################
|
||||
# Так как hpt собран без поддержки архиваторов, то нужно установить
|
||||
# консольные zip, unzip, unrar
|
||||
# К примеру, использовать Macports - https://www.macports.org/
|
||||
# Что это такое можно узнать тут - https://ru.wikipedia.org/wiki/MacPorts
|
||||
#########################################################################
|
||||
Packer zip
|
||||
Level 2500
|
||||
AccessGrp A,L
|
||||
ForwardRequests off
|
||||
AutoCreate off
|
||||
areafixName AreaFix
|
||||
EchomailFlavour Normal
|
||||
AutoAreaCreateSubdirs off
|
||||
filefixName FileFix
|
||||
FileEchoFlavour Hold
|
||||
AutoFileCreateSubdirs off
|
||||
LinkDefaults end
|
||||
include ${_CONFIG_ROOT}/husky/areas.cfg
|
||||
DupeBaseType HashDupesWMsgId
|
||||
SeparateBundles
|
||||
BundleNameStyle addrsCRC32
|
||||
DefArcmailSize 300
|
||||
ReportTo netmail
|
||||
CarbonOut off
|
||||
ExcludePassthroughCarbon
|
||||
CarbonExcludeFwdFrom off
|
||||
CarbonKeepSb
|
||||
route crash ${UPLINK_FTN} *
|
||||
fileAreaDefaults ${UPLINK_FTN}
|
||||
OriginInAnnounce
|
||||
ConvertLongNames Upper
|
||||
ConvertShortNames Upper
|
||||
FileDescName file_id.diz
|
||||
FileDescPos 13
|
||||
AnnounceSpool ${_DATA_ROOT}/announce
|
||||
SaveTic * ${_DATA_ROOT}/tics
|
||||
FileAreaBaseDir ${_DATA_ROOT}/fileecho
|
||||
PassFileAreaDir ${_DATA_ROOT}/fileecho
|
||||
Include ${_CONFIG_ROOT}/husky/fileareas.cfg
|
||||
if "[module]"=="htick"
|
||||
Origin High Portable Ticker
|
||||
endif
|
||||
EOF
|
||||
|
||||
cat >"${_CONFIG_ROOT}/husky/areas.cfg" <<EOF
|
||||
##################################################################
|
||||
# Has to be in the coding KOI8-R codepage
|
||||
##################################################################
|
||||
EchoAreaDefaults -b Jam -dupecheck move -dupehistory 11
|
||||
EchoAreaDefaults OFF
|
||||
NetmailArea NetmailArea ${_DATA_ROOT}/netmailarea -b msg -d "NetMail"
|
||||
BadArea BadArea ${_DATA_ROOT}/badarea -b msg -d "BadMail"
|
||||
DupeArea DupeArea ${_DATA_ROOT}/dupearea/dupearea -b Jam -d "DupeMail"
|
||||
dupebasetype HashDupes
|
||||
areasmaxdupeage 20
|
||||
LocalArea CarbonArea ${_DATA_ROOT}/carbonarea/carbonarea -b Jam -d "CarbonArea"
|
||||
CarbonTo ${REAL_NAME}
|
||||
CarbonCopy CarbonArea
|
||||
EOF
|
||||
|
||||
cat >"${_CONFIG_ROOT}/husky/fileareas.cfg" <<EOF
|
||||
#
|
||||
EOF
|
||||
|
||||
echo "* Husky configured."
|
||||
}
|
21
scripts/husky_vars.sh
Normal file
21
scripts/husky_vars.sh
Normal file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source "${ROOTDIR}/scripts/vars.sh"
|
||||
|
||||
_HUSKY_BIN_DIR="${ROOTDIR}/dist/husky"
|
||||
|
||||
_HUSKY_AREASTAT_GIT="https://github.com/huskyproject/areastat.git"
|
||||
_HUSKY_AREAFIX_GIT="https://github.com/huskyproject/areafix.git"
|
||||
_HUSKY_BSOPACK_GIT="https://github.com/huskyproject/bsopack.git"
|
||||
_HUSKY_FIDOCONF_GIT="https://github.com/huskyproject/fidoconf.git"
|
||||
_HUSKY_HPT_GIT="https://github.com/huskyproject/hpt.git"
|
||||
_HUSKY_HPTKILL_GIT="https://github.com/huskyproject/hptkill.git"
|
||||
_HUSKY_HPTSQFIX_GIT="https://github.com/huskyproject/hptsqfix.git"
|
||||
_HUSKY_HPTZIP_GIT="https://github.com/huskyproject/hptzip.git"
|
||||
_HUSKY_HTICK_GIT="https://github.com/huskyproject/htick.git"
|
||||
_HUSKY_HUSKYLIB_GIT="https://github.com/huskyproject/huskylib.git"
|
||||
_HUSKY_MSGED_GIT="https://github.com/huskyproject/msged.git"
|
||||
_HUSKY_NLTOOLS_GIT="https://github.com/huskyproject/nltools.git"
|
||||
_HUSKY_SMAPI_GIT="https://github.com/huskyproject/smapi.git"
|
||||
_HUSKY_SQPACK_GIT="https://github.com/huskyproject/sqpack.git"
|
19
scripts/sync.sh
Normal file
19
scripts/sync.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source "${ROOTDIR}/.config"
|
||||
source "${ROOTDIR}/scripts/binkd_vars.sh"
|
||||
source "${ROOTDIR}/scripts/husky_vars.sh"
|
||||
|
||||
function sync() {
|
||||
echo "* Syncing..."
|
||||
|
||||
"${_HUSKY_BIN_DIR}"/bin/hpt -c "${_CONFIG_ROOT}"/husky/husky.cfg scan
|
||||
"${_HUSKY_BIN_DIR}"/bin/hpt -c "${_CONFIG_ROOT}"/husky/husky.cfg pack
|
||||
|
||||
"${_BINKD_BIN_DIR}"/sbin/binkd -p -P "${UPLINK_FTN}" "${_CONFIG_ROOT}"/binkd.config
|
||||
"${_HUSKY_BIN_DIR}"/bin/hpt -c "${_CONFIG_ROOT}"/husky/husky.cfg toss
|
||||
"${_HUSKY_BIN_DIR}"/bin/hpt -c "${_CONFIG_ROOT}"/husky/husky.cfg link
|
||||
"${_HUSKY_BIN_DIR}"/bin/htick -c "${_CONFIG_ROOT}"/husky/husky.cfg toss
|
||||
"${_HUSKY_BIN_DIR}"/bin/htick -c "${_CONFIG_ROOT}"/husky/husky.cfg filelist "${_DATA_ROOT}"/fido/fileecho/filelist.txt
|
||||
}
|
14
scripts/vars.sh
Normal file
14
scripts/vars.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This file contains variables that is used everywhere (a.k.a "global" ones).
|
||||
_CONFIG_ROOT="${ROOTDIR}/data/configs"
|
||||
_DATA_ROOT="${ROOTDIR}/data/fido"
|
||||
|
||||
# Required for launching (for now).
|
||||
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib:/usr/lib64:${ROOTDIR}/dist/husky/lib"
|
||||
|
||||
# Load previous configuration values if fidoip was configured.
|
||||
if [ -f "${ROOTDIR}/.config" ]; then
|
||||
# shellcheck disable=SC1091
|
||||
source "${ROOTDIR}/.config"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user