build.ubuntu.amd64 962 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. #= Ubuntu 22.04+ amd64 .deb
  3. set -o errexit
  4. set -o xtrace
  5. # Move to source directory
  6. pushd "${SOURCE_DIR}"
  7. # Modify changelog to unstable configuration if IS_UNSTABLE
  8. if [[ ${IS_UNSTABLE} == 'yes' ]]; then
  9. pushd debian
  10. PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )
  11. cat <<EOF >changelog
  12. jellyfin-server (${BUILD_ID}-unstable) unstable; urgency=medium
  13. * Jellyfin Server unstable build ${BUILD_ID} for merged PR #${PR_ID}
  14. -- Jellyfin Packaging Team <packaging@jellyfin.org> $( date --rfc-2822 )
  15. EOF
  16. popd
  17. fi
  18. # Build DEB
  19. dpkg-buildpackage -us -uc --pre-clean --post-clean
  20. mkdir -p "${ARTIFACT_DIR}/"
  21. mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} "${ARTIFACT_DIR}/"
  22. if [[ ${IS_DOCKER} == YES ]]; then
  23. cp -a /tmp/control.orig debian/control
  24. chown -Rc "$(stat -c %u:%g "${ARTIFACT_DIR}")" "${ARTIFACT_DIR}"
  25. fi
  26. popd