build.debian.armhf 1.2 KB

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