snapcraft.yaml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. name: wekan
  2. version: '6.18'
  3. summary: 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: 14.19.1
  69. node-packages:
  70. - node-gyp
  71. - node-pre-gyp
  72. - fibers
  73. build-packages:
  74. - build-essential
  75. - ca-certificates
  76. - apt-utils
  77. - python
  78. # - python3
  79. - g++
  80. - capnproto
  81. - curl
  82. - execstack
  83. - nodejs
  84. - npm
  85. # - p7zip-full
  86. stage-packages:
  87. - libfontconfig1
  88. override-build: |
  89. echo "Cleaning environment first"
  90. rm -rf ~/.meteor ~/.npm /usr/local/lib/node_modules
  91. rm -rf .build
  92. echo "Installing meteor"
  93. curl https://install.meteor.com/ -o install_meteor.sh
  94. chmod +x install_meteor.sh
  95. sh install_meteor.sh
  96. rm install_meteor.sh
  97. rm -rf .build
  98. chmod u+w *.json
  99. npm install
  100. meteor build .build --directory --allow-superuser
  101. # Remove legacy webbroser bundle, so that Wekan works also at Android Firefox, iOS Safari, etc.
  102. rm -rf .build/bundle/programs/web.browser.legacy
  103. # Change to directory .build/bundle/programs/server
  104. cd .build/bundle/programs/server
  105. chmod u+w *.json
  106. npm install
  107. cd node_modules/fibers
  108. node build.js
  109. cd ../../../../../..
  110. # Cleanup
  111. cd .build/bundle
  112. find . -type d -name '*-garbage*' | xargs rm -rf
  113. find . -name '*phantom*' | xargs rm -rf
  114. find . -name '.*.swp' | xargs rm -f
  115. find . -name '*.swp' | xargs rm -f
  116. cd ../..
  117. # Add fibers multi arch
  118. #cd .build/bundle/programs/server/node_modules/fibers/bin
  119. #curl https://releases.wekan.team/fibers-multi.7z -o fibers-multi.7z
  120. #7z x fibers-multi.7z
  121. #rm fibers-multi.7z
  122. #cd ../../../../../../..
  123. # Copy to Snap
  124. cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
  125. cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
  126. rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/wekan
  127. #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
  128. # Delete phantomjs that is in accounts-lockout
  129. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/lucasantoniassi_accounts-lockout/node_modules/phantomjs-prebuilt
  130. # Delete temporary files
  131. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/tar/lib/.mkdir.js.swp
  132. #rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  133. #rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-gyp/node_modules/tar/lib/.mkdir.js.swp
  134. # Meteor 1.8.x additional .swp remove
  135. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  136. # Delete fibers for other archs
  137. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/fibers/bin/linux-ia32*
  138. # ostrio tmp remove
  139. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/request-libcurl/.node_modules-garbage*
  140. organize:
  141. README: README.wekan
  142. prime:
  143. - -lib/node_modules/node-pre-gyp/node_modules/tar/lib/.unpack.js.swp
  144. - -lib/node_modules/weka*
  145. helpers:
  146. source: snap-src
  147. plugin: dump
  148. caddy:
  149. plugin: dump
  150. ## Caddy v1 is not developed anymore. TODO: Sometime migrate to Caddy v2.
  151. ## https://caddy.community/t/caddyfile-v1-adapter/9129
  152. ## https://github.com/caddyserver/caddy/tree/v1
  153. #source: https://caddyserver.com/download/linux/amd64?license=personal&telemetry=off
  154. #source-type: tar
  155. # Using last working binary that was downloaded from above URL to Wekan Snap,
  156. # and .txt files from https://github.com/caddyserver/caddy/tree/v1/dist
  157. source: https://wekan.github.io/caddy-v1-linux-amd64.7z
  158. source-type: 7z
  159. organize:
  160. caddy: bin/caddy
  161. CHANGES.txt: CADDY_CHANGES.txt
  162. EULA.txt: CADDY_EULA.txt
  163. LICENSES.txt: CADDY_LICENSES.txt
  164. README.txt: CADDY_README.txt
  165. stage:
  166. - -init