snapcraft.yaml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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.18.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.6
  61. node-packages:
  62. - n
  63. - npm@4.6.1
  64. - node-gyp
  65. - node-pre-gyp
  66. - fibers@1.0.15
  67. build-packages:
  68. - ca-certificates
  69. - python
  70. - g++
  71. - capnproto
  72. - npm
  73. - curl
  74. prepare: |
  75. echo "Cleaning environment first"
  76. rm -rf ~/.meteor ~/.npm /usr/local/lib/node_modules
  77. echo "Installing node"
  78. n 4.8.6
  79. echo "Installing meteor"
  80. curl https://install.meteor.com/ -o install_meteor.sh
  81. sed -i "s|RELEASE=.*|RELEASE=\"1.4.4.1\"|g" install_meteor.sh
  82. chmod +x install_meteor.sh
  83. sh install_meteor.sh
  84. rm install_meteor.sh
  85. mkdir -p ~/.meteor/packages
  86. cd ~/.meteor/packages
  87. git clone --depth 1 -b master https://github.com/wekan/flow-router.git kadira-flow-router
  88. git clone --depth 1 -b master https://github.com/meteor-useraccounts/core.git meteor-useraccounts-core
  89. sed -i 's/api\.versionsFrom/\/\/api.versionsFrom/' ~/.meteor/packages/meteor-useraccounts-core/package.js
  90. cd ..
  91. build: |
  92. rm -rf package-lock.json .build
  93. meteor add standard-minifier-js --allow-superuser
  94. meteor npm install --allow-superuser
  95. meteor build .build --directory --allow-superuser
  96. cp -f fix-download-unicode/cfs_access-point.txt .build/bundle/programs/server/packages/cfs_access-point.js
  97. 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
  98. cd .build/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt
  99. rm -rf node_modules/bcrypt
  100. npm install bcrypt
  101. cd ../../../../
  102. npm install
  103. install: |
  104. cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
  105. cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
  106. organize:
  107. README: README.wekan
  108. helpers:
  109. source: snap-src
  110. plugin: dump
  111. organize:
  112. wekan-control: bin/wekan-control
  113. mongodb-control: bin/mongodb-control
  114. wekan-read-settings: bin/wekan-read-settings
  115. wekan-help: bin/wekan-help
  116. mongodb-backup: bin/mongodb-backup
  117. mongodb-restore: bin/mongodb-restore
  118. config: bin/config