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.

55 lines
1.7KB

  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. VERSION=$(cat ../wscript | awk 'sub("VERSION=","")' | tr -d "'")
  12. rm -f jack2-osx-root.pkg
  13. rm -f jack2-osx-${VERSION}.pkg
  14. rm -f package.xml
  15. # ---------------------------------------------------------------------------------------------------------------------
  16. pkgbuild \
  17. --identifier org.jackaudio.jack2 \
  18. --install-location "/usr/local/" \
  19. --root "${installed_prefix}/" \
  20. jack2-osx-root.pkg
  21. # ---------------------------------------------------------------------------------------------------------------------
  22. # https://developer.apple.com/library/content/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html
  23. pushd "${installed_prefix}"
  24. mkdir -p share/jack2
  25. touch share/jack2/jack2-osx-files.txt
  26. find -sL . -type f | awk 'sub("./","/usr/local/")' > share/jack2/jack2-osx-files.txt
  27. popd
  28. sed -e "s|@CURDIR@|${PWD}|" package.xml.in > package.xml
  29. cat package-welcome.txt.in "${installed_prefix}/share/jack2/jack2-osx-files.txt" > package-welcome.txt
  30. productbuild \
  31. --distribution package.xml \
  32. --identifier org.jackaudio.jack2 \
  33. --package-path "${PWD}" \
  34. --version ${VERSION} \
  35. jack2-osx-${VERSION}.pkg
  36. rm package.xml
  37. # ---------------------------------------------------------------------------------------------------------------------