snapcraft.yaml 8.3 KB

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