From 98ba7e31d9ed3dc61f791e6599cc07cc2c64d4dc Mon Sep 17 00:00:00 2001 From: bryan Date: Fri, 18 Oct 2024 19:13:32 -0400 Subject: [PATCH] Exclude MC stub from rpmbuild for MC31 and earlier --- installJRMC | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/installJRMC b/installJRMC index 971b711..01c1d7b 100755 --- a/installJRMC +++ b/installJRMC @@ -652,7 +652,7 @@ acquire_deb() { build_rpm() { debug "Running: ${FUNCNAME[0]}" - local i rpmbuild_cmd + local i rpmbuild_cmd stub local -a requires recommends # skip rebuilding the rpm if it already exists @@ -752,6 +752,13 @@ build_rpm() { requires=$(echo "$requires" | awk -F" " 'NF == 4 {print $1 " " $2} NF != 4 {print $0}') fi + # Exclude MC stub executable <= MC31 + if [[ $MC_MVERSION -le 31 ]]; then + stub="" + else + stub="%{_bindir}/mc$MC_MVERSION" + fi + # Create spec file cat <<-EOF > "$OUTPUT_DIR/SPECS/mediacenter.spec" Name: mediacenter$MC_MVERSION @@ -793,7 +800,7 @@ build_rpm() { %files %{_bindir}/mediacenter$MC_MVERSION - %{_bindir}/mc$MC_MVERSION + $stub %{_libdir}/jriver %{_datadir} %exclude %{_datadir}/applications/media_center_packageinstaller_$MC_MVERSION.desktop