snapcraft.yaml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. name: wekan
  2. version: '6.74'
  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: ./bin/wekan-control
  32. daemon: simple
  33. plugs: [network, network-bind]
  34. mongodb:
  35. command: ./bin/mongodb-control
  36. daemon: simple
  37. plugs: [network, network-bind]
  38. caddy:
  39. command: ./bin/caddy-control
  40. daemon: simple
  41. plugs: [network, network-bind]
  42. help:
  43. command: ./bin/wekan-help
  44. database-backup:
  45. command: ./bin/mongodb-backup
  46. plugs: [network, network-bind]
  47. database-list-backups:
  48. command: ./bin/database-list-backups
  49. database-restore:
  50. command: ./bin/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.14.tgz
  55. source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.4.tgz
  56. plugin: dump
  57. stage-packages:
  58. - libssl1.1
  59. - libcurl4
  60. - libstemmer0d
  61. - zlib1g
  62. - libsnappy1v5
  63. - libyaml-cpp0.6
  64. - libpcre3
  65. - libpcrecpp0v5
  66. - libboost-system1.71.0
  67. - libboost-iostreams1.71.0
  68. - libboost-filesystem1.71.0
  69. - libboost-program-options1.71.0
  70. - libgoogle-perftools4
  71. filesets:
  72. mongo:
  73. - bin
  74. - usr
  75. stage:
  76. - $mongo
  77. prime:
  78. - $mongo
  79. # mongosh:
  80. # source: https://downloads.mongodb.com/compass/mongodb-mongosh_1.6.2_amd64.deb
  81. # plugin: dump
  82. # mongotools:
  83. # source: https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2004-x86_64-100.6.1.tgz
  84. # plugin: dump
  85. # mongodb44:
  86. # source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.18.tgz
  87. # plugin: dump
  88. # organize:
  89. # bin: mongo44bin
  90. # usr: mongo44usr
  91. # stage:
  92. # - -init
  93. wekan:
  94. source: .
  95. plugin: npm
  96. npm-node-version: 14.21.3
  97. #npm-packages:
  98. # - node-gyp
  99. # - node-pre-gyp
  100. # - fibers
  101. build-packages:
  102. - build-essential
  103. - ca-certificates
  104. - apt-utils
  105. # - python2
  106. - python3
  107. - g++
  108. - capnproto
  109. - curl
  110. - wget
  111. - unzip
  112. - execstack
  113. - nodejs
  114. - npm
  115. # - p7zip-full
  116. stage-packages:
  117. - libfontconfig1
  118. override-build: |
  119. echo "Cleaning environment first"
  120. #rm -rf ~/.meteor ~/.npm /usr/local/lib/node_modules
  121. rm -rf .build
  122. #echo "Using http npm packages so speedup install process https://stackoverflow.com/questions/39760113/callback-called-more-than-once-while-running-npm-install"
  123. #echo "registry=http://registry.npmjs.org/" > ~/.npmrc
  124. #echo "Installing npm, node-gyp, node-pre-gyp, fibers"
  125. #npm -g install n --unsafe-perm
  126. #n 14.21.3
  127. #npm -g install node-gyp --unsafe-perm
  128. #npm -g install node-pre-gyp --unsafe-perm
  129. #npm -g install fibers --unsafe-perm
  130. ##echo "Installing meteor"
  131. ##curl https://install.meteor.com/ -o install_meteor.sh
  132. ##chmod +x install_meteor.sh
  133. ##sh install_meteor.sh
  134. ##rm install_meteor.sh
  135. #npm -g install meteor --unsafe-perm --allow-superuser
  136. #rm -rf .build
  137. ##chmod u+w *.json
  138. #npm install --unsafe-perm
  139. ##npm install
  140. ##meteor build .build --directory --allow-superuser
  141. # Remove legacy webbroser bundle, so that Wekan works also at Android Firefox, iOS Safari, etc.
  142. ##rm -rf .build/bundle/programs/web.browser.legacy
  143. # Change to directory .build/bundle/programs/server
  144. ##cd .build/bundle/programs/server
  145. ##chmod u+w *.json
  146. #npm install --unsafe-perm
  147. ##npm install
  148. ##cd node_modules/fibers
  149. ##node build.js
  150. ##cd ../../../../../..
  151. # Cleanup
  152. mkdir .build
  153. cd .build
  154. wget https://github.com/wekan/wekan/releases/download/v6.74/wekan-6.74-amd64.zip
  155. unzip wekan-6.74-amd64.zip
  156. rm wekan-6.74-amd64.zip
  157. cd ..
  158. ##cd .build/bundle
  159. ##find . -type d -name '*-garbage*' | xargs rm -rf
  160. ##find . -name '*phantom*' | xargs rm -rf
  161. ##find . -name '.*.swp' | xargs rm -f
  162. ##find . -name '*.swp' | xargs rm -f
  163. ##cd ../..
  164. # Add fibers multi arch
  165. #cd .build/bundle/programs/server/node_modules/fibers/bin
  166. #curl https://releases.wekan.team/fibers-multi.7z -o fibers-multi.7z
  167. #7z x fibers-multi.7z
  168. #rm fibers-multi.7z
  169. #cd ../../../../../../..
  170. # Copy to Snap
  171. wget https://nodejs.org/dist/latest-v14.x/node-v14.21.3-linux-x64.tar.xz
  172. tar -xf node-v14.21.3-linux-x64.tar.xz node-v14.21.3-linux-x64/bin/node
  173. rm node-v14.21.3-linux-x64.tar.xz
  174. mkdir $SNAPCRAFT_PART_INSTALL/bin
  175. cp -p node-v14.21.3-linux-x64/bin/node $SNAPCRAFT_PART_INSTALL/bin/
  176. rm -rf node-v14.21.3-linux-x64
  177. cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
  178. cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
  179. rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/wekan
  180. #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
  181. # Delete phantomjs that is in accounts-lockout
  182. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/lucasantoniassi_accounts-lockout/node_modules/phantomjs-prebuilt
  183. # Delete temporary files
  184. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/tar/lib/.mkdir.js.swp
  185. #rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  186. #rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-gyp/node_modules/tar/lib/.mkdir.js.swp
  187. # Meteor 1.8.x additional .swp remove
  188. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  189. # Delete fibers for other archs
  190. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/fibers/bin/linux-ia32*
  191. # ostrio tmp remove
  192. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/request-libcurl/.node_modules-garbage*
  193. organize:
  194. README: README.wekan
  195. prime:
  196. - -lib/node_modules/node-pre-gyp/node_modules/tar/lib/.unpack.js.swp
  197. - -lib/node_modules/weka*
  198. helpers:
  199. source: snap-src
  200. plugin: dump
  201. caddy:
  202. plugin: dump
  203. ## Caddy v1 is not developed anymore. TODO: Sometime migrate to Caddy v2.
  204. ## https://caddy.community/t/caddyfile-v1-adapter/9129
  205. ## https://github.com/caddyserver/caddy/tree/v1
  206. #source: https://caddyserver.com/download/linux/amd64?license=personal&telemetry=off
  207. #source-type: tar
  208. # Using last working binary that was downloaded from above URL to Wekan Snap,
  209. # and .txt files from https://github.com/caddyserver/caddy/tree/v1/dist
  210. source: https://wekan.github.io/caddy-v1-linux-amd64.7z
  211. source-type: 7z
  212. organize:
  213. caddy: bin/caddy
  214. CHANGES.txt: CADDY_CHANGES.txt
  215. EULA.txt: CADDY_EULA.txt
  216. LICENSES.txt: CADDY_LICENSES.txt
  217. README.txt: CADDY_README.txt
  218. stage:
  219. - -init