You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
3.0 KiB

  1. #
  2. # Copyright (C) 2007-2017 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=seafile-seahub
  9. PKG_VERSION:=7.1.5
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)-server?
  13. PKG_HASH:=cc7f5a1642d203b2390ae3c30c8a5546d1e829d9d1a5ddf686e558292746ce5c
  14. PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
  15. PKG_LICENSE:=Apache-2.0
  16. PKG_LICENSE_FILES:=LICENSE.txt
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
  18. HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Django-1.11
  19. PKG_BUILD_PARALLEL:=1
  20. PYTHON3_PKG_BUILD:=0
  21. include $(INCLUDE_DIR)/package.mk
  22. include ../../lang/python/python3-package.mk
  23. define Package/seafile-seahub
  24. SECTION:=net
  25. CATEGORY:=Network
  26. TITLE:=Seafile server - seahub component
  27. URL:=https://seafile.com/
  28. DEPENDS:= \
  29. +gunicorn3 \
  30. +python3 \
  31. +python3-chardet \
  32. +python3-cryptodome \
  33. +python3-dateutil \
  34. +python3-django1 \
  35. +python3-django-formtools \
  36. +python3-django-picklefield \
  37. +python3-django-postoffice \
  38. +python3-django-restframework39 \
  39. +python3-django-simple-captcha \
  40. +python3-django-statici18n \
  41. +python3-django-webpack-loader \
  42. +python3-openpyxl \
  43. +python3-pillow \
  44. +python3-pyjwt \
  45. +python3-pymysql \
  46. +python3-pytz \
  47. +python3-qrcode \
  48. +python3-requests \
  49. +python3-requests-oauthlib \
  50. +python3-seafile-ccnet \
  51. +python3-searpc
  52. endef
  53. define Package/seafile-seahub/description
  54. The web end of seafile server.
  55. Note: Localization support is turned off by default for performance
  56. reasons. Set 'USE_I18N = True' in /etc/seafile/conf/seahub_settings.py
  57. to use languages other than English.
  58. endef
  59. define Build/Configure
  60. endef
  61. MAKE_VARS += \
  62. PYTHON="$(HOST_PYTHON3_BIN)" \
  63. DJANGO_ADMIN_PY="$(STAGING_DIR_HOSTPKG)/bin/django-admin"
  64. define Build/Compile
  65. $(call HostPython3/PipInstall,$(PYTHON3_PKG_HOST_PIP_INSTALL_ARGS))
  66. $(call Build/Compile/Default,locale)
  67. endef
  68. define Py3Package/seafile-seahub/install
  69. $(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server/seahub/tools
  70. $(CP) $(PKG_BUILD_DIR)/{frontend,locale,media,seahub,sql,static,thirdpart} $(1)/usr/share/seafile/seafile-server/seahub/
  71. $(INSTALL_BIN) $(PKG_BUILD_DIR)/manage.py $(1)/usr/share/seafile/seafile-server/seahub/
  72. $(INSTALL_DATA) $(PKG_BUILD_DIR)/tools/secret_key_generator.py $(1)/usr/share/seafile/seafile-server/seahub/tools/
  73. $(SED) "s/\(SEAFILE_VERSION\s*=\s*\)'\([0-9]\.[0-9]\.[0-9]\)'/\1'$(PKG_VERSION)'/g" $(1)/usr/share/seafile/seafile-server/seahub/seahub/settings.py
  74. mv $(1)/usr/share/seafile/seafile-server/seahub/media/avatars $(1)/usr/share/seafile/seafile-server/seahub/media/avatars_default
  75. endef
  76. Py3Package/seafile-seahub/filespec:=
  77. $(eval $(call Py3Package,seafile-seahub))
  78. $(eval $(call BuildPackage,seafile-seahub))
  79. $(eval $(call BuildPackage,seafile-seahub-src))