snapcraft.yaml 4.3 KB

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