snapcraft.yaml 8.1 KB

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