7 Commits

Author SHA1 Message Date
744a1df3ae Rename --universal to --compat 2022-01-02 01:55:53 -05:00
e614ad023b Add --universal flag 2022-01-02 01:52:40 -05:00
2bb37d1e7a Try --nobest 2021-12-28 12:29:07 -05:00
256ccabe1b Revert Allow broken depenencies with dnf 2021-12-28 11:37:25 -05:00
1903ed4465 Allow broken depenencies with dnf 2021-12-28 10:41:22 -05:00
92a46d675e Install wget for legacy fallback 2021-12-28 10:34:00 -05:00
662c55d0d0 Allow broken depenencies with dnf 2021-12-28 10:25:07 -05:00
2 changed files with 27 additions and 8 deletions

View File

@@ -47,6 +47,8 @@ You can always find the latest supported options by running `installJRMC --help`
The webroot directory to install the repo (Default: /srv/jriver/)
--createrepo-user USER
The web server user (Default: current user)
--compat
Build/install RPM without minimum version specifiers
--version, -v
Print this script version and exit
--debug, -d

View File

@@ -23,7 +23,7 @@ shopt -s extglob
_scriptversion="1.0b5"
_outputdir="$PWD/output"
_createrepo_webroot="/var/www/jriver"
_exec_user="$(whoami)"
_exec_user=$(whoami)
_systemddir="/usr/lib/systemd/system"
# MC version
@@ -68,6 +68,8 @@ printHelp() {
The web server user (Default: current user)
--createrepo-suse
Override OS detection and run --createrepo with SUSE RPM
--compat
Build/install RPM without minimum version specifiers
--version, -v
Print this script version and exit
--debug, -d
@@ -236,7 +238,7 @@ parseInput() {
_install="repo"
fi
if _input=$(getopt -o +i:vdhus:c: -l install:,build,build-suse,outputdir:,mcversion:,restorefile:,betapass:,service-user:,service:,version,debug,help,uninstall,createrepo,createrepo-suse,createrepo-webroot:,createrepo-user:,vncpass:,display:,container:,tests -- "$@"); then
if _input=$(getopt -o +i:vdhus:c: -l install:,build,build-suse,outputdir:,mcversion:,restorefile:,betapass:,service-user:,service:,version,debug,help,uninstall,createrepo,createrepo-suse,createrepo-webroot:,createrepo-user:,vncpass:,display:,container:,tests,compat -- "$@"); then
eval set -- "$_input"
while true; do
case "$1" in
@@ -297,6 +299,9 @@ parseInput() {
--display)
shift && _display="$1"
;;
--compat)
_compat=true
;;
--container|-c)
shift && _containers+=("$1")
;;
@@ -399,6 +404,7 @@ getLatestVersion() {
buildah rm "$CNT" > /dev/null 2>&1
fi
# Scrape from Interact
installPackage wget
if _mcversion=$(wget -qO- "$_boardurl" | grep -o "[0-9][0-9]\.[0-9]\.[0-9]\+" | head -n 1); then
_version_source="webscrape"
fi
@@ -425,7 +431,7 @@ installPackage() {
local -a _pkg_array _install_flags
local _pkg _nocheck _silent _return
if _input=$(getopt -o +s -l nocheck,nogpgcheck,silent -- "$@"); then
if _input=$(getopt -o +s -l nocheck,nogpgcheck,nobest,silent -- "$@"); then
eval set -- "$_input"
while true; do
case "$1" in
@@ -439,6 +445,11 @@ installPackage() {
_install_flags+=("--allow-unsigned-rpm")
fi
;;
--nobest)
if [[ "$ID" =~ ^(fedora|centos)$ ]]; then
_install_flags+=("--nobest")
fi
;;
--silent|-s)
_silent=true
;;
@@ -635,6 +646,8 @@ buildRPM() {
Requires: vulkan-headers >= 1.1
Requires: ca-certificates
Requires: libXScrnSaver
Recommends: vorbis-tools >= 1.4.0
Recommends: lame >= 3.0
EOF
# SUSE dependency name variations
@@ -678,7 +691,11 @@ buildRPM() {
EOF
fi
#debug "Requires: $_requires"
if [[ -v _compat ]]; then
# Strip minimum versions
_custom_requires=$(echo "$_custom_requires" | awk -F" " 'NF == 4 {print $1 " " $2} NF != 4 {print $0}')
_global_requires=$(echo "$_global_requires" | awk -F" " 'NF == 4 {print $1 " " $2} NF != 4 {print $0}')
fi
# Create spec file
cat <<- EOF > "$_outputdir/SPECS/mediacenter.spec"
@@ -697,9 +714,6 @@ buildRPM() {
${_global_requires:-}
${_custom_requires:-}
Recommends: vorbis-tools >= 1.4.0
Recommends: lame >= 3.0
Provides: mediacenter$_mversion
License: Copyright 1998-2022, JRiver, Inc. All rights reserved. Protected by U.S. patents #7076468 and #7062468
@@ -1468,6 +1482,9 @@ main() {
# Install RPM
if [[ -v _install && "$_install" == "rpm" ]]; then
#rpm --upgrade "$_mcrpm"
if installPackage --nocheck --nogpgcheck "$_mcrpm"; then
echo "JRiver Media Center installed successfully"
else