Compare commits
16 Commits
de38073978
...
3bbd846a3f
| Author | SHA1 | Date | |
|---|---|---|---|
| 3bbd846a3f | |||
| e6b51568f9 | |||
| 9b9b82d1af | |||
| f2016b6b50 | |||
| 94e2bfa848 | |||
| cfc21cda14 | |||
| 8ae3ae5915 | |||
| 7bbe16b6a2 | |||
| 2ee1fd5b9c | |||
| 45be120254 | |||
| 62f0b862c3 | |||
| c42f0a6dd3 | |||
| e3777f0dec | |||
| 9bae3a42c7 | |||
| 3587ac8db2 | |||
| e390f36d84 |
148
.README.bbcode
Normal file
148
.README.bbcode
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
[size=20pt]installJRMC[/size]
|
||||||
|
|
||||||
|
This program will install [url=https://www.jriver.com/]JRiver Media Center[/url] and associated services on most Linux distributions.
|
||||||
|
|
||||||
|
You can find the latest version of installJRMC, changelog, and documentation in [url=https://git.bryanroessler.com/bryan/installJRMC]my repository[/url].
|
||||||
|
|
||||||
|
[size=18pt]tl;dr One-line MC install[/size]
|
||||||
|
[code]curl https://git.bryanroessler.com/bryan/installJRMC/raw/master/installJRMC|bash[/code]
|
||||||
|
|
||||||
|
[size=18pt]Instructions[/size]
|
||||||
|
|
||||||
|
Download and unzip installJRMC from the attachment below or grab the latest stable version directly:
|
||||||
|
[code]curl -O https://git.bryanroessler.com/bryan/installJRMC/raw/master/installJRMC &&
|
||||||
|
chmod +x ./installJRMC &&
|
||||||
|
./installJRMC [--option [ARGUMENT]]
|
||||||
|
[/code]
|
||||||
|
|
||||||
|
[tt]installJRMC[/tt] defaults to [tt]--install=repo[/tt] on distros with MC repositories and [tt]--install=local[/tt] on all others.
|
||||||
|
Specifying [tt]--build[/tt], [tt]--createrepo[/tt], [tt]--service[/tt], or [tt]--uninstall[/tt] disables the default install method.
|
||||||
|
|
||||||
|
[size=18pt]Options[/size]
|
||||||
|
|
||||||
|
[code]
|
||||||
|
$ installJRMC --help
|
||||||
|
--install, -i repo|local
|
||||||
|
repo: Install MC from repository, future updates will be handled by the system package manager
|
||||||
|
local: Build and install MC package from official source package
|
||||||
|
--build[=suse|fedora|centos]
|
||||||
|
Build RPM from source DEB but do not install
|
||||||
|
Optionally, specify a target distro for cross-building (ex. --build=suse, note the '=')
|
||||||
|
--compat
|
||||||
|
Build/install MC without minimum dependency version requirements
|
||||||
|
--mcversion VERSION
|
||||||
|
Specify the MC version, ex. "33", "34.0.51", or "34.0.51-1" (default: latest)
|
||||||
|
--arch ARCH
|
||||||
|
Specify the target MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
|
||||||
|
--mcrepo REPO
|
||||||
|
Specify the MC repository, ex. "bullseye", "bookworm", "noble", etc (default: host or official)
|
||||||
|
--outputdir PATH
|
||||||
|
Generate reusable installJRMC output in this PATH (default: ./output)
|
||||||
|
--restorefile RESTOREFILE
|
||||||
|
Restore file location for automatic license registration
|
||||||
|
--betapass PASSWORD
|
||||||
|
Enter beta team password for access to beta builds
|
||||||
|
--service, -s SERVICE
|
||||||
|
See SERVICES section below for the list of services to deploy
|
||||||
|
--service-type user|system
|
||||||
|
Starts services at boot (system) or user login (user) (default: per-service, see SERVICES)
|
||||||
|
--container, -c CONTAINER (TODO: Under construction)
|
||||||
|
See CONTAINERS section below for a list of containers to deploy
|
||||||
|
--createrepo[=suse|fedora|centos]
|
||||||
|
Build rpm, copy to webroot, and run createrepo.
|
||||||
|
Optionally, specify a target distro for non-native repo (ex. --createrepo=fedora, note the '=')
|
||||||
|
--createrepo-webroot PATH
|
||||||
|
The webroot directory to install the repo (default: /var/www/jriver/)
|
||||||
|
--createrepo-user USER
|
||||||
|
The web server user if different from the current user
|
||||||
|
--no-update
|
||||||
|
Disable the installJRMC update check
|
||||||
|
--yes, -y, --auto
|
||||||
|
Always assumes yes for questions
|
||||||
|
--version, -v
|
||||||
|
Print installJRMC version and exit
|
||||||
|
--debug, -d
|
||||||
|
Print debug output
|
||||||
|
--help, -h
|
||||||
|
Print help dialog and exit
|
||||||
|
--uninstall, -u
|
||||||
|
Uninstall JRiver MC, service files, firewall rules, etc.
|
||||||
|
[/code]
|
||||||
|
|
||||||
|
[size=18pt]Services[/size]
|
||||||
|
|
||||||
|
[code]jriver-mediaserver (user)
|
||||||
|
Enable and start a mediaserver systemd service (requires an existing X server)
|
||||||
|
jriver-mediacenter (user)
|
||||||
|
Enable and start a mediacenter systemd service (requires an existing X server)
|
||||||
|
jriver-x11vnc (user)
|
||||||
|
Enable and start x11vnc for the local desktop (requires an existing X server, does NOT support Wayland)
|
||||||
|
--vncpass and --display are also valid options (see below)
|
||||||
|
jriver-xvnc (system)
|
||||||
|
Enable and start a new Xvnc session running JRiver Media Center
|
||||||
|
--vncpass PASSWORD
|
||||||
|
Set vnc password for x11vnc/Xvnc access. If no password is set, the script will either use existing password stored in ~/.vnc/jrmc_passwd or else no password
|
||||||
|
--display DISPLAY
|
||||||
|
Manually specify display to use for x11vnc/Xvnc (ex. ':1')
|
||||||
|
jriver-createrepo (system)
|
||||||
|
Install hourly service to build latest MC RPM and run createrepo
|
||||||
|
[/code]
|
||||||
|
|
||||||
|
Services use a sane default [tt]--service-type[/tt] listed next to the service name in the Services description.
|
||||||
|
User services can be manipulated as an unprivileged user, for example: [tt]systemctl --user stop jriver-mediacenter[/tt] and begin at user login.
|
||||||
|
System services are manipulable as root, for example: [tt]sudo systemctl stop jriver-servicename@username.service[/tt] and begin at system boot.
|
||||||
|
Note that it is possible to run all services of a particular user at boot using [tt][url=https://www.freedesktop.org/software/systemd/man/loginctl.html]sudo loginctl enable-linger username[/url][/tt].
|
||||||
|
|
||||||
|
Multiple services (but not [tt]--service-types[/tt]) can be installed at one time using multiple [tt]--service[/tt] blocks:
|
||||||
|
[code]installJRMC --install repo --service jriver-x11vnc --service jriver-mediacenter[/code]
|
||||||
|
|
||||||
|
[size=14pt][tt]jriver-x11vnc[/tt] versus [tt]jriver-xvnc[/tt][/size]
|
||||||
|
|
||||||
|
[url=http://www.karlrunge.com/x11vnc/]jriver-x11vnc[/url] shares your existing X display via VNC and can be combined with additional services to start Media Center or Media Server. Conversely, [url=https://tigervnc.org/doc/Xvnc.html]jriver-xvnc[/url] creates a new Xvnc display and starts a JRiver Media Center service in the foreground of the new VNC display.
|
||||||
|
|
||||||
|
[size=18pt]Containers[/size]
|
||||||
|
|
||||||
|
[b]Coming soon![/b]
|
||||||
|
|
||||||
|
[size=18pt]Firewall[/size]
|
||||||
|
|
||||||
|
installJRMC automatically creates port forwarding firewall rules for remote access to Media Network (52100-52200/tcp, 1900/udp DLNA) and Xvnc/x11vnc (if selected), using firewall-cmd or ufw (if available).
|
||||||
|
|
||||||
|
[size=18pt]Other Nicities[/size]
|
||||||
|
[list]
|
||||||
|
[*]Automatically updates [tt]installJRMC[/tt] to the latest release
|
||||||
|
[*]Activates external third-party repositories for improved media playback (hardware decoding, etc.)
|
||||||
|
[*]Adds temporary legacy repositories to provide deprecated libraries
|
||||||
|
[*]Links non-standard SSL certs
|
||||||
|
[*]Activates MC if a valid license file is found in common locations
|
||||||
|
[/list]
|
||||||
|
|
||||||
|
[size=18pt]Examples[/size]
|
||||||
|
[code]installJRMC[/code]
|
||||||
|
Install the latest version of MC from the best available repository.
|
||||||
|
[code]installJRMC --mcversion 33 --debug[/code]
|
||||||
|
Install the latest version of MC33 from the best available repository with debugging output.
|
||||||
|
[code]installJRMC --install local --compat[/code]
|
||||||
|
Install a more widely-compatible version of the latest MC version.
|
||||||
|
[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.
|
||||||
|
[code]installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 34.0.51[/code]
|
||||||
|
Build and install an MC 34.0.51 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]
|
||||||
|
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]
|
||||||
|
Install the jriver-createrepo timer and service to build the RPM, move it to the webroot, and run createrepo as www-user hourly.
|
||||||
|
[code]installJRMC --install repo --service jriver-x11vnc --service jriver-mediacenter --vncpass "letmein"[/code]
|
||||||
|
Install services to share the existing local desktop via VNC and automatically run MC on startup.
|
||||||
|
[code]installJRMC --install repo --service jriver-xvnc --display ":2"[/code]
|
||||||
|
Install an Xvnc server on display ':2' that starts MC.
|
||||||
|
[code]installJRMC --uninstall[/code]
|
||||||
|
Uninstall MC, services, and firewall rules. This will [b]not[/b] remove your media, media library/database, or library backups.
|
||||||
|
|
||||||
|
[size=18pt]Additional Info[/size]
|
||||||
|
|
||||||
|
Did you find installJRMC useful? [url=https://paypal.me/bryanroessler]Paypal me a coffee![/url]
|
||||||
|
|
||||||
|
[url=bitcoin:bc1q7wy0kszjavgcrvkxdg7mf3s6rh506rasnhfa4a]↓ ↓ ↓ Bitcoin ↓ ↓ ↓[/url]
|
||||||
|
|
||||||
|
[url=bitcoin:bc1q7wy0kszjavgcrvkxdg7mf3s6rh506rasnhfa4a][img]https://repos.bryanroessler.com/files/bc1q7wy0kszjavgcrvkxdg7mf3s6rh506rasnhfa4a.png[/img][/url]
|
||||||
12
README.md
12
README.md
@@ -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.48" or "33" (default: latest)
|
Build or install a specific MC version, ex. "34.0.51" 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
|
||||||
@@ -102,9 +102,8 @@ Multiple services (but not `--service-types`) can be installed at one time using
|
|||||||
|
|
||||||
## Firewall
|
## Firewall
|
||||||
|
|
||||||
`installJRMC` automatically creates port forwarding firewall rules for remote access to Media Network (52100-52200/tcp, 1900/udp DLNA) and Xvnc/x11vnc (if selected), using `firewall-cmd` or `ufw`.
|
`installJRMC` automatically creates port forwarding firewall rules for remote access to Media Network (52100-52200/tcp, 1900/udp DLNA) and Xvnc/x11vnc (if selected), using `firewall-cmd` or `ufw` (if available).
|
||||||
|
|
||||||
**Note:** `ufw` is not installed by default on Debian but will be installed by `installJRMC`. To prevent SSH lock-out, Debian users that have not already enabled `ufw` will need to `sudo ufw enable` after running `installJRMC` and inspecting their configuration.
|
|
||||||
|
|
||||||
## Other Nicities
|
## Other Nicities
|
||||||
|
|
||||||
@@ -112,7 +111,6 @@ Multiple services (but not `--service-types`) can be installed at one time using
|
|||||||
* Activates external third-party repositories for improved media playback (hardware decoding, etc.)
|
* Activates external third-party repositories for improved media playback (hardware decoding, etc.)
|
||||||
* Adds temporary legacy repositories to provide deprecated libraries
|
* Adds temporary legacy repositories to provide deprecated libraries
|
||||||
* Links non-standard SSL certs
|
* Links non-standard SSL certs
|
||||||
* Disables BTRFS CoW for MC database directories
|
|
||||||
* Activates MC if a valid license file is found in common locations
|
* Activates MC if a valid license file is found in common locations
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
@@ -133,9 +131,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.48`
|
* `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 34.0.51`
|
||||||
|
|
||||||
Build and install an MC 34.0.48 compatibility RPM locally and activate it using the `/path/to/license.mjr`
|
Build and install an MC 34.0.51 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`
|
||||||
|
|
||||||
@@ -161,7 +159,7 @@ Multiple services (but not `--service-types`) can be installed at one time using
|
|||||||
|
|
||||||
Find a bug? [Let me know on Interact!](https://yabb.jriver.com/interact/index.php/topic,141168.0.html)
|
Find a bug? [Let me know on Interact!](https://yabb.jriver.com/interact/index.php/topic,141168.0.html)
|
||||||
|
|
||||||
Find `installJRMC` useful? [Buy me a coffee with Paypal!](https://paypal.me/bryanroessler)
|
Find `installJRMC` useful? [Paypal me a coffee!](https://paypal.me/bryanroessler)
|
||||||
|
|
||||||
[↓ ↓ ↓ Bitcoin ↓ ↓ ↓](bitcoin:bc1q7wy0kszjavgcrvkxdg7mf3s6rh506rasnhfa4a)
|
[↓ ↓ ↓ Bitcoin ↓ ↓ ↓](bitcoin:bc1q7wy0kszjavgcrvkxdg7mf3s6rh506rasnhfa4a)
|
||||||
|
|
||||||
|
|||||||
392
installJRMC
392
installJRMC
@@ -21,8 +21,8 @@
|
|||||||
# shellcheck disable=SC2317
|
# shellcheck disable=SC2317
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
declare -g SCRIPT_VERSION="1.34.5"
|
declare -g SCRIPT_VERSION="1.34.7"
|
||||||
declare -g MC_VERSION="34.0.48" # do find all replace (hardcoded fallback)
|
declare -g MC_VERSION="34.0.51" # do find all replace (hardcoded fallback)
|
||||||
declare -g MC_REPO="bookworm" # should match the MC_VERSION
|
declare -g MC_REPO="bookworm" # should match the MC_VERSION
|
||||||
declare -g BOARD_ID="89.0" # MC34 board ID for automatic version detection
|
declare -g BOARD_ID="89.0" # MC34 board ID for automatic 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
|
||||||
@@ -294,7 +294,7 @@ init() {
|
|||||||
BUILD_SWITCH=1
|
BUILD_SWITCH=1
|
||||||
LOCAL_INSTALL_SWITCH=1
|
LOCAL_INSTALL_SWITCH=1
|
||||||
fi ;;
|
fi ;;
|
||||||
manjaro|arch) ID="arch"
|
manjaro|arch|cachyos) ID="arch"
|
||||||
if ((REPO_INSTALL_SWITCH)); then
|
if ((REPO_INSTALL_SWITCH)); then
|
||||||
debug "Automatically using --install=local for Arch"
|
debug "Automatically using --install=local for Arch"
|
||||||
REPO_INSTALL_SWITCH=0
|
REPO_INSTALL_SWITCH=0
|
||||||
@@ -681,7 +681,9 @@ install_mc_repo() {
|
|||||||
|
|
||||||
# Add older repository for libwebkit2gtk-4.0-37, etc, on newer Debian/Ubuntu
|
# Add older repository for libwebkit2gtk-4.0-37, etc, on newer Debian/Ubuntu
|
||||||
if add_temp_repo; then
|
if add_temp_repo; then
|
||||||
|
debug "Removing temporary repository: $TEMP_REPO_FILE"
|
||||||
trap 'execute sudo rm -f "$TEMP_REPO_FILE"' EXIT
|
trap 'execute sudo rm -f "$TEMP_REPO_FILE"' EXIT
|
||||||
|
echo "Removed temporary repository"
|
||||||
else
|
else
|
||||||
err "Failed to add temporary repository"
|
err "Failed to add temporary repository"
|
||||||
return 1
|
return 1
|
||||||
@@ -701,7 +703,11 @@ install_mc_repo() {
|
|||||||
|
|
||||||
# Unset the trap and remove temporary legacy repository
|
# Unset the trap and remove temporary legacy repository
|
||||||
trap - EXIT
|
trap - EXIT
|
||||||
[[ -f $TEMP_REPO_FILE ]] && execute sudo rm -f "$TEMP_REPO_FILE"
|
if [[ -f $TEMP_REPO_FILE ]]; then
|
||||||
|
debug "Removing temporary repository: $TEMP_REPO_FILE"
|
||||||
|
execute sudo rm -f "$TEMP_REPO_FILE"
|
||||||
|
echo "Removed temporary repository"
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -767,12 +773,159 @@ acquire_deb() {
|
|||||||
[[ -f $MC_DEB ]]
|
[[ -f $MC_DEB ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @description Translates upstream DEB dependencies for several distros
|
||||||
|
translate_packages() {
|
||||||
|
debug "${FUNCNAME[0]}()" "$*"
|
||||||
|
local deb_file="$1"
|
||||||
|
declare -n requires_arr="$2"
|
||||||
|
declare -n recommends_arr="$3"
|
||||||
|
local -i i
|
||||||
|
|
||||||
|
# Load deb dependencies into array
|
||||||
|
IFS=',' read -ra requires_arr <<< "$(dpkg-deb -f "$deb_file" Depends)"
|
||||||
|
IFS=',' read -ra recommends_arr <<< "$(dpkg-deb -f "$deb_file" Recommends)"
|
||||||
|
|
||||||
|
# Clean up formatting
|
||||||
|
requires_arr=("${requires_arr[@]%%|*}")
|
||||||
|
requires_arr=("${requires_arr[@]/?:/}")
|
||||||
|
requires_arr=("${requires_arr[@]# }")
|
||||||
|
requires_arr=("${requires_arr[@]% }")
|
||||||
|
requires_arr=("${requires_arr[@]//\(/}")
|
||||||
|
requires_arr=("${requires_arr[@]//)/}")
|
||||||
|
recommends_arr=("${recommends_arr[@]%%|*}")
|
||||||
|
recommends_arr=("${recommends_arr[@]/?:/}")
|
||||||
|
recommends_arr=("${recommends_arr[@]# }")
|
||||||
|
recommends_arr=("${recommends_arr[@]% }")
|
||||||
|
recommends_arr=("${recommends_arr[@]//\(/}")
|
||||||
|
recommends_arr=("${recommends_arr[@]//)/}")
|
||||||
|
|
||||||
|
# Translate package names
|
||||||
|
case $BUILD_TARGET in
|
||||||
|
fedora|centos)
|
||||||
|
requires_arr=("${requires_arr[@]/libc6/glibc}")
|
||||||
|
requires_arr=("${requires_arr[@]/libasound2/alsa-lib}")
|
||||||
|
requires_arr=("${requires_arr[@]/libuuid1/libuuid}")
|
||||||
|
requires_arr=("${requires_arr[@]/libx11-6/libX11}")
|
||||||
|
requires_arr=("${requires_arr[@]/libxext6/libXext}")
|
||||||
|
requires_arr=("${requires_arr[@]/libxcb1*/libxcb}") # TODO Remove minimum version for MC31 (*)
|
||||||
|
requires_arr=("${requires_arr[@]/libxau6/libXau}")
|
||||||
|
requires_arr=("${requires_arr[@]/libxdmcp6/libXdmcp}")
|
||||||
|
requires_arr=("${requires_arr[@]/libstdc++6/libstdc++}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgtk-3-0/gtk3}")
|
||||||
|
requires_arr=("${requires_arr[@]/libegl1/mesa-libEGL}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgl1/mesa-libGL}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgles2/libglvnd-gles}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgbm1/mesa-libgbm}")
|
||||||
|
requires_arr=("${requires_arr[@]/libegl-mesa0/mesa-libEGL}")
|
||||||
|
requires_arr=("${requires_arr[@]/libvulkan1/vulkan-loader}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpango1.0-0/pango}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpango-1.0-0/pango}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpangoft2-1.0-0/pango}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpangox-1.0-0/pango}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpangoxft-1.0-0/pango}")
|
||||||
|
requires_arr=("${requires_arr[@]/libnss3/nss}")
|
||||||
|
requires_arr=("${requires_arr[@]/libnspr4/nspr}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgomp1/libgomp}")
|
||||||
|
requires_arr=("${requires_arr[@]/libfribidi0/fribidi}")
|
||||||
|
requires_arr=("${requires_arr[@]/libfontconfig1/fontconfig}")
|
||||||
|
requires_arr=("${requires_arr[@]/libfreetype6/freetype}")
|
||||||
|
requires_arr=("${requires_arr[@]/libharfbuzz0b/harfbuzz}")
|
||||||
|
requires_arr=("${requires_arr[@]/libva2/libva}")
|
||||||
|
requires_arr=("${requires_arr[@]/libva-drm2/libva}")
|
||||||
|
requires_arr=("${requires_arr[@]/libepoxy0/libepoxy}")
|
||||||
|
requires_arr=("${requires_arr[@]/liblcms2-2/lcms2}")
|
||||||
|
requires_arr=("${requires_arr[@]/libwebkit2gtk-4.0*/webkit2gtk4.0}")
|
||||||
|
requires_arr=("${requires_arr[@]/libwebkit2gtk-4.1*/webkit2gtk4.1}")
|
||||||
|
requires_arr=("${requires_arr[@]/libsdbus-c++1/sdbus-cpp}")
|
||||||
|
recommends_arr=("${recommends_arr[@]/fdkaac/fdk-aac-free}")
|
||||||
|
recommends_arr+=("mesa-va-drivers-freeworld|mesa-va-drivers")
|
||||||
|
recommends_arr+=("mesa-vulkan-drivers-freeworld|mesa-vulkan-drivers")
|
||||||
|
recommends_arr+=("mesa-vdpau-driver-freeworld|mesa-vdpau-driver")
|
||||||
|
;;
|
||||||
|
suse)
|
||||||
|
requires_arr=("${requires_arr[@]/libc6/glibc}")
|
||||||
|
requires_arr=("${requires_arr[@]/libasound2/alsa-lib}")
|
||||||
|
requires_arr=("${requires_arr[@]/libx11-6/libX11-6}")
|
||||||
|
requires_arr=("${requires_arr[@]/libxext6/libXext6}")
|
||||||
|
requires_arr=("${requires_arr[@]/libxdmcp6/libXdmcp6}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgtk-3-0/gtk3}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgl1/Mesa-libGL1}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpango-1.0-0/pango}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpangoft2-1.0-0/pango}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpangox-1.0-0/pango}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpangoxft-1.0-0/pango}")
|
||||||
|
requires_arr=("${requires_arr[@]/libnss3/mozilla-nss}")
|
||||||
|
requires_arr=("${requires_arr[@]/libnspr4/mozilla-nspr}")
|
||||||
|
requires_arr=("${requires_arr[@]/libfribidi0/fribidi}")
|
||||||
|
requires_arr=("${requires_arr[@]/libfontconfig1/fontconfig}")
|
||||||
|
requires_arr=("${requires_arr[@]/libharfbuzz0b/libharfbuzz0}")
|
||||||
|
requires_arr=("${requires_arr[@]/libwebkit2gtk-4.0*/libwebkit2gtk-4_0-37}")
|
||||||
|
requires_arr=("${requires_arr[@]/libwebkit2gtk-4.1*/libwebkit2gtk-4_1-0}")
|
||||||
|
for i in "${!requires_arr[@]}"; do
|
||||||
|
[[ ${requires_arr[$i]} == "mesa-vulkan-drivers" ]] && unset -v 'requires_arr[i]'
|
||||||
|
[[ ${requires_arr[$i]} == "libsdbus-c++1" ]] && unset -v 'requires_arr[i]'
|
||||||
|
done
|
||||||
|
recommends_arr+=(libvulkan1)
|
||||||
|
recommends_arr+=(libvulkan_intel)
|
||||||
|
recommends_arr+=(libvulkan_radeon)
|
||||||
|
recommends_arr+=(libvulkan_nouveau)
|
||||||
|
;;
|
||||||
|
mandriva)
|
||||||
|
requires_arr=("${requires_arr[@]/libc6/glibc}")
|
||||||
|
requires_arr=("${requires_arr[@]/libasound2/lib64asound2}")
|
||||||
|
requires_arr=("${requires_arr[@]/libuuid1/lib64uuid1}")
|
||||||
|
requires_arr=("${requires_arr[@]/libx11-6/lib64x11_6}")
|
||||||
|
requires_arr=("${requires_arr[@]/libxext6/lib64xext6}")
|
||||||
|
requires_arr=("${requires_arr[@]/libxcb1/lib64xcb1}")
|
||||||
|
requires_arr=("${requires_arr[@]/libxdmcp6/lib64xdmcp6}")
|
||||||
|
requires_arr=("${requires_arr[@]/libstdc++6/lib64stdc++6}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgtk-3-0/lib64gtk3_0}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgl1/lib64GL1}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgles2/lib64GLESv2_2}")
|
||||||
|
requires_arr=("${requires_arr[@]/libegl-mesa0/lib64EGL_mesa0}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpango1.0-0/lib64pango1.0_0}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpango-1.0-0/lib64pango1.0_0}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpangoft2-1.0-0/lib64pangoft2_1.0_0}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpango-cairo-1.0-0/lib64pangocairo1.0_0}")
|
||||||
|
requires_arr=("${requires_arr[@]/libpangoxft-1.0-0/lib64pangoxft1.0_0}")
|
||||||
|
requires_arr=("${requires_arr[@]/libnss3/lib64nss3}")
|
||||||
|
requires_arr=("${requires_arr[@]/libnspr4/lib64nspr4}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgomp1/lib64gomp1}")
|
||||||
|
requires_arr=("${requires_arr[@]/libfribidi0/lib64fribidi0}")
|
||||||
|
requires_arr=("${requires_arr[@]/libfontconfig1/lib64fontconfig}")
|
||||||
|
requires_arr=("${requires_arr[@]/libfreetype6/lib64freetype6}")
|
||||||
|
requires_arr=("${requires_arr[@]/libharfbuzz0b/lib64harfbuzz}")
|
||||||
|
requires_arr=("${requires_arr[@]/libgbm1/lib64gbm1}")
|
||||||
|
requires_arr=("${requires_arr[@]/libva2/lib64va2}")
|
||||||
|
requires_arr=("${requires_arr[@]/libva-drm2/lib64va-drm2}")
|
||||||
|
requires_arr=("${requires_arr[@]/libvulkan1/lib64vulkan1}")
|
||||||
|
requires_arr=("${requires_arr[@]/mesa-vulkan-drivers/lib64dri-drivers}")
|
||||||
|
requires_arr=("${requires_arr[@]/vulkan-icd/vulkan-loader}")
|
||||||
|
requires_arr=("${requires_arr[@]/libwebkit2gtk-4.1-0/lib64webkit2gtk4.1}")
|
||||||
|
recommends_arr=("${recommends_arr[@]/musepack-tools/mppenc}")
|
||||||
|
for i in "${!recommends_arr[@]}"; do
|
||||||
|
[[ ${recommends_arr[$i]} == "fdkaac" ]] && unset -v 'recommends_arr[i]'
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
arch)
|
||||||
|
# Set these manually for Arch since they are quite different
|
||||||
|
requires_arr=('alsa-lib' 'ca-certificates' 'gtk3' 'gcc-libs' 'libx11' 'libxext'
|
||||||
|
'libxcb' 'libxau' 'libxdmcp' 'util-linux' 'mesa-libgl' 'webkit2gtk')
|
||||||
|
recommends_arr=('mesa-libgl' 'nvidia-libgl' 'nvidia-utils' 'vulkan-intel'
|
||||||
|
'vulkan-radeon' 'vorbis-tools' 'musepack-tools')
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Skipping package translations for $ID"
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
# @description Creates a SPEC file and builds the RPM from the source DEB using rpmbuild
|
# @description Creates a SPEC file and builds the RPM from the source DEB using rpmbuild
|
||||||
build_rpm() {
|
build_rpm() {
|
||||||
debug "${FUNCNAME[0]}()"
|
debug "${FUNCNAME[0]}()"
|
||||||
|
declare -n requires_arr="$1"
|
||||||
|
declare -n recommends_arr="$2"
|
||||||
|
local requires_str recommends_str
|
||||||
local i rpmbuild_cmd stub
|
local i rpmbuild_cmd stub
|
||||||
local -a requires recommends
|
|
||||||
local spec_file="$OUTPUT_DIR/SPECS/mediacenter$MC_MVERSION-$MC_VERSION-$MC_RELEASE-$BUILD_TARGET-$ARCH.spec"
|
local spec_file="$OUTPUT_DIR/SPECS/mediacenter$MC_MVERSION-$MC_VERSION-$MC_RELEASE-$BUILD_TARGET-$ARCH.spec"
|
||||||
|
|
||||||
# skip rebuilding the rpm if it already exists
|
# skip rebuilding the rpm if it already exists
|
||||||
@@ -785,146 +938,6 @@ build_rpm() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load deb dependencies into array
|
|
||||||
IFS=',' read -ra requires <<< "$(dpkg-deb -f "$MC_DEB" Depends)"
|
|
||||||
IFS=',' read -ra recommends <<< "$(dpkg-deb -f "$MC_DEB" Recommends)"
|
|
||||||
|
|
||||||
# Clean up formatting
|
|
||||||
requires=("${requires[@]%%|*}")
|
|
||||||
requires=("${requires[@]/?:/}")
|
|
||||||
requires=("${requires[@]# }")
|
|
||||||
requires=("${requires[@]% }")
|
|
||||||
requires=("${requires[@]//\(/}")
|
|
||||||
requires=("${requires[@]//)/}")
|
|
||||||
recommends=("${recommends[@]%%|*}")
|
|
||||||
recommends=("${recommends[@]/?:/}")
|
|
||||||
recommends=("${recommends[@]# }")
|
|
||||||
recommends=("${recommends[@]% }")
|
|
||||||
recommends=("${recommends[@]//\(/}")
|
|
||||||
recommends=("${recommends[@]//)/}")
|
|
||||||
|
|
||||||
# Translate package names
|
|
||||||
case $BUILD_TARGET in
|
|
||||||
fedora|centos)
|
|
||||||
requires=("${requires[@]/libc6/glibc}")
|
|
||||||
requires=("${requires[@]/libasound2/alsa-lib}")
|
|
||||||
requires=("${requires[@]/libuuid1/libuuid}")
|
|
||||||
requires=("${requires[@]/libx11-6/libX11}")
|
|
||||||
requires=("${requires[@]/libxext6/libXext}")
|
|
||||||
requires=("${requires[@]/libxcb1*/libxcb}") # TODO Remove minimum version for MC31 (*)
|
|
||||||
requires=("${requires[@]/libxau6/libXau}")
|
|
||||||
requires=("${requires[@]/libxdmcp6/libXdmcp}")
|
|
||||||
requires=("${requires[@]/libstdc++6/libstdc++}")
|
|
||||||
requires=("${requires[@]/libgtk-3-0/gtk3}")
|
|
||||||
requires=("${requires[@]/libegl1/mesa-libEGL}")
|
|
||||||
requires=("${requires[@]/libgl1/mesa-libGL}")
|
|
||||||
requires=("${requires[@]/libgles2/libglvnd-gles}")
|
|
||||||
requires=("${requires[@]/libgbm1/mesa-libgbm}")
|
|
||||||
requires=("${requires[@]/libegl-mesa0/mesa-libEGL}")
|
|
||||||
requires=("${requires[@]/libvulkan1/vulkan-loader}")
|
|
||||||
requires=("${requires[@]/libpango1.0-0/pango}")
|
|
||||||
requires=("${requires[@]/libpango-1.0-0/pango}")
|
|
||||||
requires=("${requires[@]/libpangoft2-1.0-0/pango}")
|
|
||||||
requires=("${requires[@]/libpangox-1.0-0/pango}")
|
|
||||||
requires=("${requires[@]/libpangoxft-1.0-0/pango}")
|
|
||||||
requires=("${requires[@]/libnss3/nss}")
|
|
||||||
requires=("${requires[@]/libnspr4/nspr}")
|
|
||||||
requires=("${requires[@]/libgomp1/libgomp}")
|
|
||||||
requires=("${requires[@]/libfribidi0/fribidi}")
|
|
||||||
requires=("${requires[@]/libfontconfig1/fontconfig}")
|
|
||||||
requires=("${requires[@]/libfreetype6/freetype}")
|
|
||||||
requires=("${requires[@]/libharfbuzz0b/harfbuzz}")
|
|
||||||
requires=("${requires[@]/libva2/libva}")
|
|
||||||
requires=("${requires[@]/libva-drm2/libva}")
|
|
||||||
requires=("${requires[@]/libepoxy0/libepoxy}")
|
|
||||||
requires=("${requires[@]/liblcms2-2/lcms2}")
|
|
||||||
requires=("${requires[@]/libwebkit2gtk-4.0*/webkit2gtk4.0}")
|
|
||||||
requires=("${requires[@]/libwebkit2gtk-4.1*/webkit2gtk4.1}")
|
|
||||||
requires=("${requires[@]/libsdbus-c++1/sdbus-cpp}")
|
|
||||||
recommends=("${recommends[@]/fdkaac/fdk-aac-free}")
|
|
||||||
recommends+=("mesa-va-drivers-freeworld|mesa-va-drivers")
|
|
||||||
recommends+=("mesa-vulkan-drivers-freeworld|mesa-vulkan-drivers")
|
|
||||||
recommends+=("mesa-vdpau-driver-freeworld|mesa-vdpau-driver")
|
|
||||||
;;
|
|
||||||
suse)
|
|
||||||
requires=("${requires[@]/libc6/glibc}")
|
|
||||||
requires=("${requires[@]/libasound2/alsa-lib}")
|
|
||||||
requires=("${requires[@]/libx11-6/libX11-6}")
|
|
||||||
requires=("${requires[@]/libxext6/libXext6}")
|
|
||||||
requires=("${requires[@]/libxdmcp6/libXdmcp6}")
|
|
||||||
requires=("${requires[@]/libgtk-3-0/gtk3}")
|
|
||||||
requires=("${requires[@]/libgl1/Mesa-libGL1}")
|
|
||||||
requires=("${requires[@]/libpango-1.0-0/pango}")
|
|
||||||
requires=("${requires[@]/libpangoft2-1.0-0/pango}")
|
|
||||||
requires=("${requires[@]/libpangox-1.0-0/pango}")
|
|
||||||
requires=("${requires[@]/libpangoxft-1.0-0/pango}")
|
|
||||||
requires=("${requires[@]/libnss3/mozilla-nss}")
|
|
||||||
requires=("${requires[@]/libnspr4/mozilla-nspr}")
|
|
||||||
requires=("${requires[@]/libfribidi0/fribidi}")
|
|
||||||
requires=("${requires[@]/libfontconfig1/fontconfig}")
|
|
||||||
requires=("${requires[@]/libharfbuzz0b/libharfbuzz0}")
|
|
||||||
requires=("${requires[@]/libwebkit2gtk-4.0*/libwebkit2gtk-4_0-37}")
|
|
||||||
requires=("${requires[@]/libwebkit2gtk-4.1*/libwebkit2gtk-4_1-0}")
|
|
||||||
for i in "${!requires[@]}"; do
|
|
||||||
[[ ${requires[$i]} == "mesa-vulkan-drivers" ]] && unset -v 'requires[i]'
|
|
||||||
[[ ${requires[$i]} == "libsdbus-c++1" ]] && unset -v 'requires[i]'
|
|
||||||
done
|
|
||||||
recommends+=(libvulkan1)
|
|
||||||
recommends+=(libvulkan_intel)
|
|
||||||
recommends+=(libvulkan_radeon)
|
|
||||||
recommends+=(libvulkan_nouveau)
|
|
||||||
;;
|
|
||||||
mandriva)
|
|
||||||
requires=("${requires[@]/libc6/glibc}")
|
|
||||||
requires=("${requires[@]/libasound2/lib64asound2}")
|
|
||||||
requires=("${requires[@]/libuuid1/lib64uuid1}")
|
|
||||||
requires=("${requires[@]/libx11-6/lib64x11_6}")
|
|
||||||
requires=("${requires[@]/libxext6/lib64xext6}")
|
|
||||||
requires=("${requires[@]/libxcb1/lib64xcb1}")
|
|
||||||
requires=("${requires[@]/libxdmcp6/lib64xdmcp6}")
|
|
||||||
requires=("${requires[@]/libstdc++6/lib64stdc++6}")
|
|
||||||
requires=("${requires[@]/libgtk-3-0/lib64gtk3_0}")
|
|
||||||
requires=("${requires[@]/libgl1/lib64GL1}")
|
|
||||||
requires=("${requires[@]/libgles2/lib64GLESv2_2}")
|
|
||||||
requires=("${requires[@]/libegl-mesa0/lib64EGL_mesa0}")
|
|
||||||
requires=("${requires[@]/libpango1.0-0/lib64pango1.0_0}")
|
|
||||||
requires=("${requires[@]/libpango-1.0-0/lib64pango1.0_0}")
|
|
||||||
requires=("${requires[@]/libpangoft2-1.0-0/lib64pangoft2_1.0_0}")
|
|
||||||
requires=("${requires[@]/libpango-cairo-1.0-0/lib64pangocairo1.0_0}")
|
|
||||||
requires=("${requires[@]/libpangoxft-1.0-0/lib64pangoxft1.0_0}")
|
|
||||||
requires=("${requires[@]/libnss3/lib64nss3}")
|
|
||||||
requires=("${requires[@]/libnspr4/lib64nspr4}")
|
|
||||||
requires=("${requires[@]/libgomp1/lib64gomp1}")
|
|
||||||
requires=("${requires[@]/libfribidi0/lib64fribidi0}")
|
|
||||||
requires=("${requires[@]/libfontconfig1/lib64fontconfig}")
|
|
||||||
requires=("${requires[@]/libfreetype6/lib64freetype6}")
|
|
||||||
requires=("${requires[@]/libharfbuzz0b/lib64harfbuzz}")
|
|
||||||
requires=("${requires[@]/libgbm1/lib64gbm1}")
|
|
||||||
requires=("${requires[@]/libva2/lib64va2}")
|
|
||||||
requires=("${requires[@]/libva-drm2/lib64va-drm2}")
|
|
||||||
requires=("${requires[@]/libvulkan1/lib64vulkan1}")
|
|
||||||
requires=("${requires[@]/mesa-vulkan-drivers/lib64dri-drivers}")
|
|
||||||
requires=("${requires[@]/vulkan-icd/vulkan-loader}")
|
|
||||||
requires=("${requires[@]/libwebkit2gtk-4.1-0/lib64webkit2gtk4.1}")
|
|
||||||
recommends=("${recommends[@]/musepack-tools/mppenc}")
|
|
||||||
for i in "${!recommends[@]}"; do
|
|
||||||
[[ ${recommends[$i]} == "fdkaac" ]] && unset -v 'recommends[i]'
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Convert array to newline delim'd string (for heredoc)
|
|
||||||
printf -v requires "Requires: %s\n" "${requires[@]}"
|
|
||||||
printf -v recommends "Recommends: %s\n" "${recommends[@]}"
|
|
||||||
# Strip last newline
|
|
||||||
requires="${requires%?}"
|
|
||||||
recommends="${recommends%?}"
|
|
||||||
|
|
||||||
if ((COMPAT_SWITCH)); then
|
|
||||||
# Strip minimum versions
|
|
||||||
requires=$(echo "$requires" | awk -F" " 'NF == 4 {print $1 " " $2} NF != 4 {print $0}')
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Exclude MC stub executable <= MC31
|
# Exclude MC stub executable <= MC31
|
||||||
if [[ $MC_MVERSION -le 31 ]]; then
|
if [[ $MC_MVERSION -le 31 ]]; then
|
||||||
stub=""
|
stub=""
|
||||||
@@ -932,6 +945,18 @@ build_rpm() {
|
|||||||
stub="%{_bindir}/mc$MC_MVERSION"
|
stub="%{_bindir}/mc$MC_MVERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Convert array to newline delim'd string (for heredoc)
|
||||||
|
printf -v requires_str "Requires: %s\n" "${requires_arr[@]}"
|
||||||
|
printf -v recommends_str "Recommends: %s\n" "${recommends_arr[@]}"
|
||||||
|
# Strip last newline
|
||||||
|
requires_str="${requires_str%?}"
|
||||||
|
recommends_str="${recommends_str%?}"
|
||||||
|
|
||||||
|
if ((COMPAT_SWITCH)); then
|
||||||
|
# Strip minimum versions
|
||||||
|
requires_str=$(echo "$requires_str" | awk -F" " 'NF == 4 {print $1 " " $2} NF != 4 {print $0}')
|
||||||
|
fi
|
||||||
|
|
||||||
# Create spec file
|
# Create spec file
|
||||||
cat <<-EOF > "$spec_file"
|
cat <<-EOF > "$spec_file"
|
||||||
Name: mediacenter$MC_MVERSION
|
Name: mediacenter$MC_MVERSION
|
||||||
@@ -944,8 +969,8 @@ build_rpm() {
|
|||||||
|
|
||||||
AutoReq: 0
|
AutoReq: 0
|
||||||
|
|
||||||
$requires
|
$requires_str
|
||||||
$recommends
|
$recommends_str
|
||||||
|
|
||||||
Conflicts: MediaCenter
|
Conflicts: MediaCenter
|
||||||
|
|
||||||
@@ -992,6 +1017,35 @@ build_rpm() {
|
|||||||
execute "${rpmbuild_cmd[@]}" && [[ -f $MC_RPM ]]
|
execute "${rpmbuild_cmd[@]}" && [[ -f $MC_RPM ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @description Creates the Arch PKGBUILD file for Media Center
|
||||||
|
build_pkgbuild() {
|
||||||
|
debug "${FUNCNAME[0]}()"
|
||||||
|
declare -n requires_arr="$1"
|
||||||
|
declare -n recommends_arr="$2"
|
||||||
|
local pkgbuild_file="$OUTPUT_DIR/PKGBUILD/mediacenter.pkgbuild"
|
||||||
|
|
||||||
|
[[ -d $OUTPUT_DIR/PKGBUILD ]] || execute mkdir -p "$OUTPUT_DIR/PKGBUILD"
|
||||||
|
|
||||||
|
# Create PKGBUILD file
|
||||||
|
cat <<-EOF > "$pkgbuild_file"
|
||||||
|
pkgname=mediacenter$MC_MVERSION
|
||||||
|
pkgver=$MC_VERSION
|
||||||
|
pkgrel=$MC_RELEASE
|
||||||
|
pkgdesc="JRiver Media Center"
|
||||||
|
arch=("$ARCH")
|
||||||
|
url="https://www.jriver.com/"
|
||||||
|
license=("custom")
|
||||||
|
depends=(${requires_arr[@]})
|
||||||
|
optdepends=(${recommends_arr[@]})
|
||||||
|
source=("$MC_SOURCE")
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "\$srcdir"
|
||||||
|
bsdtar xf data.tar.xz -C "\$pkgdir"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
# @description Installs Media Center via DEB package w/ optional compatability fixes
|
# @description Installs Media Center via DEB package w/ optional compatability fixes
|
||||||
install_mc_deb() {
|
install_mc_deb() {
|
||||||
debug "${FUNCNAME[0]}()" "$@"
|
debug "${FUNCNAME[0]}()" "$@"
|
||||||
@@ -1022,7 +1076,9 @@ install_mc_deb() {
|
|||||||
|
|
||||||
# Add older repository for libwebkit2gtk-4.0-37, etc, on newer Debian/Ubuntu
|
# Add older repository for libwebkit2gtk-4.0-37, etc, on newer Debian/Ubuntu
|
||||||
if add_temp_repo; then
|
if add_temp_repo; then
|
||||||
|
debug "Removing temporary repo"
|
||||||
trap 'execute sudo rm -f "$TEMP_REPO_FILE"' EXIT
|
trap 'execute sudo rm -f "$TEMP_REPO_FILE"' EXIT
|
||||||
|
debug "Removed temporary repo"
|
||||||
else
|
else
|
||||||
err "Failed to add temporary repository"
|
err "Failed to add temporary repository"
|
||||||
return 1
|
return 1
|
||||||
@@ -1095,33 +1151,7 @@ install_mc_generic() {
|
|||||||
install_mc_arch() {
|
install_mc_arch() {
|
||||||
debug "${FUNCNAME[0]}()"
|
debug "${FUNCNAME[0]}()"
|
||||||
|
|
||||||
[[ -d $OUTPUT_DIR/PKGBUILD ]] || execute mkdir -p "$OUTPUT_DIR/PKGBUILD"
|
execute "${PKG_INSTALL[@]}" fakeroot # makepkg requires fakeroot
|
||||||
|
|
||||||
cat <<-EOF > "$OUTPUT_DIR/PKGBUILD/mediacenter.pkgbuild"
|
|
||||||
pkgname=mediacenter$MC_MVERSION
|
|
||||||
pkgver=$MC_VERSION
|
|
||||||
pkgrel=$MC_RELEASE
|
|
||||||
pkgdesc="The Most Comprehensive Media Software"
|
|
||||||
arch=("$ARCH")
|
|
||||||
url="https://www.jriver.com/"
|
|
||||||
license=('custom')
|
|
||||||
depends=('alsa-lib' 'ca-certificates' 'gtk3' 'gcc-libs' 'libx11' 'libxext' 'libxcb' 'libxau' 'libxdmcp' 'util-linux' 'mesa-libgl' 'webkit2gtk')
|
|
||||||
optdepends=(
|
|
||||||
'mesa-libgl: nouveau video support'
|
|
||||||
'nvidia-libgl: nvidia video support'
|
|
||||||
'nvidia-utils: nvidia vulkan support'
|
|
||||||
'vulkan-intel: intel vulkan support'
|
|
||||||
'vulkan-radeon: amd vulkan support'
|
|
||||||
'vorbis-tools: ogg vorbis support'
|
|
||||||
'musepack-tools: musepack support'
|
|
||||||
)
|
|
||||||
source=("$MC_SOURCE")
|
|
||||||
|
|
||||||
package() {
|
|
||||||
cd "\$srcdir"
|
|
||||||
bsdtar xf data.tar.xz -C "\$pkgdir"
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
pushd "$OUTPUT_DIR/PKGBUILD" &>/dev/null || return
|
pushd "$OUTPUT_DIR/PKGBUILD" &>/dev/null || return
|
||||||
|
|
||||||
@@ -1826,10 +1856,14 @@ main() {
|
|||||||
if ((BUILD_SWITCH)); then
|
if ((BUILD_SWITCH)); then
|
||||||
acquire_deb || { err "Could not download Media Center DEB package"; return 1; }
|
acquire_deb || { err "Could not download Media Center DEB package"; return 1; }
|
||||||
|
|
||||||
|
# Convert the source DEB dependencies to various distro-specific package naming
|
||||||
|
install_package dpkg
|
||||||
|
translate_packages "$MC_DEB" requires recommends
|
||||||
|
|
||||||
if [[ $BUILD_TARGET =~ centos|fedora|suse|mandriva || $CREATEREPO_TARGET =~ centos|fedora|suse|mandriva ]]; then
|
if [[ $BUILD_TARGET =~ centos|fedora|suse|mandriva || $CREATEREPO_TARGET =~ centos|fedora|suse|mandriva ]]; then
|
||||||
install_package dpkg rpm-build
|
install_package rpm-build
|
||||||
[[ -d $OUTPUT_DIR/SPECS ]] || execute mkdir -p "$OUTPUT_DIR/SPECS"
|
[[ -d $OUTPUT_DIR/SPECS ]] || execute mkdir -p "$OUTPUT_DIR/SPECS"
|
||||||
if build_rpm; then
|
if build_rpm requires recommends; then
|
||||||
echo "RPM package built successfully"
|
echo "RPM package built successfully"
|
||||||
else
|
else
|
||||||
err "Failed to build RPM package"
|
err "Failed to build RPM package"
|
||||||
@@ -1842,6 +1876,10 @@ main() {
|
|||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
elif [[ $BUILD_TARGET =~ arch ]]; then
|
||||||
|
if build_pkgbuild requires recommends; then
|
||||||
|
echo "Successfully generated Arch PKGBUILD"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user