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