6 Commits

Author SHA1 Message Date
f482ccd390 Prep for MC31 2023-05-16 09:15:24 -04:00
35bbbeb9e6 Update server links 2023-05-10 21:25:02 -04:00
d06cff907d Alse swap freeworld vdpau 2023-04-28 10:45:57 -04:00
8b01ba3ced Fix createrepo build target 2023-04-12 14:49:19 -04:00
4435606de2 Build with createrepo 2023-04-05 15:10:10 -04:00
7263241950 Build with createrepo 2023-04-05 15:05:44 -04:00
3 changed files with 34 additions and 21 deletions

View File

@@ -23,7 +23,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. "30.0.83" (default: latest version) Build or install a specific MC version, ex. "31.0.11" (default: latest version)
--arch ARCH --arch ARCH
Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture) Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
--outputdir PATH --outputdir PATH
@@ -112,9 +112,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 30.0.83` * `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 31.0.11`
Build and install an MC 30.0.83 comptability RPM locally and activate it using the `/path/to/license.mjr` Build and install an MC 31.0.11 comptability 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`

View File

@@ -32,7 +32,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. "30.0.83" Build or install a specific MC version, ex. "31.0.11"
--arch ARCH --arch ARCH
Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture) Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
--outputdir PATH --outputdir PATH
@@ -111,8 +111,8 @@ Install the latest version of MC from the best available repository.
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 30.0.83[/code] [code]installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 31.0.11[/code]
Build and install an MC 30.0.83 comptability RPM locally and activate it using the /path/to/license.mjr Build and install an MC 31.0.11 comptability RPM locally and activate it using the /path/to/license.mjr
[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]

View File

@@ -16,10 +16,10 @@
shopt -s extglob shopt -s extglob
declare -g SCRIPTVERSION="1.0-rc7" declare -g SCRIPTVERSION="1.0-rc8"
declare -g BOARDURL="https://yabb.jriver.com/interact/index.php/board,76.0.html" # MC30 declare -g BOARDURL="https://yabb.jriver.com/interact/index.php/board,80.0.html" # MC31
declare -g DEBIANBASE="buster" declare -g DEBIANBASE="bullseye"
declare -g MCVERSION_HARDCODE="30.0.83" declare -g MCVERSION_HARDCODE="31.0.11"
printHelp() { printHelp() {
debug "Running: ${FUNCNAME[0]}" debug "Running: ${FUNCNAME[0]}"
@@ -40,7 +40,7 @@ printHelp() {
--compat --compat
Build/install MC locally without minimum dependency version requirements Build/install MC locally without minimum dependency version requirements
--mcversion VERSION --mcversion VERSION
Specify the MC version, ex. "30.0.83" (default: latest version) Specify the MC version, ex. "31.0.11" (default: latest version)
--arch VERSION --arch VERSION
Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture) Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
--outputdir PATH --outputdir PATH
@@ -331,7 +331,7 @@ parseInput() {
--createrepo) --createrepo)
BUILD_SWITCH=1 BUILD_SWITCH=1
CREATEREPO_SWITCH=1 CREATEREPO_SWITCH=1
shift && REPO_TARGET="$1" shift && REPO_TARGET="$1" && BUILD_TARGET="$1"
;; ;;
--createrepo-webroot) --createrepo-webroot)
shift && CREATEREPO_WEBROOT="$1" shift && CREATEREPO_WEBROOT="$1"
@@ -387,7 +387,7 @@ parseInput() {
####################################### #######################################
# Uses several methods to determine the latest JRiver MC version # Uses several methods to determine the latest JRiver MC version
# TODO but how to determine build distro `$DEBIANBASE=buster`? # TODO but how to determine build distro `$DEBIANBASE=bullseye`?
####################################### #######################################
setMCVersion() { setMCVersion() {
debug "Running: ${FUNCNAME[0]}" debug "Running: ${FUNCNAME[0]}"
@@ -566,6 +566,18 @@ installMesa() {
"${PKG_INSTALL[@]}" mesa-va-drivers-freeworld "${PKG_INSTALL[@]}" mesa-va-drivers-freeworld
fi fi
fi fi
if ! "${PKG_QUERY[@]}" mesa-vdpau-drivers-freeworld &>/dev/null; then
if "${PKG_QUERY[@]}" mesa-vdpau-drivers &>/dev/null; then
if ! execute sudo dnf swap -y \
mesa-vdpau-drivers \
mesa-vdpau-drivers-freeworld; then
err "Package swap failed!"
return 1
fi
else
"${PKG_INSTALL[@]}" mesa-va-drivers-freeworld mesa-vdpau-drivers-freeworld
fi
fi
;; ;;
esac esac
} }
@@ -642,13 +654,13 @@ acquireDeb() {
if [[ -v BETAPASS ]] && if [[ -v BETAPASS ]] &&
echo "Checking beta repo for DEB package" && execute wget -q -O "$MCDEB" \ echo "Checking beta repo for DEB package" && execute wget -q -O "$MCDEB" \
"https://files.jriver.com/mediacenter/channels/v$MVERSION/beta/$BETAPASS/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb"; then "https://files.jriver-cdn.com/mediacenter/channels/v$MVERSION/beta/$BETAPASS/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb"; then
echo "Found!" echo "Found!"
elif echo "Checking latest repo for DEB package" && execute wget -q -O "$MCDEB" \ elif echo "Checking latest repo for DEB package" && execute wget -q -O "$MCDEB" \
"https://files.jriver.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb"; then "https://files.jriver-cdn.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb"; then
echo "Found!" echo "Found!"
elif echo "Checking test repo for DEB package" && execute wget -q -O "$MCDEB" \ elif echo "Checking test repo for DEB package" && execute wget -q -O "$MCDEB" \
"https://files.jriver.com/mediacenter/test/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb"; then "https://files.jriver-cdn.com/mediacenter/test/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb"; then
echo "Found!" echo "Found!"
else else
err "Cannot find DEB file" err "Cannot find DEB file"
@@ -775,7 +787,7 @@ buildRPM() {
Release: 1 Release: 1
Summary: JRiver Media Center Summary: JRiver Media Center
Group: Applications/Media Group: Applications/Media
Source0: http://files.jriver.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb Source0: http://files.jriver-cdn.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb
BuildArch: x86_64 BuildArch: x86_64
%define _rpmfilename %%{ARCH}/%%{NAME}-%%{version}.%%{ARCH}.rpm %define _rpmfilename %%{ARCH}/%%{NAME}-%%{version}.%%{ARCH}.rpm
@@ -938,7 +950,7 @@ installMCARCH() {
'vorbis-tools: ogg vorbis support' 'vorbis-tools: ogg vorbis support'
'musepack-tools: musepack support' 'musepack-tools: musepack support'
) )
source=("http://files.jriver.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb") source=("http://files.jriver-cdn.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb")
package() { package() {
cd "\$srcdir" cd "\$srcdir"
@@ -1455,7 +1467,7 @@ service_jriver-createrepo() {
[Service] [Service]
$USER_STRING $USER_STRING
ExecStart=$SCRIPTDIR/installJRMC --outputdir $OUTPUTDIR --createrepo=$REPO_TARGET --createrepo-webroot $CREATEREPO_WEBROOT --createrepo-user $CREATEREPO_USER ExecStart=$SCRIPTDIR/installJRMC --outputdir=$OUTPUTDIR --createrepo=$REPO_TARGET --createrepo-webroot=$CREATEREPO_WEBROOT --createrepo-user=$CREATEREPO_USER
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
@@ -1757,9 +1769,10 @@ main() {
installPackage "wget" installPackage "wget"
[[ -d $OUTPUTDIR/SOURCES ]] || execute mkdir -p "$OUTPUTDIR/SOURCES" [[ -d $OUTPUTDIR/SOURCES ]] || execute mkdir -p "$OUTPUTDIR/SOURCES"
acquireDeb acquireDeb
if [[ $BUILD_TARGET =~ (centos|fedora|suse) ]]; then if [[ $BUILD_TARGET =~ (centos|fedora|suse) ||
$REPO_TARGET =~ (centos|fedora|suse) ]]; then
installPackage "dpkg" "rpm-build" installPackage "dpkg" "rpm-build"
[[ -d $OUTPUTDIR/SPECS ]] || mkdir -p "$OUTPUTDIR/SPECS" [[ -d $OUTPUTDIR/SPECS ]] || execute mkdir -p "$OUTPUTDIR/SPECS"
buildRPM buildRPM
fi fi
fi fi