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.

95 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.2
  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:=647dca870c996ed00844d3bf45bc15f22fdf5268cfd3ac4c0dd9e4c15360361d
  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. include $(INCLUDE_DIR)/package.mk
  21. include ../../lang/python/python3-package.mk
  22. define Package/seafile-seahub
  23. SECTION:=net
  24. CATEGORY:=Network
  25. TITLE:=Seafile server - seahub component
  26. URL:=https://seafile.com/
  27. DEPENDS:= \
  28. +gunicorn3 \
  29. +python3 \
  30. +python3-chardet \
  31. +python3-cryptodome \
  32. +python3-dateutil \
  33. +python3-django1 \
  34. +python3-django-formtools \
  35. +python3-django-picklefield \
  36. +python3-django-postoffice \
  37. +python3-django-restframework39 \
  38. +python3-django-simple-captcha \
  39. +python3-django-statici18n \
  40. +python3-django-webpack-loader \
  41. +python3-openpyxl \
  42. +python3-pillow \
  43. +python3-pyjwt \
  44. +python3-pymysql \
  45. +python3-pytz \
  46. +python3-qrcode \
  47. +python3-requests \
  48. +python3-requests-oauthlib \
  49. +python3-seafile-ccnet \
  50. +python3-searpc
  51. VARIANT:=python3
  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 Py3Build/Compile
  65. $(call Build/Compile/HostPy3PipInstall,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS))
  66. $(call Build/Compile/Default,locale)
  67. $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
  68. endef
  69. define Py3Package/seafile-seahub/install
  70. $(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server/seahub/tools
  71. $(CP) $(PKG_BUILD_DIR)/{frontend,locale,media,seahub,sql,static,thirdpart} $(1)/usr/share/seafile/seafile-server/seahub/
  72. $(INSTALL_BIN) $(PKG_BUILD_DIR)/manage.py $(1)/usr/share/seafile/seafile-server/seahub/
  73. $(INSTALL_DATA) $(PKG_BUILD_DIR)/tools/secret_key_generator.py $(1)/usr/share/seafile/seafile-server/seahub/tools/
  74. $(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
  75. mv $(1)/usr/share/seafile/seafile-server/seahub/media/avatars $(1)/usr/share/seafile/seafile-server/seahub/media/avatars_default
  76. endef
  77. $(eval $(call Py3Package,seafile-seahub))
  78. $(eval $(call BuildPackage,seafile-seahub))
  79. $(eval $(call BuildPackage,seafile-seahub-src))