6 Commits

Author SHA1 Message Date
daac2a139c 1.36.2 release 2026-07-27 14:57:22 -04:00
9897e766be Move armhf package translation to --compat 2026-07-27 14:54:16 -04:00
ab7f382a1f Add temp debug 2026-07-27 14:47:31 -04:00
94353b2b25 Translate 32-bit ARM host arch to MC arch 2026-07-27 14:43:57 -04:00
fb81bdd398 Add package overrides for 32-bit ARM 2026-07-27 14:34:47 -04:00
0fc45c80b5 Split raspbian from debian and disable legacy repo 2026-07-27 14:29:14 -04:00

View File

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