snapcraft.yaml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. name: wekan
  2. version: '6.72'
  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.4.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.2
  96. #npm-packages:
  97. # - node-gyp
  98. # - node-pre-gyp
  99. # - fibers
  100. build-packages:
  101. - build-essential
  102. - ca-certificates
  103. - apt-utils
  104. # - python2
  105. - python3
  106. - g++
  107. - capnproto
  108. - curl
  109. - wget
  110. - unzip
  111. - execstack
  112. - nodejs
  113. - npm
  114. # - p7zip-full
  115. stage-packages:
  116. - libfontconfig1
  117. override-build: |
  118. echo "Cleaning environment first"
  119. #rm -rf ~/.meteor ~/.npm /usr/local/lib/node_modules
  120. rm -rf .build
  121. #echo "Using http npm packages so speedup install process https://stackoverflow.com/questions/39760113/callback-called-more-than-once-while-running-npm-install"
  122. #echo "registry=http://registry.npmjs.org/" > ~/.npmrc
  123. #echo "Installing npm, node-gyp, node-pre-gyp, fibers"
  124. #npm -g install n --unsafe-perm
  125. #n 14.21.2
  126. #npm -g install node-gyp --unsafe-perm
  127. #npm -g install node-pre-gyp --unsafe-perm
  128. #npm -g install fibers --unsafe-perm
  129. ##echo "Installing meteor"
  130. ##curl https://install.meteor.com/ -o install_meteor.sh
  131. ##chmod +x install_meteor.sh
  132. ##sh install_meteor.sh
  133. ##rm install_meteor.sh
  134. #npm -g install meteor --unsafe-perm --allow-superuser
  135. #rm -rf .build
  136. ##chmod u+w *.json
  137. #npm install --unsafe-perm
  138. ##npm install
  139. ##meteor build .build --directory --allow-superuser
  140. # Remove legacy webbroser bundle, so that Wekan works also at Android Firefox, iOS Safari, etc.
  141. ##rm -rf .build/bundle/programs/web.browser.legacy
  142. # Change to directory .build/bundle/programs/server
  143. ##cd .build/bundle/programs/server
  144. ##chmod u+w *.json
  145. #npm install --unsafe-perm
  146. ##npm install
  147. ##cd node_modules/fibers
  148. ##node build.js
  149. ##cd ../../../../../..
  150. # Cleanup
  151. mkdir .build
  152. cd .build
  153. wget https://github.com/wekan/wekan/releases/download/v6.72/wekan-6.72-amd64.zip
  154. unzip wekan-6.72-amd64.zip
  155. rm wekan-6.72-amd64.zip
  156. cd ..
  157. ##cd .build/bundle
  158. ##find . -type d -name '*-garbage*' | xargs rm -rf
  159. ##find . -name '*phantom*' | xargs rm -rf
  160. ##find . -name '.*.swp' | xargs rm -f
  161. ##find . -name '*.swp' | xargs rm -f
  162. ##cd ../..
  163. # Add fibers multi arch
  164. #cd .build/bundle/programs/server/node_modules/fibers/bin
  165. #curl https://releases.wekan.team/fibers-multi.7z -o fibers-multi.7z
  166. #7z x fibers-multi.7z
  167. #rm fibers-multi.7z
  168. #cd ../../../../../../..
  169. # Copy to Snap
  170. wget https://nodejs.org/dist/latest-v14.x/node-v14.21.2-linux-x64.tar.xz
  171. tar -xf node-v14.21.2-linux-x64.tar.xz node-v14.21.2-linux-x64/bin/node
  172. rm node-v14.21.2-linux-x64.tar.xz
  173. mkdir $SNAPCRAFT_PART_INSTALL/bin
  174. cp -p node-v14.21.2-linux-x64/bin/node $SNAPCRAFT_PART_INSTALL/bin/
  175. rm -rf node-v14.21.2-linux-x64
  176. cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
  177. cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
  178. rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/wekan
  179. #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
  180. # Delete phantomjs that is in accounts-lockout
  181. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/lucasantoniassi_accounts-lockout/node_modules/phantomjs-prebuilt
  182. # Delete temporary files
  183. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/tar/lib/.mkdir.js.swp
  184. #rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  185. #rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/node-gyp/node_modules/tar/lib/.mkdir.js.swp
  186. # Meteor 1.8.x additional .swp remove
  187. #rm -f $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
  188. # Delete fibers for other archs
  189. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/node_modules/fibers/bin/linux-ia32*
  190. # ostrio tmp remove
  191. #rm -rf $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/request-libcurl/.node_modules-garbage*
  192. organize:
  193. README: README.wekan
  194. prime:
  195. - -lib/node_modules/node-pre-gyp/node_modules/tar/lib/.unpack.js.swp
  196. - -lib/node_modules/weka*
  197. helpers:
  198. source: snap-src
  199. plugin: dump
  200. caddy:
  201. plugin: dump
  202. ## Caddy v1 is not developed anymore. TODO: Sometime migrate to Caddy v2.
  203. ## https://caddy.community/t/caddyfile-v1-adapter/9129
  204. ## https://github.com/caddyserver/caddy/tree/v1
  205. #source: https://caddyserver.com/download/linux/amd64?license=personal&telemetry=off
  206. #source-type: tar
  207. # Using last working binary that was downloaded from above URL to Wekan Snap,
  208. # and .txt files from https://github.com/caddyserver/caddy/tree/v1/dist
  209. source: https://wekan.github.io/caddy-v1-linux-amd64.7z
  210. source-type: 7z
  211. organize:
  212. caddy: bin/caddy
  213. CHANGES.txt: CADDY_CHANGES.txt
  214. EULA.txt: CADDY_EULA.txt
  215. LICENSES.txt: CADDY_LICENSES.txt
  216. README.txt: CADDY_README.txt
  217. stage:
  218. - -init