snapcraft.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. layout:
  13. /usr/local/share/OpenZWave/qt-openzwavedatabase.rcc:
  14. bind-file: $SNAP/usr/share/qt5/qt-openzwavedatabase.rcc
  15. apps:
  16. ozwdaemon:
  17. # daemon: simple
  18. # restart-condition: on-failure
  19. command: usr/local/bin/ozwdaemon
  20. command-chain:
  21. - bin/env-wrapper
  22. plugs:
  23. - network
  24. - network-bind
  25. - raw-usb
  26. parts:
  27. open-zwave:
  28. plugin: make
  29. source: https://github.com/OpenZWave/open-zwave.git
  30. qtmqtt:
  31. after: [open-zwave]
  32. plugin: make # aka qmake
  33. source: https://github.com/qt/qtmqtt.git
  34. source-tag: 5.12.8
  35. build-packages:
  36. - build-essential
  37. - qt5-default
  38. - qtbase5-private-dev
  39. override-build: |
  40. if [ -f "Makefile" ]; then
  41. echo "Clean $SNAPCRAFT_PART_BUILD"
  42. qmake -r
  43. make distclean
  44. fi
  45. qmake
  46. make -j$(nproc)
  47. make -j$(nproc) install
  48. make -j$(nproc) install INSTALL_ROOT="${SNAPCRAFT_PART_INSTALL}"
  49. override-prime: |
  50. snapcraftctl prime
  51. stage-packages:
  52. - libdouble-conversion3
  53. - libfreetype6
  54. - libgl1
  55. - libglvnd0
  56. - libglx0
  57. - libgraphite2-3
  58. - libharfbuzz0b
  59. - libicu66
  60. - libpcre2-16-0
  61. - libpng16-16
  62. - libqt5core5a
  63. - libqt5gui5
  64. - libqt5network5
  65. - libqt5websockets5
  66. - libqt5widgets5
  67. - libx11-6
  68. - libxau6
  69. - libxcb1
  70. - libxdmcp6
  71. qt-openzwave:
  72. after: [open-zwave, qtmqtt]
  73. plugin: make # aka qmake?
  74. source: https://github.com/OpenZWave/qt-openzwave.git
  75. build-packages:
  76. - build-essential
  77. - qt5-default
  78. - libqt5websockets5-dev
  79. - libqt5remoteobjects5-dev
  80. - libqt5remoteobjects5-bin
  81. - gcc-8-base
  82. - libgcc-8-dev
  83. - cmake
  84. - pkgconf
  85. - libunwind-dev
  86. - libcurl4-openssl-dev
  87. - rapidjson-dev
  88. stage-packages:
  89. - libdouble-conversion3
  90. - libicu66
  91. - libpcre2-16-0
  92. - libqt5core5a
  93. - libqt5network5
  94. - libqt5remoteobjects5
  95. - libqt5websockets5
  96. - libunwind8
  97. override-build: |
  98. if [ -f "Makefile" ]; then
  99. echo "Clean $SNAPCRAFT_PART_BUILD"
  100. qmake -r
  101. make distclean
  102. fi
  103. INSTALL_PATH="${HOME}"
  104. if [ ! -z ${container+x} ]; then
  105. INSTALL_PATH="/build/${SNAPCRAFT_PROJECT_NAME}"
  106. fi
  107. OZW_LIB_PATH="$(dirname $(find ${INSTALL_PATH}/parts/open-zwave/install -name libopenzwave.so -print0 -quit))"
  108. OZW_INCLUDE_PATH="$(dirname $(find ${INSTALL_PATH}/parts/open-zwave/install -name Manager.h -print0 -quit))"
  109. OZW_DATABASE_PATH="$(dirname $(find ${INSTALL_PATH}/parts/open-zwave/install -name manufacturer_specific.xml))"
  110. qmake -r "CONFIG+=release" \
  111. OZW_LIB_PATH="${OZW_LIB_PATH}" \
  112. OZW_INCLUDE_PATH="${OZW_INCLUDE_PATH}" \
  113. OZW_DATABASE_PATH="${OZW_DATABASE_PATH}"
  114. make -j$(nproc)
  115. make -j$(nproc) install INSTALL_ROOT="${SNAPCRAFT_PART_INSTALL}"
  116. local-src:
  117. after: [qt-openzwave]
  118. plugin: dump
  119. source: ./src
  120. source-type: local
  121. # override-build: |
  122. # snapcraftctl build
  123. # echo $SNAPCRAFT_PROJECT_DIR
  124. organize:
  125. hooks: snap/hooks