seafile-server.install 2.2 KB

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