mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 22:26:42 +00:00
Merge pull request #2323 from MilhouseVH/le90_source_functions_options
buildsystem: source functions earlier, validate project/arch earlier, refactor show_config
This commit is contained in:
commit
7df2673df4
209
config/functions
209
config/functions
@ -165,11 +165,6 @@ reset_pkg_vars() {
|
||||
done
|
||||
[ -n "${vars}" ] && unset -v ${vars}
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
PKG_NAME="$1"
|
||||
PKG_SHORTDESC="$1 (autogenerated)"
|
||||
PKG_LONGDESC="$1 (autogenerated)"
|
||||
fi
|
||||
PKG_VERSION="0.0invalid"
|
||||
PKG_REV="0"
|
||||
PKG_ARCH="any"
|
||||
@ -189,12 +184,16 @@ kernel_version() {
|
||||
|
||||
# get kernel module dir
|
||||
get_module_dir() {
|
||||
basename $(ls -d $(get_build_dir linux)/.install_pkg/usr/lib/kernel-overlays/base/lib/modules/*)
|
||||
if [ -n "${_CACHED_KERNEL_MODULE_DIR}" ]; then
|
||||
echo "${_CACHED_KERNEL_MODULE_DIR}"
|
||||
else
|
||||
basename $(ls -d $(get_build_dir linux)/.install_pkg/usr/lib/kernel-overlays/base/lib/modules/*)
|
||||
fi
|
||||
}
|
||||
|
||||
# get base path to kernel modules and firmware
|
||||
get_kernel_overlay_dir() {
|
||||
echo "/usr/lib/kernel-overlays/${1:-base}"
|
||||
echo "usr/lib/kernel-overlays/${1:-base}"
|
||||
}
|
||||
|
||||
# get full path to kernel module dir
|
||||
@ -516,8 +515,30 @@ enable_service () {
|
||||
done
|
||||
}
|
||||
|
||||
init_package_cache() {
|
||||
local _ANCHOR="@?+?@" DIR
|
||||
|
||||
# If the package caches are unset, then populate them
|
||||
if [ -z "${_CACHE_PACKAGE_LOCAL+x}" -o -z "${_CACHE_PACKAGE_GLOBAL+x}" ]; then
|
||||
_CACHE_PACKAGE_LOCAL=""
|
||||
_CACHE_PACKAGE_GLOBAL=""
|
||||
|
||||
# cache project folder for a package
|
||||
for DIR in $(find $ROOT/projects/$PROJECT/packages -type d 2>/dev/null); do
|
||||
[ -r "$DIR/package.mk" ] && _CACHE_PACKAGE_LOCAL+="${DIR}${_ANCHOR}\n"
|
||||
done
|
||||
|
||||
# cache packages folder
|
||||
for DIR in $(find $ROOT/$PACKAGES -type d 2>/dev/null); do
|
||||
[ -r "$DIR/package.mk" ] && _CACHE_PACKAGE_GLOBAL+="${DIR}${_ANCHOR}\n"
|
||||
done
|
||||
|
||||
export _CACHE_PACKAGE_LOCAL _CACHE_PACKAGE_GLOBAL
|
||||
fi
|
||||
}
|
||||
|
||||
check_path() {
|
||||
dashes="==========================="
|
||||
dashes="==========================="
|
||||
if [ "${PWD##/usr}" != "${PWD}" ]; then
|
||||
check_pathmessage="$check_pathmessage\n $dashes$dashes$dashes"
|
||||
check_pathmessage="$check_pathmessage\n ERROR: You try to build inside /usr"
|
||||
@ -531,7 +552,7 @@ dashes="==========================="
|
||||
}
|
||||
|
||||
check_config() {
|
||||
dashes="==========================="
|
||||
dashes="==========================="
|
||||
if [ ! -d $PROJECT_DIR/$PROJECT ]; then
|
||||
check_project="$check_project\n $dashes$dashes$dashes"
|
||||
check_project="$check_project\n ERROR: Project not found, use a valid project or create a new config"
|
||||
@ -581,176 +602,6 @@ dashes="==========================="
|
||||
fi
|
||||
}
|
||||
|
||||
show_config() {
|
||||
# load graphic configuration
|
||||
get_graphicdrivers
|
||||
|
||||
dashes="==========================="
|
||||
config_message="$config_message\n $dashes$dashes$dashes"
|
||||
config_message="$config_message\n Configuration for $DISTRONAME ($([ "$OFFICIAL" = "yes" ] && echo "official" || echo "community"))"
|
||||
config_message="$config_message\n $dashes$dashes$dashes"
|
||||
|
||||
# Build options
|
||||
|
||||
config_message="$config_message\n\n Buildoptions:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - CPU (ARCH):\t\t\t\t $TARGET_CPU ($TARGET_ARCH)"
|
||||
config_message="$config_message\n - FLOAT:\t\t\t\t $TARGET_FLOAT"
|
||||
config_message="$config_message\n - FPU:\t\t\t\t\t $TARGET_FPU"
|
||||
config_message="$config_message\n - SIMD support:\t\t\t $SIMD_SUPPORT"
|
||||
config_message="$config_message\n - LTO (Link Time Optimization) support: $LTO_SUPPORT"
|
||||
config_message="$config_message\n - GOLD (Google Linker) Support:\t $GOLD_SUPPORT"
|
||||
config_message="$config_message\n - LLVM support:\t\t\t $LLVM_SUPPORT"
|
||||
|
||||
# config_message="$config_message\n - CFLAGS:\t $TARGET_CFLAGS"
|
||||
# config_message="$config_message\n - LDFLAGS:\t $TARGET_LDFLAGS"
|
||||
|
||||
# Graphic configuration
|
||||
|
||||
config_message="$config_message\n\n Graphic configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
if [ "$DISPLAYSERVER" = "x11" ] ; then
|
||||
config_message="$config_message\n - Xorg Graphic Drivers:\t\t $GRAPHIC_DRIVERS"
|
||||
config_message="$config_message\n - XORG Composite support:\t\t $COMPOSITE_SUPPORT"
|
||||
config_message="$config_message\n - WindowManager:\t\t\t $WINDOWMANAGER"
|
||||
fi
|
||||
config_message="$config_message\n - OpenGL (GLX) support (provider):\t $OPENGL_SUPPORT ($OPENGL)"
|
||||
config_message="$config_message\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)"
|
||||
config_message="$config_message\n - uvesafb support:\t\t\t $UVESAFB_SUPPORT"
|
||||
|
||||
# Hardware decoder support
|
||||
|
||||
config_message="$config_message\n\n Hardware decoder configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Kodi Player driver:\t\t\t $KODIPLAYER_DRIVER"
|
||||
config_message="$config_message\n - VAAPI Support:\t\t\t $VAAPI_SUPPORT"
|
||||
config_message="$config_message\n - VDPAU Support:\t\t\t $VDPAU_SUPPORT"
|
||||
|
||||
# Input device configuration
|
||||
|
||||
config_message="$config_message\n\n Input device configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Remote support:\t\t\t $REMOTE_SUPPORT"
|
||||
config_message="$config_message\n - ATV Remote support:\t\t\t $ATVCLIENT_SUPPORT"
|
||||
config_message="$config_message\n - CEC Adapter support:\t\t\t $CEC_SUPPORT"
|
||||
config_message="$config_message\n - CEC Framework support:\t\t\t $CEC_FRAMEWORK_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Joystick support:\t\t $JOYSTICK_SUPPORT"
|
||||
|
||||
# Misc. hardware configuration
|
||||
|
||||
config_message="$config_message\n\n Misc. hardware configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - ALSA support:\t\t\t $ALSA_SUPPORT"
|
||||
config_message="$config_message\n - Pulseaudio support:\t\t\t $PULSEAUDIO_SUPPORT"
|
||||
config_message="$config_message\n - Bluetooth support:\t\t\t $BLUETOOTH_SUPPORT"
|
||||
|
||||
for config_driver in $ADDITIONAL_DRIVERS; do
|
||||
config_message="$config_message\n - Include driver:\t\t\t $config_driver"
|
||||
done
|
||||
|
||||
if [ "$DRIVER_ADDONS_SUPPORT" = "yes" ]; then
|
||||
for config_driver_addons in $DRIVER_ADDONS; do
|
||||
config_message="$config_message\n - Include driver add-ons:\t\t $config_driver_addons"
|
||||
done
|
||||
fi
|
||||
|
||||
for config_firmware in $FIRMWARE; do
|
||||
config_message="$config_message\n - Include firmware:\t\t\t $config_firmware"
|
||||
done
|
||||
|
||||
for config_modules in $INITRAMFS_MODULES; do
|
||||
config_message="$config_message\n - Initramfs modules:\t\t\t $config_modules"
|
||||
done
|
||||
|
||||
# Network service configuration
|
||||
|
||||
config_message="$config_message\n\n Network service configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Avahi (Zeroconf) support:\t\t $AVAHI_DAEMON"
|
||||
config_message="$config_message\n - NFS mounting support:\t\t $NFS_SUPPORT"
|
||||
config_message="$config_message\n - SAMBA mounting support:\t\t $SAMBA_SUPPORT"
|
||||
config_message="$config_message\n - SAMBA server support:\t\t $SAMBA_SERVER"
|
||||
config_message="$config_message\n - SFTP server support:\t\t\t $SFTP_SERVER"
|
||||
config_message="$config_message\n - OpenVPN support:\t\t\t $OPENVPN_SUPPORT"
|
||||
|
||||
# OS configuration
|
||||
|
||||
config_message="$config_message\n\n OS configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - OEM Support:\t\t\t\t $OEM_SUPPORT"
|
||||
config_message="$config_message\n - Default ROOT Password:\t\t $ROOT_PASSWORD"
|
||||
config_message="$config_message\n - Bootloader:\t\t\t\t $BOOTLOADER"
|
||||
if [ "$BOOTLOADER" = "u-boot" ]; then
|
||||
config_message="$config_message\n - U-Boot configuration:\t\t $UBOOT_CONFIG"
|
||||
config_message="$config_message\n - U-Boot config file:\t\t $UBOOT_CONFIGFILE"
|
||||
fi
|
||||
config_message="$config_message\n - UDevil support:\t\t\t $UDEVIL"
|
||||
config_message="$config_message\n - Installer support:\t\t\t $INSTALLER_SUPPORT"
|
||||
|
||||
# Misc. Filesystems
|
||||
|
||||
config_message="$config_message\n\n Misc. Filesystems:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Swap Support:\t\t\t $SWAP_SUPPORT"
|
||||
if [ "$SWAP_SUPPORT" = "yes" ]; then
|
||||
config_message="$config_message\n - Swapfile default size:\t\t $SWAPFILESIZE"
|
||||
fi
|
||||
config_message="$config_message\n - exFAT Support (via Fuse):\t\t $EXFAT"
|
||||
config_message="$config_message\n - NTFS Support (via Fuse):\t\t $NTFS3G"
|
||||
config_message="$config_message\n - Install HFS Tools:\t\t\t $HFSTOOLS"
|
||||
|
||||
# Kodi configuration
|
||||
|
||||
config_message="$config_message\n\n Kodi configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Kodi version:\t\t\t $MEDIACENTER"
|
||||
config_message="$config_message\n - Kodi nonfree support:\t\t $KODI_NONFREE_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Blu-Ray support:\t\t $KODI_BLURAY_SUPPORT"
|
||||
if [ "$KODI_BLURAY_SUPPORT" = "yes" ] ; then
|
||||
config_message="$config_message\n - Bluray BD+ support:\t\t $BLURAY_BDPLUS_SUPPORT"
|
||||
config_message="$config_message\n - Bluray AACS support:\t\t $BLURAY_AACS_SUPPORT"
|
||||
fi
|
||||
config_message="$config_message\n - Kodi DVDCSS support:\t\t\t $KODI_DVDCSS_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Airplay support:\t\t $KODI_AIRPLAY_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Airtunes support:\t\t $KODI_AIRTUNES_SUPPORT"
|
||||
config_message="$config_message\n - Kodi NFS support:\t\t\t $KODI_NFS_SUPPORT"
|
||||
config_message="$config_message\n - Kodi MySQL support:\t\t\t $KODI_MYSQL_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Optical Drive support:\t\t $KODI_OPTICAL_SUPPORT"
|
||||
config_message="$config_message\n - Kodi SAMBA client support:\t\t $KODI_SAMBA_SUPPORT"
|
||||
config_message="$config_message\n - Kodi SSH client support:\t\t $KODI_SSHLIB_SUPPORT"
|
||||
config_message="$config_message\n - Kodi UPNP support:\t\t\t $KODI_UPNP_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Webserver support:\t\t $KODI_WEBSERVER_SUPPORT"
|
||||
|
||||
|
||||
for config_skin in $SKINS; do
|
||||
config_message="$config_message\n - Include Skin:\t\t\t $config_skin"
|
||||
done
|
||||
|
||||
config_message="$config_message\n - Default Skin:\t\t\t $SKIN_DEFAULT"
|
||||
config_message="$config_message\n - Include extra fonts:\t\t\t $KODI_EXTRA_FONTS"
|
||||
|
||||
if [ "$(type -t show_distro_config)" = "function" ]; then
|
||||
show_distro_config
|
||||
fi
|
||||
|
||||
config_message="$config_message\n"
|
||||
config_message="$config_message\n $dashes$dashes$dashes"
|
||||
config_message="$config_message\n End Configuration for $DISTRONAME"
|
||||
config_message="$config_message\n $dashes$dashes$dashes"
|
||||
config_message="$config_message\n\n\n"
|
||||
|
||||
echo -e "$config_message"
|
||||
}
|
||||
|
||||
# strip
|
||||
debug_strip() {
|
||||
if [ ! "$DEBUG" = yes ]; then
|
||||
|
@ -35,6 +35,9 @@ ROOT="${PWD}"
|
||||
DISTRO_DIR="$ROOT/distributions"
|
||||
PROJECT_DIR="$ROOT/projects"
|
||||
|
||||
# include helper functions
|
||||
. config/functions
|
||||
|
||||
# include versioning
|
||||
. config/version
|
||||
|
||||
@ -106,5 +109,8 @@ if [ "$OEM" = yes -o "$OEM" = no ]; then
|
||||
OEM_SUPPORT=$OEM
|
||||
fi
|
||||
|
||||
check_path >&2
|
||||
check_config >&2
|
||||
|
||||
. config/graphic
|
||||
. config/path $1
|
||||
|
166
config/path
166
config/path
@ -1,7 +1,5 @@
|
||||
set -e
|
||||
|
||||
. config/functions
|
||||
|
||||
# setup initial directorys (relative to root)
|
||||
CONFIG=config
|
||||
SCRIPTS=scripts
|
||||
@ -54,36 +52,32 @@ SED="sed -i"
|
||||
|
||||
unset LD_LIBRARY_PATH
|
||||
|
||||
# If the package caches are unset, then populate them
|
||||
init_package_cache
|
||||
|
||||
# set package metadata
|
||||
reset_pkg_vars "$1"
|
||||
reset_pkg_vars "$1"
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
_PKG_ROOT_NAME=${1%:*}
|
||||
_ALL_DIRS=""
|
||||
_FOUND=0
|
||||
_ANCHOR="@?+?@"
|
||||
PKG_DIR=""
|
||||
if [ -n "$1" ]; then
|
||||
_PKG_ROOT_NAME=${1%:*}
|
||||
_ALL_DIRS=""
|
||||
_FOUND=0
|
||||
_ANCHOR="@?+?@"
|
||||
PKG_DIR=""
|
||||
|
||||
# If the package caches are unset, then populate them
|
||||
if [ -z "${_CACHE_PACKAGE_LOCAL+x}" -o -z "${_CACHE_PACKAGE_GLOBAL+x}" ]; then
|
||||
_CACHE_PACKAGE_LOCAL=""
|
||||
_CACHE_PACKAGE_GLOBAL=""
|
||||
# Check for any available local package in preference to a global package
|
||||
for DIR in $(echo -e "${_CACHE_PACKAGE_LOCAL}" | grep -F "/${_PKG_ROOT_NAME}${_ANCHOR}"); do
|
||||
DIR="${DIR%${_ANCHOR}}"
|
||||
# found first, set $PKG_DIR
|
||||
PKG_DIR="$DIR"
|
||||
# keep track of dirs with package.mk for detecting multiple folders
|
||||
_ALL_DIRS+="${DIR}\n"
|
||||
_FOUND=$((_FOUND+1))
|
||||
done
|
||||
|
||||
# cache project folder for a package
|
||||
for DIR in $(find $ROOT/projects/$PROJECT/packages -type d 2>/dev/null); do
|
||||
[ -r "$DIR/package.mk" ] && _CACHE_PACKAGE_LOCAL+="${DIR}${_ANCHOR}\n"
|
||||
done
|
||||
|
||||
# cache packages folder
|
||||
for DIR in $(find $ROOT/$PACKAGES -type d 2>/dev/null); do
|
||||
[ -r "$DIR/package.mk" ] && _CACHE_PACKAGE_GLOBAL+="${DIR}${_ANCHOR}\n"
|
||||
done
|
||||
|
||||
export _CACHE_PACKAGE_LOCAL _CACHE_PACKAGE_GLOBAL
|
||||
fi
|
||||
|
||||
# Check for any available local package in preference to a global package
|
||||
for DIR in $(echo -e "${_CACHE_PACKAGE_LOCAL}" | grep -F "/${_PKG_ROOT_NAME}${_ANCHOR}"); do
|
||||
# If there's no local package available, use the global package
|
||||
if [ $_FOUND -eq 0 ]; then
|
||||
for DIR in $(echo -e "${_CACHE_PACKAGE_GLOBAL}" | grep -F "/${_PKG_ROOT_NAME}${_ANCHOR}"); do
|
||||
DIR="${DIR%${_ANCHOR}}"
|
||||
# found first, set $PKG_DIR
|
||||
PKG_DIR="$DIR"
|
||||
@ -91,69 +85,61 @@ unset LD_LIBRARY_PATH
|
||||
_ALL_DIRS+="${DIR}\n"
|
||||
_FOUND=$((_FOUND+1))
|
||||
done
|
||||
|
||||
# If there's no local package available, use the global package
|
||||
if [ $_FOUND -eq 0 ]; then
|
||||
for DIR in $(echo -e "${_CACHE_PACKAGE_GLOBAL}" | grep -F "/${_PKG_ROOT_NAME}${_ANCHOR}"); do
|
||||
DIR="${DIR%${_ANCHOR}}"
|
||||
# found first, set $PKG_DIR
|
||||
PKG_DIR="$DIR"
|
||||
# keep track of dirs with package.mk for detecting multiple folders
|
||||
_ALL_DIRS+="${DIR}\n"
|
||||
_FOUND=$((_FOUND+1))
|
||||
done
|
||||
fi
|
||||
|
||||
# _FOUND multiple packages? fail
|
||||
if [ $_FOUND -gt 1 ]; then
|
||||
echo "Error - multiple package folders:"
|
||||
echo -e "$_ALL_DIRS"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$PKG_DIR" -a -r $PKG_DIR/package.mk ]; then
|
||||
. $PKG_DIR/package.mk
|
||||
# _FOUND multiple packages? fail
|
||||
if [ $_FOUND -gt 1 ]; then
|
||||
echo "Error - multiple package folders:"
|
||||
echo -e "$_ALL_DIRS"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$PKG_IS_ADDON" = "yes" ] ; then
|
||||
[ -z $PKG_SECTION ] && PKG_ADDON_ID="$PKG_NAME" || PKG_ADDON_ID="${PKG_SECTION//\//.}.$PKG_NAME"
|
||||
[ "$PKG_ADDON_IS_STANDALONE" != "yes" ] && PKG_NEED_UNPACK="${PKG_NEED_UNPACK} $(get_pkg_directory $MEDIACENTER)"
|
||||
if [ -n "$PKG_DIR" -a -r $PKG_DIR/package.mk ]; then
|
||||
unset -f configure_package
|
||||
. $PKG_DIR/package.mk
|
||||
[ -z "$PKG_SHORTDESC" ] && PKG_SHORTDESC="$PKG_NAME (autogenerated)"
|
||||
[ -z "$PKG_LONGDESC" ] && PKG_LONGDESC="$PKG_NAME (autogenerated)"
|
||||
fi
|
||||
|
||||
if [ "$PKG_IS_ADDON" = "yes" ] ; then
|
||||
[ -z $PKG_SECTION ] && PKG_ADDON_ID="$PKG_NAME" || PKG_ADDON_ID="${PKG_SECTION//\//.}.$PKG_NAME"
|
||||
[ "$PKG_ADDON_IS_STANDALONE" != "yes" ] && PKG_NEED_UNPACK="${PKG_NEED_UNPACK} $(get_pkg_directory $MEDIACENTER)"
|
||||
fi
|
||||
|
||||
# Automatically set PKG_SOURCE_NAME unless it is already defined.
|
||||
# PKG_SOURCE_NAME will be automatically set to a name based on
|
||||
# the $PKG_NAME-$PKG_VERSION convention.
|
||||
#
|
||||
# Any $PKG_URL that references more than a single url will abort
|
||||
# the build as these are no longer supported - use mkpkg instead.
|
||||
if [ -n "$PKG_URL" -a -z "$PKG_SOURCE_NAME" ]; then
|
||||
if [[ $PKG_URL =~ .*\ .* ]]; then
|
||||
echo "Error - packages with multiple urls are no longer supported, use mkpkg:"
|
||||
echo "$PKG_URL"
|
||||
exit 1
|
||||
fi
|
||||
PKG_SOURCE_NAME="${PKG_URL##*/}"
|
||||
case $PKG_SOURCE_NAME in
|
||||
${PKG_NAME}-${PKG_VERSION}.*)
|
||||
PKG_SOURCE_NAME=$PKG_SOURCE_NAME
|
||||
;;
|
||||
*.tar | *.tbz | *.tgz | *.txz | *.7z | *.zip)
|
||||
PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.${PKG_SOURCE_NAME##*\.}
|
||||
;;
|
||||
*.tar.bz2 | *.tar.gz | *.tar.xz)
|
||||
PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.tar.${PKG_SOURCE_NAME##*\.}
|
||||
;;
|
||||
*.diff | *.patch | *.diff.bz2 | *.patch.bz2 | patch-*.bz2 | *.diff.gz | *.patch.gz | patch-*.gz)
|
||||
PKG_SOURCE_NAME=$PKG_SOURCE_NAME
|
||||
;;
|
||||
*)
|
||||
PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.${PKG_SOURCE_NAME##*\.}
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Automatically set PKG_SOURCE_NAME unless it is already defined.
|
||||
# PKG_SOURCE_NAME will be automatically set to a name based on
|
||||
# the $PKG_NAME-$PKG_VERSION convention.
|
||||
#
|
||||
# Any $PKG_URL that references more than a single url will abort
|
||||
# the build as these are no longer supported - use mkpkg instead.
|
||||
if [ -n "$PKG_URL" -a -z "$PKG_SOURCE_NAME" ]; then
|
||||
if [[ $PKG_URL =~ .*\ .* ]]; then
|
||||
echo "Error - packages with multiple urls are no longer supported, use mkpkg:"
|
||||
echo "$PKG_URL"
|
||||
exit 1
|
||||
fi
|
||||
PKG_SOURCE_NAME="${PKG_URL##*/}"
|
||||
case $PKG_SOURCE_NAME in
|
||||
${PKG_NAME}-${PKG_VERSION}.*)
|
||||
PKG_SOURCE_NAME=$PKG_SOURCE_NAME
|
||||
;;
|
||||
*.tar | *.tbz | *.tgz | *.txz | *.7z | *.zip)
|
||||
PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.${PKG_SOURCE_NAME##*\.}
|
||||
;;
|
||||
*.tar.bz2 | *.tar.gz | *.tar.xz)
|
||||
PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.tar.${PKG_SOURCE_NAME##*\.}
|
||||
;;
|
||||
*.diff | *.patch | *.diff.bz2 | *.patch.bz2 | patch-*.bz2 | *.diff.gz | *.patch.gz | patch-*.gz)
|
||||
PKG_SOURCE_NAME=$PKG_SOURCE_NAME
|
||||
;;
|
||||
*)
|
||||
PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.${PKG_SOURCE_NAME##*\.}
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
PKG_BUILD="$BUILD/${PKG_NAME}-${PKG_VERSION}"
|
||||
PKG_BUILD="$BUILD/${PKG_NAME}-${PKG_VERSION}"
|
||||
|
||||
XORG_PATH_DRI=/usr/lib/dri
|
||||
XORG_PATH_XKB=/usr/share/X11/xkb
|
||||
@ -175,9 +161,6 @@ fi
|
||||
|
||||
VERSION_SUFFIX=$TARGET_ARCH
|
||||
|
||||
check_path
|
||||
check_config
|
||||
|
||||
SILENT_OUT=3
|
||||
VERBOSE_OUT=4
|
||||
if [ "$VERBOSE" = yes ]; then
|
||||
@ -210,6 +193,13 @@ if [ "$DISABLE_COLORS" != "yes" ]; then
|
||||
endcolor="\e[0m"
|
||||
fi
|
||||
|
||||
# If sourcing a package, configure any package variables dependent on variables we have set
|
||||
if [ -n "$PKG_DIR" -a -r $PKG_DIR/package.mk ]; then
|
||||
if [ "$(type -t configure_package)" = "function" ]; then
|
||||
configure_package
|
||||
fi
|
||||
fi
|
||||
|
||||
# multilib? nah
|
||||
unset CONFIG_SITE
|
||||
|
||||
|
168
config/show_config
Normal file
168
config/show_config
Normal file
@ -0,0 +1,168 @@
|
||||
show_config() {
|
||||
# load graphic configuration
|
||||
get_graphicdrivers
|
||||
|
||||
dashes="==========================="
|
||||
config_message="$config_message\n $dashes$dashes$dashes"
|
||||
config_message="$config_message\n Configuration for $DISTRONAME ($([ "$OFFICIAL" = "yes" ] && echo "official" || echo "community"))"
|
||||
config_message="$config_message\n $dashes$dashes$dashes"
|
||||
|
||||
# Build options
|
||||
|
||||
config_message="$config_message\n\n Buildoptions:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - CPU (ARCH):\t\t\t\t $TARGET_CPU ($TARGET_ARCH)"
|
||||
config_message="$config_message\n - FLOAT:\t\t\t\t $TARGET_FLOAT"
|
||||
config_message="$config_message\n - FPU:\t\t\t\t\t $TARGET_FPU"
|
||||
config_message="$config_message\n - SIMD support:\t\t\t $SIMD_SUPPORT"
|
||||
config_message="$config_message\n - LTO (Link Time Optimization) support: $LTO_SUPPORT"
|
||||
config_message="$config_message\n - GOLD (Google Linker) Support:\t $GOLD_SUPPORT"
|
||||
config_message="$config_message\n - LLVM support:\t\t\t $LLVM_SUPPORT"
|
||||
|
||||
# config_message="$config_message\n - CFLAGS:\t $TARGET_CFLAGS"
|
||||
# config_message="$config_message\n - LDFLAGS:\t $TARGET_LDFLAGS"
|
||||
|
||||
# Graphic configuration
|
||||
|
||||
config_message="$config_message\n\n Graphic configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
if [ "$DISPLAYSERVER" = "x11" ] ; then
|
||||
config_message="$config_message\n - Xorg Graphic Drivers:\t\t $GRAPHIC_DRIVERS"
|
||||
config_message="$config_message\n - XORG Composite support:\t\t $COMPOSITE_SUPPORT"
|
||||
config_message="$config_message\n - WindowManager:\t\t\t $WINDOWMANAGER"
|
||||
fi
|
||||
config_message="$config_message\n - OpenGL (GLX) support (provider):\t $OPENGL_SUPPORT ($OPENGL)"
|
||||
config_message="$config_message\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)"
|
||||
config_message="$config_message\n - uvesafb support:\t\t\t $UVESAFB_SUPPORT"
|
||||
|
||||
# Hardware decoder support
|
||||
|
||||
config_message="$config_message\n\n Hardware decoder configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Kodi Player driver:\t\t\t $KODIPLAYER_DRIVER"
|
||||
config_message="$config_message\n - VAAPI Support:\t\t\t $VAAPI_SUPPORT"
|
||||
config_message="$config_message\n - VDPAU Support:\t\t\t $VDPAU_SUPPORT"
|
||||
|
||||
# Input device configuration
|
||||
|
||||
config_message="$config_message\n\n Input device configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Remote support:\t\t\t $REMOTE_SUPPORT"
|
||||
config_message="$config_message\n - ATV Remote support:\t\t\t $ATVCLIENT_SUPPORT"
|
||||
config_message="$config_message\n - CEC Adapter support:\t\t\t $CEC_SUPPORT"
|
||||
config_message="$config_message\n - CEC Framework support:\t\t $CEC_FRAMEWORK_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Joystick support:\t\t $JOYSTICK_SUPPORT"
|
||||
|
||||
# Misc. hardware configuration
|
||||
|
||||
config_message="$config_message\n\n Misc. hardware configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - ALSA support:\t\t\t $ALSA_SUPPORT"
|
||||
config_message="$config_message\n - Pulseaudio support:\t\t\t $PULSEAUDIO_SUPPORT"
|
||||
config_message="$config_message\n - Bluetooth support:\t\t\t $BLUETOOTH_SUPPORT"
|
||||
|
||||
for config_driver in $ADDITIONAL_DRIVERS; do
|
||||
config_message="$config_message\n - Include driver:\t\t\t $config_driver"
|
||||
done
|
||||
|
||||
if [ "$DRIVER_ADDONS_SUPPORT" = "yes" ]; then
|
||||
for config_driver_addons in $DRIVER_ADDONS; do
|
||||
config_message="$config_message\n - Include driver add-ons:\t\t $config_driver_addons"
|
||||
done
|
||||
fi
|
||||
|
||||
for config_firmware in $FIRMWARE; do
|
||||
config_message="$config_message\n - Include firmware:\t\t\t $config_firmware"
|
||||
done
|
||||
|
||||
for config_modules in $INITRAMFS_MODULES; do
|
||||
config_message="$config_message\n - Initramfs modules:\t\t\t $config_modules"
|
||||
done
|
||||
|
||||
# Network service configuration
|
||||
|
||||
config_message="$config_message\n\n Network service configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Avahi (Zeroconf) support:\t\t $AVAHI_DAEMON"
|
||||
config_message="$config_message\n - NFS mounting support:\t\t $NFS_SUPPORT"
|
||||
config_message="$config_message\n - SAMBA mounting support:\t\t $SAMBA_SUPPORT"
|
||||
config_message="$config_message\n - SAMBA server support:\t\t $SAMBA_SERVER"
|
||||
config_message="$config_message\n - SFTP server support:\t\t\t $SFTP_SERVER"
|
||||
config_message="$config_message\n - OpenVPN support:\t\t\t $OPENVPN_SUPPORT"
|
||||
|
||||
# OS configuration
|
||||
|
||||
config_message="$config_message\n\n OS configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - OEM Support:\t\t\t\t $OEM_SUPPORT"
|
||||
config_message="$config_message\n - Default ROOT Password:\t\t $ROOT_PASSWORD"
|
||||
config_message="$config_message\n - Bootloader:\t\t\t\t $BOOTLOADER"
|
||||
if [ "$BOOTLOADER" = "u-boot" ]; then
|
||||
config_message="$config_message\n - U-Boot configuration:\t\t $UBOOT_CONFIG"
|
||||
config_message="$config_message\n - U-Boot config file:\t\t $UBOOT_CONFIGFILE"
|
||||
fi
|
||||
config_message="$config_message\n - UDevil support:\t\t\t $UDEVIL"
|
||||
config_message="$config_message\n - Installer support:\t\t\t $INSTALLER_SUPPORT"
|
||||
|
||||
# Misc. Filesystems
|
||||
|
||||
config_message="$config_message\n\n Misc. Filesystems:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Swap Support:\t\t\t $SWAP_SUPPORT"
|
||||
if [ "$SWAP_SUPPORT" = "yes" ]; then
|
||||
config_message="$config_message\n - Swapfile default size:\t\t $SWAPFILESIZE"
|
||||
fi
|
||||
config_message="$config_message\n - exFAT Support (via Fuse):\t\t $EXFAT"
|
||||
config_message="$config_message\n - NTFS Support (via Fuse):\t\t $NTFS3G"
|
||||
config_message="$config_message\n - Install HFS Tools:\t\t\t $HFSTOOLS"
|
||||
|
||||
# Kodi configuration
|
||||
|
||||
config_message="$config_message\n\n Kodi configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Kodi version:\t\t\t $MEDIACENTER"
|
||||
config_message="$config_message\n - Kodi nonfree support:\t\t $KODI_NONFREE_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Blu-Ray support:\t\t $KODI_BLURAY_SUPPORT"
|
||||
if [ "$KODI_BLURAY_SUPPORT" = "yes" ] ; then
|
||||
config_message="$config_message\n - Bluray BD+ support:\t\t $BLURAY_BDPLUS_SUPPORT"
|
||||
config_message="$config_message\n - Bluray AACS support:\t\t $BLURAY_AACS_SUPPORT"
|
||||
fi
|
||||
config_message="$config_message\n - Kodi DVDCSS support:\t\t\t $KODI_DVDCSS_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Airplay support:\t\t $KODI_AIRPLAY_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Airtunes support:\t\t $KODI_AIRTUNES_SUPPORT"
|
||||
config_message="$config_message\n - Kodi NFS support:\t\t\t $KODI_NFS_SUPPORT"
|
||||
config_message="$config_message\n - Kodi MySQL support:\t\t\t $KODI_MYSQL_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Optical Drive support:\t\t $KODI_OPTICAL_SUPPORT"
|
||||
config_message="$config_message\n - Kodi SAMBA client support:\t\t $KODI_SAMBA_SUPPORT"
|
||||
config_message="$config_message\n - Kodi SSH client support:\t\t $KODI_SSHLIB_SUPPORT"
|
||||
config_message="$config_message\n - Kodi UPNP support:\t\t\t $KODI_UPNP_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Webserver support:\t\t $KODI_WEBSERVER_SUPPORT"
|
||||
|
||||
for config_skin in $SKINS; do
|
||||
config_message="$config_message\n - Include Skin:\t\t\t $config_skin"
|
||||
done
|
||||
|
||||
config_message="$config_message\n - Default Skin:\t\t\t $SKIN_DEFAULT"
|
||||
config_message="$config_message\n - Include extra fonts:\t\t\t $KODI_EXTRA_FONTS"
|
||||
|
||||
if [ "$(type -t show_distro_config)" = "function" ]; then
|
||||
show_distro_config
|
||||
fi
|
||||
|
||||
config_message="$config_message\n"
|
||||
config_message="$config_message\n $dashes$dashes$dashes"
|
||||
config_message="$config_message\n End Configuration for $DISTRONAME"
|
||||
config_message="$config_message\n $dashes$dashes$dashes"
|
||||
config_message="$config_message\n\n\n"
|
||||
|
||||
echo -e "$config_message"
|
||||
}
|
@ -80,6 +80,7 @@ rm -f $STAMP
|
||||
setup_toolchain $TARGET
|
||||
|
||||
# unset functions
|
||||
unset -f configure_package
|
||||
unset -f pre_build_target
|
||||
unset -f pre_configure_target
|
||||
unset -f configure_target
|
||||
@ -207,6 +208,11 @@ BOOTSTRAP_MESON_OPTS="$HOST_MESON_OPTS"
|
||||
# include buildfile
|
||||
. $PKG_DIR/package.mk
|
||||
|
||||
# finalise package configuration
|
||||
if [ "$(type -t configure_package)" = "function" ]; then
|
||||
configure_package
|
||||
fi
|
||||
|
||||
if [ "$PKG_IS_KERNEL_PKG" = "yes" ]; then
|
||||
if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then
|
||||
TARGET_PREFIX=$TOOLCHAIN/lib/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu-
|
||||
|
@ -18,7 +18,7 @@
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. config/options $1
|
||||
. config/options ""
|
||||
|
||||
get_deps() {
|
||||
need=()
|
||||
|
@ -20,8 +20,9 @@
|
||||
|
||||
unset _CACHE_PACKAGE_LOCAL _CACHE_PACKAGE_GLOBAL
|
||||
|
||||
. config/options $1
|
||||
. config/options ""
|
||||
|
||||
. config/show_config
|
||||
show_config
|
||||
|
||||
setup_toolchain target
|
||||
@ -148,7 +149,10 @@ ln -sf /etc/issue $INSTALL/etc/motd
|
||||
# Basissystem...
|
||||
$SCRIPTS/install libc
|
||||
$SCRIPTS/install gcc
|
||||
|
||||
$SCRIPTS/install linux
|
||||
export _CACHED_KERNEL_MODULE_DIR="$(get_module_dir)"
|
||||
|
||||
$SCRIPTS/install linux-drivers
|
||||
$SCRIPTS/install linux-firmware
|
||||
$SCRIPTS/install $BOOTLOADER
|
||||
|
Loading…
x
Reference in New Issue
Block a user