snapcraft.yaml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. name: wekan
  2. version: 0
  3. version-script: git describe --tags | cut -c 2-
  4. summary: The open-source kanban
  5. description: |
  6. Wekan is an open-source and collaborative kanban board application.
  7. 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.
  8. Depending on target environment, some configuration settings might need to be adjusted.
  9. For full list of configuration options call:
  10. $ wekan.help
  11. confinement: strict
  12. grade: stable
  13. architectures:
  14. - amd64
  15. plugs:
  16. mongodb-plug:
  17. interface: content
  18. target: $SNAP_DATA/shared
  19. hooks:
  20. configure:
  21. plugs:
  22. - network
  23. - network-bind
  24. slots:
  25. mongodb-slot:
  26. interface: content
  27. write:
  28. - $SNAP_DATA/share
  29. apps:
  30. wekan:
  31. command: wekan-control
  32. daemon: simple
  33. plugs: [network, network-bind]
  34. mongodb:
  35. command: mongodb-control
  36. daemon: simple
  37. plugs: [network, network-bind]
  38. caddy:
  39. command: caddy-control
  40. daemon: simple
  41. plugs: [network, network-bind]
  42. help:
  43. command: wekan-help
  44. database-backup:
  45. command: mongodb-backup
  46. plugs: [network, network-bind]
  47. database-list-backups:
  48. command: ls -al $SNAP_COMMON/db-backups/
  49. database-restore:
  50. command: mongodb-restore
  51. plugs: [network, network-bind]
  52. parts:
  53. mongodb:
  54. source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.2.22.tgz
  55. plugin: dump
  56. stage-packages: [libssl1.0.0]
  57. filesets:
  58. mongo:
  59. - usr
  60. - bin
  61. - lib
  62. stage:
  63. - $mongo
  64. prime:
  65. - $mongo
  66. wekan:
  67. source: .
  68. plugin: nodejs
  69. node-engine: 12.21.0
  70. node-packages:
  71. - node-gyp
  72. - node-pre-gyp
  73. - fibers
  74. build-packages:
  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 ../../../..
  108. # Cleanup
  109. cd .build/bundle
  110. find . -type d -name '*-garbage*' | xargs rm -rf
  111. find . -name '*phantom*' | xargs rm -rf
  112. find . -name '.*.swp' | xargs rm -f
  113. find . -name '*.swp' | xargs rm -f
  114. cd ../..
  115. # Add fibers multi arch
  116. cd .build/bundle/programs/server/node_modules/fibers/bin
  117. curl https://releases.wekan.team/fibers-multi.7z -o fibers-multi.7z
  118. 7z x fibers-multi.7z
  119. rm fibers-multi.7z
  120. cd ../../../../../../..
  121. # Copy to Snap
  122. cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
  123. cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
  124. rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/wekan
  125. #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
  126. # Delete phantomjs that is in accounts-lockout
  127. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/lucasantoniassi_accounts-lockout/node_modules/phantomjs-prebuilt
  128. # Delete temporary files
  129. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/tar/lib/.mkdir.js.swp
  130. #rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  131. #rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-gyp/node_modules/tar/lib/.mkdir.js.swp
  132. # Meteor 1.8.x additional .swp remove
  133. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  134. # Delete fibers for other archs
  135. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/fibers/bin/linux-ia32*
  136. # ostrio tmp remove
  137. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/request-libcurl/.node_modules-garbage*
  138. organize:
  139. README: README.wekan
  140. prime:
  141. - -lib/node_modules/node-pre-gyp/node_modules/tar/lib/.unpack.js.swp
  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