snapcraft.yaml 7.1 KB

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