mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #3016 from antonlacon/housekeeping
Various: Scattered trivial cleanups
This commit is contained in:
commit
f4dff4ccc9
3
.gitignore
vendored
3
.gitignore
vendored
@ -15,6 +15,9 @@ mkpkg-temp
|
||||
# private working directory
|
||||
/.work/
|
||||
|
||||
# dedicated filesystem
|
||||
/lost+found/
|
||||
|
||||
# symlinks...
|
||||
/sources
|
||||
/.work
|
||||
|
@ -671,17 +671,6 @@ install_addon_files() {
|
||||
create_addon_xml "$1"
|
||||
}
|
||||
|
||||
tolower() {
|
||||
echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
|
||||
}
|
||||
|
||||
require_eglibc() {
|
||||
if [ "$TARGET_LIBC" != eglibc ]; then
|
||||
echo "$1 requires eglibc, aborting."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
add_user() {
|
||||
# Usage: add_user "username" "password" "userid" "groupid" "description" "home" "shell"
|
||||
mkdir -p ${INSTALL}/etc
|
||||
|
@ -70,7 +70,7 @@ LINUX_DEPENDS="$PROJECT_DIR/$PROJECT/linux $PROJECT_DIR/$PROJECT/patches/linux $
|
||||
|
||||
# Need to point to your actual cc
|
||||
# If you have ccache installed, take care that LOCAL_CC don't point to it
|
||||
[ -z "${LOCAL_CC}" ] && export LOCAL_CC="$(which gcc)"
|
||||
[ -z "${LOCAL_CC}" ] && export LOCAL_CC="$(command -v gcc)"
|
||||
|
||||
if [ -z "$LOCAL_CC" ] ; then
|
||||
echo "***** Please install gcc *****"
|
||||
@ -79,15 +79,15 @@ fi
|
||||
|
||||
# Need to point to your actual g++
|
||||
# If you have ccache installed, take care that LOCAL_CXX don't point to it
|
||||
[ -z "${LOCAL_CXX}" ] && export LOCAL_CXX="$(which g++)"
|
||||
[ -z "${LOCAL_CXX}" ] && export LOCAL_CXX="$(command -v g++)"
|
||||
|
||||
# verbose compilation mode (yes/no)
|
||||
VERBOSE="${VERBOSE:-yes}"
|
||||
|
||||
# Concurrency make level (-j option)
|
||||
# Try value 1 (default) to 4 on single CPU computer, or more on
|
||||
# multi-processor computer (like hyperthreading SMP CPU)
|
||||
[ -z "${CONCURRENCY_MAKE_LEVEL}" ] && export CONCURRENCY_MAKE_LEVEL=$(grep -c '^processor[[:cntrl:]]*:' /proc/cpuinfo)
|
||||
# Try values between 1 and number of processor cores present.
|
||||
# default: use all cores
|
||||
[ -z "${CONCURRENCY_MAKE_LEVEL}" ] && export CONCURRENCY_MAKE_LEVEL=$(nproc)
|
||||
|
||||
# cache size for ccache
|
||||
# Set the maximum size of the files stored in the cache. You can specify a
|
||||
|
@ -96,7 +96,7 @@
|
||||
# Displayserver to use (x11 / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
||||
# Windowmanager to use (ratpoison / fluxbox / none)
|
||||
# Windowmanager to use (fluxbox / none)
|
||||
WINDOWMANAGER="none"
|
||||
|
||||
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)
|
||||
|
@ -8,7 +8,6 @@
|
||||
arm)
|
||||
# Valid TARGET_CPU for Raspberry Pi based devices are:
|
||||
# arm1176jzf-s cortex-a7 cortex-a53
|
||||
|
||||
if [ "$DEVICE" = "RPi" -o "$DEVICE" = "Slice" ]; then
|
||||
TARGET_CPU="arm1176jzf-s"
|
||||
elif [ "$DEVICE" = "RPi2" -o "$DEVICE" = "Slice3" ]; then
|
||||
@ -24,18 +23,16 @@
|
||||
# This specifies what floating point hardware (or hardware emulation) is
|
||||
# available on the target. Permissible names are:
|
||||
# vfp neon-vfpv4 neon-fp-armv8
|
||||
|
||||
if [ "$DEVICE" = "RPi" -o "$DEVICE" = "Slice" ]; then
|
||||
TARGET_FPU="vfp"
|
||||
elif [ "$DEVICE" = "RPi2" -o "$DEVICE" = "Slice3" ]; then
|
||||
TARGET_FPU="neon-vfpv4"
|
||||
fi
|
||||
TARGET_FEATURES="32bit"
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
# Bootloader to use (syslinux / u-boot / bcm2835-bootloader)
|
||||
# Bootloader to use (bcm2835-bootloader)
|
||||
BOOTLOADER="bcm2835-bootloader"
|
||||
|
||||
# u-boot version to use (default)
|
||||
@ -91,7 +88,6 @@ fi
|
||||
# SquashFS compression method (gzip / lzo / xz / zstd)
|
||||
SQUASHFS_COMPRESSION="lzo"
|
||||
|
||||
|
||||
################################################################################
|
||||
# setup project defaults
|
||||
################################################################################
|
||||
@ -102,7 +98,7 @@ fi
|
||||
# OpenGL(X) implementation to use (no / mesa)
|
||||
OPENGL="no"
|
||||
|
||||
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)
|
||||
# OpenGL-ES implementation to use (no / bcm2835-driver / mesa)
|
||||
OPENGLES="bcm2835-driver"
|
||||
|
||||
# include uvesafb support (yes / no)
|
||||
@ -111,18 +107,18 @@ fi
|
||||
# Displayserver to use (x11 / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
||||
# Windowmanager to use (ratpoison / fluxbox / none)
|
||||
# Windowmanager to use (fluxbox / none)
|
||||
WINDOWMANAGER="none"
|
||||
|
||||
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia)
|
||||
# Xorg Graphic drivers to use (all / vc4 / none)
|
||||
# Space separated list is supported,
|
||||
# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia"
|
||||
# e.g. GRAPHIC_DRIVERS="vc4"
|
||||
GRAPHIC_DRIVERS=""
|
||||
|
||||
# Use a vendor specific KODI repo
|
||||
KODI_VENDOR="raspberrypi"
|
||||
|
||||
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)
|
||||
# KODI Player implementation to use (default / bcm2835-driver / mesa)
|
||||
KODIPLAYER_DRIVER="bcm2835-driver"
|
||||
|
||||
# Modules to install in initramfs for early boot
|
||||
|
@ -41,7 +41,7 @@
|
||||
# Displayserver to use (weston / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
||||
# Windowmanager to use (ratpoison / fluxbox / none)
|
||||
# Windowmanager to use (fluxbox / none)
|
||||
WINDOWMANAGER="none"
|
||||
|
||||
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia)
|
||||
|
@ -103,7 +103,7 @@
|
||||
# Displayserver to use (x11 / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
||||
# Windowmanager to use (ratpoison / fluxbox / none)
|
||||
# Windowmanager to use (fluxbox / none)
|
||||
WINDOWMANAGER="none"
|
||||
|
||||
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)
|
||||
|
@ -100,7 +100,7 @@
|
||||
# Displayserver to use (x11 / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
||||
# Windowmanager to use (ratpoison / fluxbox / none)
|
||||
# Windowmanager to use (fluxbox / none)
|
||||
WINDOWMANAGER="none"
|
||||
|
||||
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia)
|
||||
|
@ -41,7 +41,7 @@ get_deps() {
|
||||
get_yes_no()
|
||||
{
|
||||
local ans
|
||||
read -p "Would you like to install the needed tools ? (y/n) " ans
|
||||
read -p "Would you like to install the needed tools? (y/n) " ans
|
||||
[ "${ans,,}" = "y" ] && return 0
|
||||
[ "${ans,,}" = "yes" ] && return 0
|
||||
return 1
|
||||
@ -132,34 +132,38 @@ if [ "${#need[@]}" -gt 0 ]; then
|
||||
done
|
||||
echo "**** You seem to use a $DISTRO system ****"
|
||||
|
||||
case "$DISTRO" in
|
||||
ubuntu|debian|linuxmint|\"elementary\")
|
||||
get_yes_no && sudo apt-get install "${need_pkg[@]}"
|
||||
;;
|
||||
fedora|centos|rhel)
|
||||
if [ $(which dnf) ]; then YUM=dnf; else YUM=yum; fi
|
||||
get_yes_no && sudo $YUM install "${need_pkg[@]}"
|
||||
;;
|
||||
gentoo)
|
||||
get_yes_no && sudo emerge --ask --deep "${need_pkg[@]}"
|
||||
;;
|
||||
sabayon)
|
||||
get_yes_no && sudo equo install --ask "${need_pkg[@]}"
|
||||
;;
|
||||
mageia)
|
||||
get_yes_no && sudo urpmi "${need_pkg[@]}"
|
||||
;;
|
||||
arch)
|
||||
get_yes_no && sudo pacman -Sy "${need_pkg[@]}"
|
||||
;;
|
||||
opensuse)
|
||||
get_yes_no && sudo zypper install -y --no-recommends "${need_pkg[@]}"
|
||||
;;
|
||||
*)
|
||||
echo "**** unsupported distro $DISTRO ****"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
if command -v sudo >/dev/null; then
|
||||
case "$DISTRO" in
|
||||
ubuntu|debian|linuxmint|\"elementary\")
|
||||
get_yes_no && sudo apt-get install "${need_pkg[@]}"
|
||||
;;
|
||||
fedora|centos|rhel)
|
||||
command -v dnf >/dev/null && YUM=dnf || YUM=yum
|
||||
get_yes_no && sudo $YUM install "${need_pkg[@]}"
|
||||
;;
|
||||
gentoo)
|
||||
get_yes_no && sudo emerge --ask --deep "${need_pkg[@]}"
|
||||
;;
|
||||
sabayon)
|
||||
get_yes_no && sudo equo install --ask "${need_pkg[@]}"
|
||||
;;
|
||||
mageia)
|
||||
get_yes_no && sudo urpmi "${need_pkg[@]}"
|
||||
;;
|
||||
arch)
|
||||
get_yes_no && sudo pacman -Sy "${need_pkg[@]}"
|
||||
;;
|
||||
opensuse)
|
||||
get_yes_no && sudo zypper install -y --no-recommends "${need_pkg[@]}"
|
||||
;;
|
||||
*)
|
||||
echo "**** unsupported distro $DISTRO ****"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "The command 'sudo' was not found. Please install necessary packages manually."
|
||||
fi
|
||||
fi
|
||||
|
||||
get_deps
|
||||
|
@ -1,36 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
echo "getting sources..."
|
||||
if [ ! -d lockdev.git ]; then
|
||||
git clone git://anonscm.debian.org/lockdev/lockdev.git -b master lockdev.git
|
||||
fi
|
||||
|
||||
cd lockdev.git
|
||||
git pull
|
||||
GIT_REV=`git log -n1 --format=%H`
|
||||
cd ..
|
||||
|
||||
echo "copying sources..."
|
||||
rm -rf lockdev-$GIT_REV
|
||||
cp -R lockdev.git lockdev-$GIT_REV
|
||||
|
||||
echo "creating VERSION and other needed files"
|
||||
(
|
||||
cd lockdev-$GIT_REV
|
||||
LC_ALL=C ./scripts/git-version > VERSION
|
||||
touch ChangeLog
|
||||
)
|
||||
|
||||
echo "cleaning sources..."
|
||||
rm -rf lockdev-$GIT_REV/.git
|
||||
|
||||
|
||||
echo "packing sources..."
|
||||
tar cvJf lockdev-$GIT_REV.tar.xz lockdev-$GIT_REV
|
||||
|
||||
echo "remove temporary sourcedir..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user