Extract package versions into a single versions.sh file
All hardcoded versions are now defined once in versions.sh and sourced by build-toolchain.sh, download_prerequisites.sh, and build-libraries.sh, eliminating the need to update multiple files when changing a version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
source "$(dirname "$0")/versions.sh"
|
||||
|
||||
# Подготавливаем переменные
|
||||
|
||||
TOP="$(pwd)"
|
||||
@@ -80,7 +82,7 @@ cd ${TOP}
|
||||
export CFLAGS=""
|
||||
export CXXFLAGS=""
|
||||
|
||||
cd "${LIB_BUILD_DIR}/zlib-1.2.13"
|
||||
cd "${LIB_BUILD_DIR}/zlib-${ZLIB_VER}"
|
||||
./configure --prefix=${SYSROOT_USR_DIR} --libdir=${SYSROOT_USR_DIR}/lib --static
|
||||
make -j$(nproc)
|
||||
make install
|
||||
@@ -92,7 +94,7 @@ cd ${TOP}
|
||||
export CFLAGS=""
|
||||
export CXXFLAGS=""
|
||||
|
||||
cd "${LIB_BUILD_DIR}/openssl-3.0.13"
|
||||
cd "${LIB_BUILD_DIR}/openssl-${OPENSSL_VER}"
|
||||
./Configure linux-armv4 \
|
||||
--prefix=${SYSROOT_USR_DIR} \
|
||||
--libdir=${SYSROOT_USR_DIR}/lib \
|
||||
@@ -110,7 +112,7 @@ make install_sw
|
||||
|
||||
# ==================================================================
|
||||
|
||||
cd "${LIB_BUILD_DIR}/LibVNCServer-0.9.14"
|
||||
cd "${LIB_BUILD_DIR}/LibVNCServer-${LIBVNCSERVER_VER}"
|
||||
rm -rf build
|
||||
mkdir -p build && cd build
|
||||
cmake -S .. -B . \
|
||||
@@ -146,7 +148,7 @@ make install
|
||||
|
||||
# ==================================================================
|
||||
|
||||
cd "${LIB_BUILD_DIR}/freetype-2.13.2"
|
||||
cd "${LIB_BUILD_DIR}/freetype-${FREETYPE_VER}"
|
||||
[ -d "build" ] && rm -rf build
|
||||
mkdir -p build && cd build
|
||||
cmake -S .. -B . \
|
||||
|
||||
@@ -12,10 +12,7 @@ PKG_UCLIBC="uClibc-ng"
|
||||
# ==================================================================
|
||||
# Версии пакетов
|
||||
# ==================================================================
|
||||
BINUTILS_VER="2.42"
|
||||
GCC_VER="13.4.0"
|
||||
LINUX_VER="4.9.224"
|
||||
UCLIBC_VER="1.0.55"
|
||||
source "$(dirname "$0")/versions.sh"
|
||||
|
||||
# ==================================================================
|
||||
# Основные параметры тулчейна
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname "$0")/versions.sh"
|
||||
|
||||
# Создаем папки для исходников
|
||||
mkdir -p src/toolchain src/libs
|
||||
|
||||
@@ -32,18 +34,18 @@ download_files() {
|
||||
|
||||
# Исходники тулчейна
|
||||
toolchain_files=(
|
||||
"https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz"
|
||||
"https://ftp.gnu.org/gnu/gcc/gcc-13.4.0/gcc-13.4.0.tar.xz"
|
||||
"https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.224.tar.xz"
|
||||
"https://downloads.uclibc-ng.org/releases/1.0.55/uClibc-ng-1.0.55.tar.xz"
|
||||
"https://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VER}.tar.xz"
|
||||
"https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VER}/gcc-${GCC_VER}.tar.xz"
|
||||
"https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${LINUX_VER}.tar.xz"
|
||||
"https://downloads.uclibc-ng.org/releases/${UCLIBC_VER}/uClibc-ng-${UCLIBC_VER}.tar.xz"
|
||||
)
|
||||
|
||||
# Исходники библиотек
|
||||
libs_files=(
|
||||
"https://download.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.gz"
|
||||
"https://github.com/LibVNC/libvncserver/archive/LibVNCServer-0.9.14.tar.gz"
|
||||
"https://www.openssl.org/source/openssl-3.0.13.tar.gz"
|
||||
"https://zlib.net/fossils/zlib-1.2.13.tar.gz"
|
||||
"https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VER}.tar.gz"
|
||||
"https://github.com/LibVNC/libvncserver/archive/LibVNCServer-${LIBVNCSERVER_VER}.tar.gz"
|
||||
"https://www.openssl.org/source/openssl-${OPENSSL_VER}.tar.gz"
|
||||
"https://zlib.net/fossils/zlib-${ZLIB_VER}.tar.gz"
|
||||
)
|
||||
|
||||
echo "=== Загрузка исходников тулчейна в 'src/toolchain' ==="
|
||||
|
||||
15
versions.sh
Normal file
15
versions.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
# ==================================================================
|
||||
# Версии компонентов тулчейна
|
||||
# ==================================================================
|
||||
BINUTILS_VER="2.42"
|
||||
GCC_VER="13.4.0"
|
||||
LINUX_VER="4.9.224"
|
||||
UCLIBC_VER="1.0.34"
|
||||
|
||||
# ==================================================================
|
||||
# Версии библиотек
|
||||
# ==================================================================
|
||||
ZLIB_VER="1.2.13"
|
||||
OPENSSL_VER="3.0.13"
|
||||
LIBVNCSERVER_VER="0.9.14"
|
||||
FREETYPE_VER="2.13.2"
|
||||
Reference in New Issue
Block a user