seafile-server.install 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ## arg 1: the new package version
  2. pre_install() {
  3. virtualenv2 --system-site-packages /usr/lib/seafile/seafileenv
  4. virtualenv2 --relocatable /usr/lib/seafile/seafileenv
  5. source /usr/lib/seafile/seafileenv/bin/activate
  6. pip install pip
  7. # Dependencies as per
  8. # http://manual.seafile.com/build_seafile/server.html
  9. pip install "Django>=1.5.8,<1.6"
  10. pip install "Djblets==0.6.14" --no-deps --allow-external Djblets --allow-unverified Djblets
  11. # sqlite3 module should be included in python distribution
  12. pip install simplejson
  13. # Pillow as replacement for PIL
  14. pip install "Pillow>=2.6.1,<3.0.0"
  15. pip install chardet
  16. pip install "gunicorn==18"
  17. pip install "django-compressor==1.4"
  18. pip install "django-statici18n==1.1.2"
  19. pip install six
  20. pip install python-dateutil
  21. pip install "git+git://github.com/haiwen/django-constance.git@bde7f7cdfd0ed1631a6817fd4cd76f37bf54fe35#egg=django-constance[database]"
  22. pip install "openpyxl==2.3.0"
  23. # Additional dependencies
  24. pip install django-pipeline
  25. deactivate
  26. }
  27. post_install() {
  28. systemctl daemon-reload
  29. }
  30. ## arg 1: the new package version
  31. ## arg 2: the old package version
  32. pre_upgrade() {
  33. virtualenv2 --system-site-packages /usr/lib/seafile/seafileenv
  34. virtualenv2 --relocatable /usr/lib/seafile/seafileenv
  35. source /usr/lib/seafile/seafileenv/bin/activate
  36. pip install --upgrade pip
  37. # Dependencies as per
  38. # http://manual.seafile.com/build_seafile/server.html
  39. pip install --upgrade "Django>=1.5.8,<1.6"
  40. pip install --upgrade "Djblets==0.6.14" --no-deps --allow-external Djblets --allow-unverified Djblets
  41. # sqlite3 module should be included in python distribution
  42. pip install --upgrade simplejson
  43. # Pillow as replacement for PIL
  44. pip install --upgrade "Pillow>=2.6.1,<3.0.0"
  45. pip install --upgrade chardet
  46. pip install --upgrade "gunicorn==18"
  47. pip install "django-compressor==1.4"
  48. pip install "django-statici18n==1.1.2"
  49. pip install --upgrade six
  50. pip install --upgrade python-dateutil
  51. pip install --upgrade "git+git://github.com/haiwen/django-constance.git@bde7f7cdfd0ed1631a6817fd4cd76f37bf54fe35#egg=django-constance[database]"
  52. pip install --upgrade "openpyxl==2.3.0"
  53. # Additional dependencies
  54. pip install --upgrade django-pipeline
  55. deactivate
  56. }
  57. ## arg 1: the new package version
  58. ## arg 2: the old package version
  59. post_upgrade() {
  60. post_install
  61. }
  62. ## arg 1: the old package version
  63. pre_remove() {
  64. echo " " > /dev/null
  65. }
  66. ## arg 1: the old package version
  67. post_remove() {
  68. rm -rf /usr/lib/seafile/seafileenv
  69. post_install
  70. }