From 06bea241f1122f86571c6b3bb6913cad8c102b60 Mon Sep 17 00:00:00 2001 From: G3rb <93rb1n4t0r@gmail.com> Date: Wed, 18 Apr 2018 14:24:57 +0200 Subject: [PATCH] Update package.sh On several Linux version (Mint 18 for example) the package libavcodec-ffmpeg56 is replaced by libavcodec-ffmpeg-extra56. To increase the compatibility I added an exception which define a conditional dependency between these two packages. --- release_scripts/linux/package.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/release_scripts/linux/package.sh b/release_scripts/linux/package.sh index e600a5e6..2143fe57 100755 --- a/release_scripts/linux/package.sh +++ b/release_scripts/linux/package.sh @@ -345,10 +345,15 @@ fi for ((i=0;i<${#tab[@]};i++)); do if [ $i -ne "0" ]; then - echo -n ", " >> "$CONTROL_FILE" + echo -n ", " >> "$CONTROL_FILE" + fi + # conditional dependency when libavcodec-ffmpeg56 or libavcodec-ffmpeg-extra56 is found + depdVer=$(apt-cache show ${tab[$i]} | grep "Version: " | head -1 | awk '{ print $2 }' | sed -e 's/\([:. 0-9?]*\).*/\1/g' | sed -e 's/\.$//') + if [ "${tab[$i]}" == "libavcodec-ffmpeg56" ] || [ "${tab[$i]}" == "libavcodec-ffmpeg-extra56" ]; then + echo -n "libavcodec-ffmpeg56 (>= ${depdVer}) | libavcodec-ffmpeg-extra56 (>= ${depdVer})" >> "$CONTROL_FILE" + else + echo -n "${tab[$i]} (>= ${depdVer})" >> "$CONTROL_FILE" fi - - echo -n "${tab[$i]} (>= "`apt-cache show ${tab[$i]} | grep "Version: " | head -1 | awk '{ print $2 }' | sed -e 's/\([:. 0-9?]*\).*/\1/g' | sed -e 's/\.$//'`") " >> "$CONTROL_FILE" done echo -n ", onboard" >> "$CONTROL_FILE"