Compare commits
6 Commits
e5b312d25b
...
daac2a139c
| Author | SHA1 | Date | |
|---|---|---|---|
| daac2a139c | |||
| 9897e766be | |||
| ab7f382a1f | |||
| 94353b2b25 | |||
| fb81bdd398 | |||
| 0fc45c80b5 |
28
installJRMC
28
installJRMC
@@ -22,7 +22,7 @@
|
||||
# shellcheck disable=SC2329
|
||||
shopt -s extglob
|
||||
|
||||
declare -g SCRIPT_VERSION="1.36.1"
|
||||
declare -g SCRIPT_VERSION="1.36.2"
|
||||
declare -g MC_VERSION_HARDCODE="36.0.20" # do find all replace
|
||||
declare -g MC_REPO_HARDCODE="bookworm" # should match the MC_VERSION_HARDCODE
|
||||
declare -g BOARD_ID="95.0" # MC36 board ID for fallback latest version detection
|
||||
@@ -304,8 +304,9 @@ init() {
|
||||
# Detect host architecture and translate to MC convention
|
||||
if ARCH=$(uname -m); then
|
||||
case $ARCH in
|
||||
x86_64) MC_ARCH="amd64" ;;
|
||||
aarch64) MC_ARCH="arm64" ;;
|
||||
x86_64|amd64) MC_ARCH="amd64" ;;
|
||||
aarch64|arm64) MC_ARCH="arm64" ;;
|
||||
armv8l|armv7*|armv6*) MC_ARCH="armhf" ;;
|
||||
*) MC_ARCH="$ARCH" ;;
|
||||
esac
|
||||
else
|
||||
@@ -327,10 +328,9 @@ init() {
|
||||
|
||||
# Normalize ID and set OS defaults
|
||||
case $ID in
|
||||
debian|fedora|centos) ;;
|
||||
debian|raspbian|fedora|centos) ;;
|
||||
rhel|almalinux) ID="centos" ;;
|
||||
linuxmint|neon|zorin|*ubuntu*) ID="ubuntu" ;;
|
||||
raspbian) ID="debian" ;;
|
||||
*mandriva*) ID="mandriva"
|
||||
if ((REPO_INSTALL_SWITCH)); then
|
||||
debug "Automatically using --install=local for Mandriva."
|
||||
@@ -389,7 +389,7 @@ init() {
|
||||
PKG_UPDATE=(sudo "$rpm_mgr" makecache --assumeyes)
|
||||
PKG_QUERY=(rpm -q)
|
||||
;;
|
||||
debian|ubuntu)
|
||||
debian|raspbian|ubuntu)
|
||||
PKG_INSTALL=(sudo apt-get install --fix-broken --install-recommends --assume-yes)
|
||||
PKG_REMOVE=(sudo apt-get remove --auto-remove --assume-yes)
|
||||
PKG_UPDATE=(sudo apt-get update --assume-yes)
|
||||
@@ -440,7 +440,7 @@ init() {
|
||||
# Append explicit package version when user provides --mcversion
|
||||
case $ID in
|
||||
fedora|centos|suse|mandriva) MC_PKG+="-$MC_VERSION" ;;
|
||||
debian|ubuntu)
|
||||
debian|raspbian|ubuntu)
|
||||
# ARM packages append arch to the package name and version
|
||||
if [[ $MC_ARCH == "arm64" || $MC_ARCH == "armhf" ]]; then
|
||||
MC_PKG+=":${MC_ARCH}=${MC_VERSION}-${MC_ARCH}"
|
||||
@@ -525,7 +525,7 @@ install_package() {
|
||||
|
||||
# Distribution-specific package aliases
|
||||
case $ID in
|
||||
debian|ubuntu) pkg_aliases=(
|
||||
debian|raspbian|ubuntu) pkg_aliases=(
|
||||
[rpm-build]="rpm"
|
||||
[createrepo_c]="createrepo"
|
||||
[tigervnc-server]="tigervnc-standalone-server"
|
||||
@@ -558,7 +558,7 @@ install_package() {
|
||||
|
||||
# Add OS install flags to package manager command
|
||||
case $ID in
|
||||
debian|ubuntu)
|
||||
debian|raspbian|ubuntu)
|
||||
((allow_downgrades)) && install_flags+=(--allow-downgrades)
|
||||
((reinstall)) && install_flags+=(--reinstall) ;;
|
||||
fedora|centos|mandriva)
|
||||
@@ -1135,6 +1135,12 @@ install_mc_deb() {
|
||||
execute sed -i 's/libva2/libva1/g' control
|
||||
fi
|
||||
|
||||
# TODO workaround for 32-bit raspbian
|
||||
if [[ $ID == "raspbian" && $MC_ARCH == "armhf" ]]; then
|
||||
execute sed -i 's/libasound2/libasound2t64/g' control
|
||||
execute sed -i 's/libgtk-3-0/libgtk-3-0t64/g' control
|
||||
fi
|
||||
|
||||
execute tar -cJf "control.tar.xz" "control" "postinst"
|
||||
declare -g MC_DEB="${MC_DEB/.deb/.compat.deb}"
|
||||
execute ar rcs "$MC_DEB" "debian-binary" "control.tar.xz" "data.tar.xz"
|
||||
@@ -2022,7 +2028,7 @@ main() {
|
||||
name = JRiver Media Center hosted by BryanC
|
||||
EOF
|
||||
;;
|
||||
debian|ubuntu)
|
||||
debian|raspbian|ubuntu)
|
||||
local keyurl="https://dist.jriver.com/mediacenter@jriver.com.gpg.complete"
|
||||
local keyfile="/usr/share/keyrings/jriver-com-archive-keyring-complete.gpg"
|
||||
local channel="latest"
|
||||
@@ -2126,7 +2132,7 @@ main() {
|
||||
local -a gpg_flag; ((SIGN_SWITCH)) || gpg_flag=(--no-gpg-check)
|
||||
install_package --no-install-check "${gpg_flag[@]}" --allow-downgrades "$MC_RPM"
|
||||
;;
|
||||
debian|ubuntu) install_mc_deb "$@" ;;
|
||||
debian|raspbian|ubuntu) install_mc_deb "$@" ;;
|
||||
arch) install_mc_arch ;;
|
||||
unknown) install_mc_generic ;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user