snapcraft.yaml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. name: wekan
  2. version: '5.35'
  3. summary: The open-source kanban
  4. description: |
  5. Wekan is an open-source and collaborative kanban board application.
  6. Whether you’re maintaining a personal todo list, planning your holidays with some friends, or working in a team on your next revolutionary idea, Kanban boards are an unbeatable tool to keep your things organized. They give you a visual overview of the current state of your project, and make you productive by allowing you to focus on the few items that matter the most.
  7. Depending on target environment, some configuration settings might need to be adjusted.
  8. For full list of configuration options call:
  9. $ wekan.help
  10. confinement: strict
  11. grade: stable
  12. architectures:
  13. - amd64
  14. plugs:
  15. mongodb-plug:
  16. interface: content
  17. target: $SNAP_DATA/shared
  18. hooks:
  19. configure:
  20. plugs:
  21. - network
  22. - network-bind
  23. slots:
  24. mongodb-slot:
  25. interface: content
  26. write:
  27. - $SNAP_DATA/share
  28. apps:
  29. wekan:
  30. command: wekan-control
  31. daemon: simple
  32. plugs: [network, network-bind]
  33. mongodb:
  34. command: mongodb-control
  35. daemon: simple
  36. plugs: [network, network-bind]
  37. caddy:
  38. command: caddy-control
  39. daemon: simple
  40. plugs: [network, network-bind]
  41. help:
  42. command: wekan-help
  43. database-backup:
  44. command: mongodb-backup
  45. plugs: [network, network-bind]
  46. database-list-backups:
  47. command: ls -al $SNAP_COMMON/db-backups/
  48. database-restore:
  49. command: mongodb-restore
  50. plugs: [network, network-bind]
  51. parts:
  52. mongodb:
  53. source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.2.22.tgz
  54. plugin: dump
  55. stage-packages: [libssl1.0.0]
  56. filesets:
  57. mongo:
  58. - usr
  59. - bin
  60. - lib
  61. stage:
  62. - $mongo
  63. prime:
  64. - $mongo
  65. wekan:
  66. source: .
  67. plugin: nodejs
  68. node-engine: 12.22.1
  69. node-packages:
  70. - node-gyp
  71. - node-pre-gyp
  72. - fibers
  73. build-packages:
  74. - ca-certificates
  75. - apt-utils
  76. - python
  77. # - python3
  78. - g++
  79. - capnproto
  80. - curl
  81. - execstack
  82. - nodejs
  83. - npm
  84. # - p7zip-full
  85. stage-packages:
  86. - libfontconfig1
  87. override-build: |
  88. echo "Cleaning environment first"
  89. rm -rf ~/.meteor ~/.npm /usr/local/lib/node_modules
  90. rm -rf .build
  91. echo "Installing meteor"
  92. curl https://install.meteor.com/ -o install_meteor.sh
  93. chmod +x install_meteor.sh
  94. sh install_meteor.sh
  95. rm install_meteor.sh
  96. rm -rf .build
  97. chmod u+w *.json
  98. npm install
  99. meteor build .build --directory --allow-superuser
  100. # Remove legacy webbroser bundle, so that Wekan works also at Android Firefox, iOS Safari, etc.
  101. rm -rf .build/bundle/programs/web.browser.legacy
  102. # Change to directory .build/bundle/programs/server
  103. cd .build/bundle/programs/server
  104. chmod u+w *.json
  105. npm install
  106. cd ../../../..
  107. # Cleanup
  108. cd .build/bundle
  109. find . -type d -name '*-garbage*' | xargs rm -rf
  110. find . -name '*phantom*' | xargs rm -rf
  111. find . -name '.*.swp' | xargs rm -f
  112. find . -name '*.swp' | xargs rm -f
  113. cd ../..
  114. # Add fibers multi arch
  115. #cd .build/bundle/programs/server/node_modules/fibers/bin
  116. #curl https://releases.wekan.team/fibers-multi.7z -o fibers-multi.7z
  117. #7z x fibers-multi.7z
  118. #rm fibers-multi.7z
  119. #cd ../../../../../../..
  120. # Copy to Snap
  121. cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
  122. cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
  123. rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/wekan
  124. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/rajit_bootstrap3-datepicker/lib/bootstrap-datepicker/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
  125. # Delete phantomjs that is in accounts-lockout
  126. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/lucasantoniassi_accounts-lockout/node_modules/phantomjs-prebuilt
  127. # Delete temporary files
  128. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/tar/lib/.mkdir.js.swp
  129. #rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  130. #rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-gyp/node_modules/tar/lib/.mkdir.js.swp
  131. # Meteor 1.8.x additional .swp remove
  132. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  133. # Delete fibers for other archs
  134. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/fibers/bin/linux-ia32*
  135. # ostrio tmp remove
  136. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/request-libcurl/.node_modules-garbage*
  137. organize:
  138. README: README.wekan
  139. prime:
  140. - -lib/node_modules/node-pre-gyp/node_modules/tar/lib/.unpack.js.swp
  141. - -lib/node_modules/weka*
  142. helpers:
  143. source: snap-src
  144. plugin: dump
  145. caddy:
  146. plugin: dump
  147. ## Caddy v1 is not developed anymore. TODO: Sometime migrate to Caddy v2.
  148. ## https://caddy.community/t/caddyfile-v1-adapter/9129
  149. ## https://github.com/caddyserver/caddy/tree/v1
  150. #source: https://caddyserver.com/download/linux/amd64?license=personal&telemetry=off
  151. #source-type: tar
  152. # Using last working binary that was downloaded from above URL to Wekan Snap,
  153. # and .txt files from https://github.com/caddyserver/caddy/tree/v1/dist
  154. source: https://releases.wekan.team/caddy/caddy-v1-linux-amd64.7z
  155. source-type: 7z
  156. organize:
  157. caddy: bin/caddy
  158. CHANGES.txt: CADDY_CHANGES.txt
  159. EULA.txt: CADDY_EULA.txt
  160. LICENSES.txt: CADDY_LICENSES.txt
  161. README.txt: CADDY_README.txt
  162. stage:
  163. - -init