seafile-server.install 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. #pacman complains if these functions don't exist, so we might as well
  28. #appease it.
  29. ## arg 1: the new package version
  30. post_install() {
  31. echo " " > /dev/null
  32. }
  33. ## arg 1: the new package version
  34. ## arg 2: the old package version
  35. pre_upgrade() {
  36. virtualenv2 --system-site-packages /usr/lib/seafile/seafileenv
  37. virtualenv2 --relocatable /usr/lib/seafile/seafileenv
  38. source /usr/lib/seafile/seafileenv/bin/activate
  39. pip install --upgrade pip
  40. # Dependencies as per
  41. # http://manual.seafile.com/build_seafile/server.html
  42. pip install --upgrade "Django>=1.5.8,<1.6"
  43. pip install --upgrade "Djblets==0.6.14" --no-deps --allow-external Djblets --allow-unverified Djblets
  44. # sqlite3 module should be included in python distribution
  45. pip install --upgrade simplejson
  46. # Pillow as replacement for PIL
  47. pip install --upgrade "Pillow>=2.6.1,<3.0.0"
  48. pip install --upgrade chardet
  49. pip install --upgrade "gunicorn==18"
  50. pip install "django-compressor==1.4"
  51. pip install "django-statici18n==1.1.2"
  52. pip install --upgrade six
  53. pip install --upgrade python-dateutil
  54. pip install --upgrade "git+git://github.com/haiwen/django-constance.git@bde7f7cdfd0ed1631a6817fd4cd76f37bf54fe35#egg=django-constance[database]"
  55. pip install --upgrade "openpyxl==2.3.0"
  56. # Additional dependencies
  57. pip install --upgrade django-pipeline
  58. deactivate
  59. }
  60. ## arg 1: the new package version
  61. ## arg 2: the old package version
  62. post_upgrade() {
  63. echo " " > /dev/null
  64. }
  65. ## arg 1: the old package version
  66. pre_remove() {
  67. echo " " > /dev/null
  68. }
  69. ## arg 1: the old package version
  70. post_remove() {
  71. rm -rf /usr/lib/seafile/seafileenv
  72. }