snapcraft.yaml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. name: wekan
  2. version: 0
  3. version-script: git describe --dirty --tags | cut -c 2-
  4. summary: The open-source Trello-like 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. slots:
  20. mongodb-slot:
  21. interface: content
  22. write:
  23. - $SNAP_DATA/share
  24. apps:
  25. wekan:
  26. command: wekan-control
  27. daemon: simple
  28. plugs: [network, network-bind]
  29. mongodb:
  30. command: mongodb-control
  31. daemon: simple
  32. plugs: [network, network-bind]
  33. help:
  34. command: wekan-help
  35. database-backup:
  36. command: mongodb-backup
  37. plugs: [network, network-bind]
  38. database-list-backups:
  39. command: ls -ald $SNAP_COMMON/db-backups/*
  40. database-restore:
  41. command: mongodb-restore
  42. plugs: [network, network-bind]
  43. parts:
  44. mongodb:
  45. source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.2.16.tgz
  46. plugin: dump
  47. stage-packages: [libssl1.0.0]
  48. filesets:
  49. mongo:
  50. - usr
  51. - bin
  52. - lib
  53. stage:
  54. - $mongo
  55. prime:
  56. - $mongo
  57. wekan:
  58. source: .
  59. plugin: nodejs
  60. node-engine: 4.8.4
  61. node-packages:
  62. - npm@4.6.1
  63. - node-gyp
  64. - node-pre-gyp
  65. - fibers@1.0.15
  66. build-packages:
  67. - python
  68. - g++
  69. - capnproto
  70. - nodejs
  71. - nodejs-legacy
  72. - curl
  73. prepare: |
  74. echo "Cleaning environment first"
  75. rm -rf ~/.meteor ~/.npm /usr/local/lib/node_modules
  76. echo "installing meteor first"
  77. curl https://install.meteor.com/ -o install_meteor.sh
  78. sed -i "s|RELEASE=.*|RELEASE=\"1.4.4.1\"|g" install_meteor.sh
  79. chmod +x install_meteor.sh
  80. sh install_meteor.sh
  81. rm install_meteor.sh
  82. mkdir packages
  83. cd packages
  84. git clone --depth 1 -b master https://github.com/wekan/flow-router.git kadira-flow-router
  85. git clone --depth 1 -b master https://github.com/meteor-useraccounts/core.git meteor-useraccounts-core
  86. sed -i 's/api\.versionsFrom/\/\/api.versionsFrom/' ~/.meteor/packages/meteor-useraccounts-core/package.js
  87. cd ..
  88. build: |
  89. rm -rf package-lock.json .build
  90. meteor add standard-minifier-js --allow-superuser
  91. meteor npm install --allow-superuser
  92. meteor build .build --directory --allow-superuser
  93. cp -f fix-download-unicode/cfs_access-point.txt .build/bundle/programs/server/packages/cfs_access-point.js
  94. sed -i "s|build\/Release\/bson|browser_build\/bson|g" .build/bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/node_modules/bson/ext/index.js
  95. cd .build/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt
  96. rm -rf node_modules/bcrypt
  97. npm install bcrypt
  98. cd ../../../../
  99. npm install
  100. install: |
  101. cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
  102. cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
  103. organize:
  104. README: README.wekan
  105. helpers:
  106. source: snap-src
  107. plugin: dump
  108. organize:
  109. wekan-control: bin/wekan-control
  110. mongodb-control: bin/mongodb-control
  111. wekan-read-settings: bin/wekan-read-settings
  112. wekan-help: bin/wekan-help
  113. mongodb-backup: bin/mongodb-backup
  114. mongodb-restore: bin/mongodb-restore
  115. config: bin/config