From ce254ffc2d4893625b208cab609c4391694477b4 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sat, 8 Jun 2024 11:04:09 -0400 Subject: [PATCH] Switch to deb12/ubu2204/etc. format for .deb ver Ensures compatibility with the main Jellyfin packages. --- .gitignore | 1 + deployment/build.debian | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 6a5ba50..79134a4 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ debian/.debhelper/ debian/jellyfin-media-player/ debian/files debian/jellyfin-media-player.substvars +debian/debhelper-build-stamp dist.zip obj-x86_64-linux-gnu/ deployment/dist diff --git a/deployment/build.debian b/deployment/build.debian index 75e51c1..27b1be5 100755 --- a/deployment/build.debian +++ b/deployment/build.debian @@ -6,18 +6,25 @@ set -o xtrace # move to source directory pushd ${SOURCE_DIR} +# Convert to format like deb12 or ubu2204 like Jellyfin packages +IMGSNIP="${IMG:0:3}" +RELVER="$( grep 'VERSION_ID' /etc/os-release | awk -F'"' '{ print $2 }' | tr -d '.' )" +DEBVER="${IMGSNIP}${RELVER}" + +cp -a debian/changelog /changelog.orig +sed -i "1 s/-1)/+${DEBVER})/" debian/changelog + # install deps echo y | mk-build-deps -i +rm jellyfin-media-player-build-deps_* # build deb dpkg-buildpackage -us -uc --pre-clean --post-clean +mv /changelog.orig debian/changelog + mkdir -p ${ARTIFACT_DIR} -for source_file in ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} -do - file=$(basename "$source_file") - mv "$source_file" "${ARTIFACT_DIR}/${file%.*}-${TAG}.${file##*.}" -done +mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}/ if [[ ${IS_DOCKER} == YES ]]; then chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}