snapcraft.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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: devmode
  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 INSTALL_ROOT="${SNAPCRAFT_PART_INSTALL}"
  42. stage-packages:
  43. - libdouble-conversion3
  44. - libfreetype6
  45. - libgl1
  46. - libglvnd0
  47. - libglx0
  48. - libgraphite2-3
  49. - libharfbuzz0b
  50. - libicu66
  51. - libpcre2-16-0
  52. - libpng16-16
  53. - libqt5core5a
  54. - libqt5gui5
  55. - libqt5network5
  56. - libqt5websockets5
  57. - libqt5widgets5
  58. - libx11-6
  59. - libxau6
  60. - libxcb1
  61. - libxdmcp6
  62. qt-openzwave:
  63. after: [open-zwave, qtmqtt]
  64. plugin: make # aka qmake?
  65. source: https://github.com/OpenZWave/qt-openzwave.git
  66. build-packages:
  67. - build-essential
  68. - qt5-default
  69. - libqt5websockets5-dev
  70. - libqt5remoteobjects5-dev
  71. - libqt5remoteobjects5-bin
  72. - gcc-8-base
  73. - libgcc-8-dev
  74. - cmake
  75. - pkgconf
  76. - libunwind-dev
  77. - libcurl4-openssl-dev
  78. - rapidjson-dev
  79. stage-packages:
  80. - libdouble-conversion3
  81. - libicu66
  82. - libpcre2-16-0
  83. - libqt5core5a
  84. - libqt5network5
  85. - libqt5remoteobjects5
  86. - libqt5websockets5
  87. - libunwind8
  88. override-build: |
  89. if [ -f "Makefile" ]; then
  90. echo "Clean $SNAPCRAFT_PART_BUILD"
  91. qmake -r
  92. make distclean
  93. fi
  94. OZW_LIB_PATH="$(dirname $(find $HOME/parts/open-zwave/install -name libopenzwave.so -print0 -quit))"
  95. OZW_INCLUDE_PATH="$(dirname $(find $HOME/parts/open-zwave/install -name Manager.h -print0 -quit))"
  96. OZW_DATABASE_PATH="$(dirname $(find $HOME/parts/open-zwave/install -name manufacturer_specific.xml))"
  97. qmake -r "CONFIG+=release" \
  98. OZW_LIB_PATH="${OZW_LIB_PATH}" \
  99. OZW_INCLUDE_PATH="${OZW_INCLUDE_PATH}" \
  100. OZW_DATABASE_PATH="${OZW_DATABASE_PATH}"
  101. make -j$(nproc)
  102. make -j$(nproc) install INSTALL_ROOT="${SNAPCRAFT_PART_INSTALL}"
  103. local-src:
  104. after: [qt-openzwave]
  105. plugin: dump
  106. source: ./src
  107. source-type: local