snapcraft.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. name: ozwdaemon
  2. base: core20
  3. version: '0.1'
  4. summary: Single-line elevator pitch for your amazing snap # 79 char long summary
  5. description: |
  6. This is my-snap's description. You have a paragraph or two to tell the
  7. most important story about your snap. Keep it under 100 words though,
  8. we live in tweetspace and your description wants to look good in the snap
  9. store.
  10. grade: devel
  11. confinement: strict
  12. apps:
  13. ozwdaemon:
  14. command: usr/local/bin/ozwdaemon
  15. command-chain:
  16. - bin/env-wrapper
  17. plugs:
  18. - network
  19. - network-bind
  20. - raw-usb
  21. parts:
  22. open-zwave:
  23. plugin: make
  24. source: https://github.com/OpenZWave/open-zwave.git
  25. qtmqtt:
  26. plugin: make # aka qmake
  27. source: https://github.com/qt/qtmqtt.git
  28. source-tag: 5.12.8
  29. build-packages:
  30. - build-essential
  31. - qt5-default
  32. - qtbase5-private-dev
  33. override-build: |
  34. if [ -f "Makefile" ]; then
  35. echo "Clean $SNAPCRAFT_PART_BUILD"
  36. qmake -r
  37. make distclean
  38. fi
  39. qmake
  40. make -j$(nproc)
  41. make -j$(nproc) install
  42. make -j$(nproc) install INSTALL_ROOT="${SNAPCRAFT_PART_INSTALL}"
  43. override-prime: |
  44. snapcraftctl prime
  45. stage-packages:
  46. - libdouble-conversion3
  47. - libfreetype6
  48. - libgl1
  49. - libglvnd0
  50. - libglx0
  51. - libgraphite2-3
  52. - libharfbuzz0b
  53. - libicu66
  54. - libpcre2-16-0
  55. - libpng16-16
  56. - libqt5core5a
  57. - libqt5gui5
  58. - libqt5network5
  59. - libqt5websockets5
  60. - libqt5widgets5
  61. - libx11-6
  62. - libxau6
  63. - libxcb1
  64. - libxdmcp6
  65. qt-openzwave:
  66. after: [open-zwave, qtmqtt]
  67. plugin: make # aka qmake?
  68. source: https://github.com/OpenZWave/qt-openzwave.git
  69. build-packages:
  70. - build-essential
  71. - qt5-default
  72. - libqt5websockets5-dev
  73. - libqt5remoteobjects5-dev
  74. - libqt5remoteobjects5-bin
  75. - gcc-8-base
  76. - libgcc-8-dev
  77. - cmake
  78. - pkgconf
  79. - libunwind-dev
  80. - libcurl4-openssl-dev
  81. - rapidjson-dev
  82. stage-packages:
  83. - libdouble-conversion3
  84. - libicu66
  85. - libpcre2-16-0
  86. - libqt5core5a
  87. - libqt5network5
  88. - libqt5remoteobjects5
  89. - libqt5websockets5
  90. - libunwind8
  91. override-build: |
  92. if [ -f "Makefile" ]; then
  93. echo "Clean $SNAPCRAFT_PART_BUILD"
  94. qmake -r
  95. make distclean
  96. fi
  97. OZW_LIB_PATH="$(dirname $(find $HOME/parts/open-zwave/install -name libopenzwave.so -print0 -quit))"
  98. OZW_INCLUDE_PATH="$(dirname $(find $HOME/parts/open-zwave/install -name Manager.h -print0 -quit))"
  99. OZW_DATABASE_PATH="$(dirname $(find $HOME/parts/open-zwave/install -name manufacturer_specific.xml))"
  100. qmake -r "CONFIG+=release" \
  101. OZW_LIB_PATH="${OZW_LIB_PATH}" \
  102. OZW_INCLUDE_PATH="${OZW_INCLUDE_PATH}" \
  103. OZW_DATABASE_PATH="${OZW_DATABASE_PATH}"
  104. make -j$(nproc)
  105. make -j$(nproc) install INSTALL_ROOT="${SNAPCRAFT_PART_INSTALL}"
  106. local-src:
  107. after: [qt-openzwave]
  108. plugin: dump
  109. source: ./src
  110. source-type: local
  111. organize:
  112. hooks: snap/hooks