jack2 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.8KB

  1. #!/bin/bash
  2. set -e
  3. cd $(dirname ${0})
  4. # ---------------------------------------------------------------------------------------------------------------------
  5. installed_prefix="${1}"
  6. if [ -z "${installed_prefix}" ]; then
  7. echo "usage: ${0} <installed_prefix>"
  8. exit 1
  9. fi
  10. # ---------------------------------------------------------------------------------------------------------------------
  11. if [ -n "${2}" ]; then
  12. VERSION="${2}"
  13. else
  14. VERSION=$(cat ../wscript | awk 'sub("VERSION=","")' | tr -d "'")
  15. fi
  16. rm -f jack2-osx-root.pkg
  17. rm -f jack2-osx-${VERSION}.pkg
  18. rm -f package.xml
  19. # ---------------------------------------------------------------------------------------------------------------------
  20. pkgbuild \
  21. --identifier org.jackaudio.jack2 \
  22. --install-location "/usr/local/" \
  23. --root "${installed_prefix}/" \
  24. jack2-osx-root.pkg
  25. # ---------------------------------------------------------------------------------------------------------------------
  26. # https://developer.apple.com/library/content/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html
  27. pushd "${installed_prefix}"
  28. mkdir -p share/jack2
  29. touch share/jack2/jack2-osx-files.txt
  30. find -sL . -type f | awk 'sub("./","/usr/local/")' > share/jack2/jack2-osx-files.txt
  31. popd
  32. sed -e "s|@CURDIR@|${PWD}|" package.xml.in > package.xml
  33. cat package-welcome.txt.in "${installed_prefix}/share/jack2/jack2-osx-files.txt" > package-welcome.txt
  34. productbuild \
  35. --distribution package.xml \
  36. --identifier org.jackaudio.jack2 \
  37. --package-path "${PWD}" \
  38. --version ${VERSION} \
  39. jack2-osx-${VERSION}.pkg
  40. rm jack2-osx-root.pkg package.xml package-welcome.txt
  41. # ---------------------------------------------------------------------------------------------------------------------