snapcraft.yaml 8.8 KB

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