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.

97 lines
2.9 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:=2
  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:=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.txt
  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. @BROKEN \
  30. +gunicorn3 \
  31. +python3 \
  32. +python3-chardet \
  33. +python3-cryptodome \
  34. +python3-dateutil \
  35. +python3-django1 \
  36. +python3-django-formtools \
  37. +python3-django-picklefield \
  38. +python3-django-postoffice \
  39. +python3-django-restframework39 \
  40. +python3-django-simple-captcha \
  41. +python3-django-statici18n \
  42. +python3-django-webpack-loader \
  43. +python3-openpyxl \
  44. +python3-pillow \
  45. +python3-pyjwt \
  46. +python3-pymysql \
  47. +python3-pytz \
  48. +python3-qrcode \
  49. +python3-requests \
  50. +python3-requests-oauthlib \
  51. +python3-seafile-ccnet \
  52. +python3-searpc
  53. endef
  54. define Package/seafile-seahub/description
  55. The web end of seafile server.
  56. Note: Localization support is turned off by default for performance
  57. reasons. Set 'USE_I18N = True' in /etc/seafile/conf/seahub_settings.py
  58. to use languages other than English.
  59. endef
  60. define Build/Configure
  61. endef
  62. MAKE_VARS += \
  63. PYTHON="$(HOST_PYTHON3_BIN)" \
  64. DJANGO_ADMIN_PY="$(STAGING_DIR_HOSTPKG)/bin/django-admin"
  65. define Build/Compile
  66. $(call HostPython3/PipInstall,$(PYTHON3_PKG_HOST_PIP_INSTALL_ARGS))
  67. $(call Build/Compile/Default,locale)
  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. Py3Package/seafile-seahub/filespec:=
  78. $(eval $(call Py3Package,seafile-seahub))
  79. $(eval $(call BuildPackage,seafile-seahub))
  80. $(eval $(call BuildPackage,seafile-seahub-src))