entrypoint.sh 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/bash
  2. ZTO_VER=$(git describe --abbrev=0 --tags)
  3. ZTO_COMMIT=$(git rev-parse HEAD)
  4. ZTO_DESC=$(jq -r '.desc' ../config.json)
  5. mkdir -p pkg/qnap/zerotier/arm_64
  6. mkdir -p pkg/qnap/zerotier/arm_x09
  7. mkdir -p pkg/qnap/zerotier/arm_x10
  8. mkdir -p pkg/qnap/zerotier/arm_x12
  9. mkdir -p pkg/qnap/zerotier/arm_x19
  10. mkdir -p pkg/qnap/zerotier/arm_x31
  11. mkdir -p pkg/qnap/zerotier/arm_x41
  12. mkdir -p pkg/qnap/zerotier/x86_64
  13. mkdir -p pkg/qnap/zerotier/x86
  14. mkdir -p pkg/qnap/zerotier/x86_ce53xx
  15. cat > pkg/qnap/zerotier/qpkg.cfg <<- EOM
  16. # Update package config
  17. # Name of the packaged application.
  18. QPKG_NAME="zerotier"
  19. # Name of the display application.
  20. QPKG_DISPLAY_NAME="ZeroTier"
  21. # Version of the packaged application.
  22. QPKG_VER="$ZTO_VER"
  23. # Author or maintainer of the package
  24. QPKG_AUTHOR="ZeroTier, Inc."
  25. # License for the packaged application
  26. QPKG_LICENSE="BUSL-1.1"
  27. # One-line description of the packaged application
  28. QPKG_SUMMARY="$ZTO_DESC"
  29. # Preferred number in start/stop sequence.
  30. QPKG_RC_NUM="101"
  31. # Init-script used to control the start and stop of the installed application.
  32. QPKG_SERVICE_PROGRAM="zerotier.sh"
  33. # Specifies any packages required for the current package to operate.
  34. QPKG_REQUIRE="QVPN Service"
  35. # Specifies what packages cannot be installed if the current package
  36. # is to operate properly.
  37. #QPKG_CONFLICT="Python, OPT/sed"
  38. # Name of configuration file (multiple definitions are allowed).
  39. #QPKG_CONFIG="myApp.conf"
  40. #QPKG_CONFIG="/etc/config/myApp.conf"
  41. # Port number used by service program.
  42. QPKG_SERVICE_PORT="9993"
  43. # Minimum QTS version requirement
  44. QTS_MINI_VERSION="4.1.0"
  45. # Maximum QTS version requirement
  46. QTS_MAX_VERSION="5.0.0"
  47. # Location of icons for the packaged application.
  48. QDK_DATA_DIR_ICONS="icons"
  49. EOM
  50. # Copy binaries into pkg directory
  51. # See: https://github.com/qnap-dev/QDK
  52. cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-aarch64 pkg/qnap/zerotier/arm_64/zerotier-one
  53. #cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-armv5tejl pkg/qnap/zerotier/arm-x09/zerotier-one
  54. #cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-armv5tel pkg/qnap/zerotier/arm-x19/zerotier-one
  55. cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-armhf pkg/qnap/zerotier/arm-x31/zerotier-one
  56. cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-armhf pkg/qnap/zerotier/arm-x41/zerotier-one
  57. cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-i386 pkg/qnap/zerotier/x86/zerotier-one
  58. cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-x86_64 pkg/qnap/zerotier/x86_64/zerotier-one
  59. cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-i386 pkg/qnap/zerotier/x86_ce53xx/zerotier-one
  60. rm -rf output/qnap/*
  61. pushd pkg/qnap/zerotier
  62. ./qbuild #--build-arch arm-x31
  63. cp -f build/* ../../../output/qnap
  64. # Show output product
  65. cd popd