Compare commits
19 Commits
b4a80f5ba1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 5bcbc9a935 | |||
| 1f61ec4888 | |||
| 3c8ed002bb | |||
| 7ef9669dec | |||
| eb62392da7 | |||
| 60961f8415 | |||
| e087248165 | |||
| 90ea1e0fa4 | |||
| bafd812074 | |||
| 75881d5ac1 | |||
| fd6d4d872f | |||
| c96ff1ed4b | |||
| a37ae0b5f5 | |||
| b8f64b3f0c | |||
| bcde2c252b | |||
| 1f8f276258 | |||
| ce46f50cd1 | |||
| 07878d97ce | |||
| d015f70ec2 |
@@ -31,7 +31,7 @@ $ installJRMC --help
|
|||||||
--compat
|
--compat
|
||||||
Build/install MC without minimum dependency version requirements.
|
Build/install MC without minimum dependency version requirements.
|
||||||
--mcversion VERSION
|
--mcversion VERSION
|
||||||
Specify the MC version, ex. "33", "34.0.71", or "34.0.71-1" (default: latest).
|
Specify the MC version, ex. "33", "35.0.24", or "35.0.24-1" (default: latest).
|
||||||
--arch ARCH
|
--arch ARCH
|
||||||
Specify the target MC architecture, ex. "amd64", "arm64", etc (default: host architecture).
|
Specify the target MC architecture, ex. "amd64", "arm64", etc (default: host architecture).
|
||||||
--mcrepo REPO
|
--mcrepo REPO
|
||||||
@@ -126,8 +126,8 @@ Install the latest version of MC33 from the best available repository with debug
|
|||||||
Install a more widely-compatible version of the latest MC version.
|
Install a more widely-compatible version of the latest MC version.
|
||||||
[code]installJRMC --install repo --service jriver-mediacenter --service-type user[/code]
|
[code]installJRMC --install repo --service jriver-mediacenter --service-type user[/code]
|
||||||
Install MC from the repository and start/enable jriver-mediacenter.service as a user service.
|
Install MC from the repository and start/enable jriver-mediacenter.service as a user service.
|
||||||
[code]installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 34.0.71[/code]
|
[code]installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 35.0.24[/code]
|
||||||
Build and install an MC 34.0.71 comptability RPM locally and activate it using the [tt]/path/to/license.mjr[/tt].
|
Build and install an MC 35.0.24 comptability RPM locally and activate it using the [tt]/path/to/license.mjr[/tt].
|
||||||
[code]installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code]
|
[code]installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code]
|
||||||
Build an RPM locally for the current distro, move it to the webroot, and run createrepo as www-user.
|
Build an RPM locally for the current distro, move it to the webroot, and run createrepo as www-user.
|
||||||
[code]installJRMC --service jriver-createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code]
|
[code]installJRMC --service jriver-createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code]
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ $ installJRMC --help
|
|||||||
--compat
|
--compat
|
||||||
Build/install MC without minimum dependency version requirements.
|
Build/install MC without minimum dependency version requirements.
|
||||||
--mcversion VERSION
|
--mcversion VERSION
|
||||||
Build or install a specific MC version, ex. "34.0.71" or "33" (default: latest).
|
Build or install a specific MC version, ex. "35.0.24" or "33" (default: latest).
|
||||||
--mcrepo REPO
|
--mcrepo REPO
|
||||||
Specify the MC repository, ex. "bullseye", "bookworm", "noble", etc (default: latest official).
|
Specify the MC repository, ex. "bullseye", "bookworm", "noble", etc (default: latest official).
|
||||||
--arch ARCH
|
--arch ARCH
|
||||||
@@ -130,9 +130,9 @@ Multiple services (but not `--service-types`) can be installed at one time using
|
|||||||
|
|
||||||
Install MC from the repository and start/enable `jriver-mediacenter.service` as a user service.
|
Install MC from the repository and start/enable `jriver-mediacenter.service` as a user service.
|
||||||
|
|
||||||
* `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 34.0.71`
|
* `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 35.0.24`
|
||||||
|
|
||||||
Build and install an MC 34.0.71 compatibility RPM locally and activate it using the `/path/to/license.mjr`.
|
Build and install an MC 35.0.24 compatibility RPM locally and activate it using the `/path/to/license.mjr`.
|
||||||
|
|
||||||
* `installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user`
|
* `installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user`
|
||||||
|
|
||||||
|
|||||||
45
installJRMC
45
installJRMC
@@ -21,12 +21,12 @@
|
|||||||
# shellcheck disable=SC2329
|
# shellcheck disable=SC2329
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
declare -g SCRIPT_VERSION="1.34.11"
|
declare -g SCRIPT_VERSION="1.35.4"
|
||||||
declare -g MC_VERSION_HARDCODE="34.0.71" # do find all replace
|
declare -g MC_VERSION_HARDCODE="35.0.24" # 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="89.0" # MC34 board ID for automatic version detection
|
declare -g BOARD_ID="92.0" # MC35 board ID for legacy latest version detection
|
||||||
declare -gi SELF_UPDATE_SWITCH=1 # 0 to disable installJRMC self-update
|
declare -gi SELF_UPDATE_SWITCH=1 # 0 to disable installJRMC self-update
|
||||||
declare -g SCRIPT_URL="https://git.bryanroessler.com/bryan/installJRMC/raw/master/installJRMC" # self-update URL
|
declare -g SCRIPT_URL="https://git.bryanroessler.com/bryan/installJRMC/raw/branch/master/installJRMC" # self-update URL
|
||||||
# declare -g SCRIPT_URL="https://raw.githubusercontent.com/cryobry/installJRMC/refs/heads/master/installJRMC" # backup URL
|
# declare -g SCRIPT_URL="https://raw.githubusercontent.com/cryobry/installJRMC/refs/heads/master/installJRMC" # backup URL
|
||||||
declare -gi DEBUG=${DEBUG:-0} # set default debug and allow DEBUG env override (default: disabled)
|
declare -gi DEBUG=${DEBUG:-0} # set default debug and allow DEBUG env override (default: disabled)
|
||||||
|
|
||||||
@@ -159,7 +159,8 @@ parse_input() {
|
|||||||
|
|
||||||
# Set major version defaults
|
# Set major version defaults
|
||||||
case "$MC_MVERSION_USER" in
|
case "$MC_MVERSION_USER" in
|
||||||
34) MC_REPO_HARDCODE="bookworm" BOARD_ID="89.0" ;; # fallback to hardcoded version if full version not provided
|
35) MC_REPO_HARDCODE="bookworm" BOARD_ID="92.0" ;; # fallback to hardcoded version if full version not provided
|
||||||
|
34) MC_VERSION_USER="${MC_VERSION_USER:-34.0.71}" MC_REPO_HARDCODE="bookworm" BOARD_ID="89.0" ;;
|
||||||
33) MC_VERSION_USER="${MC_VERSION_USER:-33.0.72}" MC_REPO_HARDCODE="bullseye" BOARD_ID="86.0" ;;
|
33) MC_VERSION_USER="${MC_VERSION_USER:-33.0.72}" MC_REPO_HARDCODE="bullseye" BOARD_ID="86.0" ;;
|
||||||
32) MC_VERSION_USER="${MC_VERSION_USER:-32.0.58}" MC_REPO_HARDCODE="bullseye" BOARD_ID="83.0" ;;
|
32) MC_VERSION_USER="${MC_VERSION_USER:-32.0.58}" MC_REPO_HARDCODE="bullseye" BOARD_ID="83.0" ;;
|
||||||
31) MC_VERSION_USER="${MC_VERSION_USER:-31.0.83}" MC_REPO_HARDCODE="bullseye" BOARD_ID="80.0" ;;
|
31) MC_VERSION_USER="${MC_VERSION_USER:-31.0.83}" MC_REPO_HARDCODE="bullseye" BOARD_ID="80.0" ;;
|
||||||
@@ -528,10 +529,6 @@ install_package() {
|
|||||||
((allow_downgrades)) && install_flags+=(--allowerasing)
|
((allow_downgrades)) && install_flags+=(--allowerasing)
|
||||||
((no_gpg_check)) && install_flags+=(--nogpgcheck)
|
((no_gpg_check)) && install_flags+=(--nogpgcheck)
|
||||||
((refresh)) && install_flags+=(--refresh)
|
((refresh)) && install_flags+=(--refresh)
|
||||||
# Only add reinstall flag for mediacenter package
|
|
||||||
if ((reinstall)) && [[ ${#pkg_array[@]} -eq 1 ]] && "${PKG_QUERY[@]}" "mediacenter$MC_MVERSION" &>/dev/null; then
|
|
||||||
pkg_install=("${pkg_install[@]/install/reinstall}")
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
suse)
|
suse)
|
||||||
((no_gpg_check)) && install_flags+=(--allow-unsigned-rpm) ;;
|
((no_gpg_check)) && install_flags+=(--allow-unsigned-rpm) ;;
|
||||||
@@ -995,32 +992,31 @@ build_rpm() {
|
|||||||
|
|
||||||
# Create spec file
|
# Create spec file
|
||||||
cat <<-EOF > "$spec_file"
|
cat <<-EOF > "$spec_file"
|
||||||
Name: mediacenter$MC_MVERSION
|
Name: mediacenter$MC_MVERSION
|
||||||
Version: $MC_VERSION
|
Version: $MC_VERSION
|
||||||
Release: $MC_RELEASE
|
Release: $MC_RELEASE
|
||||||
Summary: JRiver Media Center
|
Summary: JRiver Media Center
|
||||||
Group: Applications/Media
|
Group: Applications/Media
|
||||||
|
License: LicenseRef-JRiver-Proprietary
|
||||||
|
URL: https://www.jriver.com/
|
||||||
Source0: $MC_SOURCE
|
Source0: $MC_SOURCE
|
||||||
%define _rpmfilename %%{ARCH}/%%{NAME}-%%{version}-%%{release}.%%{ARCH}.rpm
|
|
||||||
|
|
||||||
AutoReq: 0
|
BuildArch: $ARCH
|
||||||
|
|
||||||
|
%global _rpmfilename %%{ARCH}/%%{NAME}-%%{version}-%%{release}.%%{ARCH}.rpm
|
||||||
|
|
||||||
|
AutoReqProv: no
|
||||||
|
|
||||||
$requires_str
|
$requires_str
|
||||||
$recommends_str
|
$recommends_str
|
||||||
|
|
||||||
Conflicts: MediaCenter
|
|
||||||
|
|
||||||
Provides: mediacenter$MC_MVERSION
|
Provides: mediacenter$MC_MVERSION
|
||||||
|
|
||||||
License: Copyright 1998-$(date +%Y), JRiver, Inc. All rights reserved. Protected by U.S. patents #7076468 and #7062468
|
|
||||||
URL: https://www.jriver.com/
|
|
||||||
|
|
||||||
%define __provides_exclude_from ^%{_libdir}/jriver/.*/.*\\.so.*$
|
%define __provides_exclude_from ^%{_libdir}/jriver/.*/.*\\.so.*$
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Media Center is more than a world class player.
|
Media Center is more than a world class player.
|
||||||
|
|
||||||
%global __os_install_post %{nil}
|
|
||||||
%prep
|
%prep
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@@ -1028,9 +1024,6 @@ build_rpm() {
|
|||||||
%install
|
%install
|
||||||
dpkg -x %{S:0} %{buildroot}
|
dpkg -x %{S:0} %{buildroot}
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
|
||||||
%postun -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_bindir}/mediacenter$MC_MVERSION
|
%{_bindir}/mediacenter$MC_MVERSION
|
||||||
$stub
|
$stub
|
||||||
@@ -1155,7 +1148,7 @@ install_mc_deb() {
|
|||||||
# @description Installs MC via RPM package
|
# @description Installs MC via RPM package
|
||||||
install_mc_rpm() {
|
install_mc_rpm() {
|
||||||
debug "${FUNCNAME[0]}()"
|
debug "${FUNCNAME[0]}()"
|
||||||
install_package --no-install-check --no-gpg-check --allow-downgrades --reinstall "$MC_RPM"
|
install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_RPM"
|
||||||
}
|
}
|
||||||
|
|
||||||
# @description Installs Media Center generically for unsupported OSes
|
# @description Installs Media Center generically for unsupported OSes
|
||||||
@@ -1236,10 +1229,10 @@ run_createrepo() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Run createrepo
|
# Run createrepo
|
||||||
local -a cr_opts=(-q "$CREATEREPO_WEBROOT")
|
local -a cr_opts=(--update)
|
||||||
# [[ -d "$CREATEREPO_WEBROOT/repodata" ]] && cr_opts+=(--update) # TODO temporarily disabled for legacy createrepo
|
# [[ -d "$CREATEREPO_WEBROOT/repodata" ]] && cr_opts+=(--update) # TODO temporarily disabled for legacy createrepo
|
||||||
if ! execute sudo -u "$CREATEREPO_USER" createrepo "${cr_opts[@]}"; then
|
if ! execute sudo -u "$CREATEREPO_USER" createrepo "${cr_opts[@]}" "$CREATEREPO_WEBROOT"; then
|
||||||
if ! (execute sudo createrepo "${cr_opts[@]}" && execute sudo chown -R "$CREATEREPO_USER:$CREATEREPO_USER" "$CREATEREPO_WEBROOT"); then
|
if ! (execute sudo createrepo "${cr_opts[@]}" "$CREATEREPO_WEBROOT" && execute sudo chown -R "$CREATEREPO_USER:$CREATEREPO_USER" "$CREATEREPO_WEBROOT"); then
|
||||||
err "createrepo failed"
|
err "createrepo failed"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user