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.

74 lines
2.6 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:=6.3.4
  10. PKG_RELEASE:=7
  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:=53a9efdb6791fd3a2a191e89cb0f133632056046ec08adbb2ad72088e6161430
  14. PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  15. PKG_LICENSE:=Apache-2.0
  16. PKG_LICENSE_FILES:=LICENSE.txt
  17. HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="django>=1.11"
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../../lang/python/python-package.mk
  21. SEAFILE_PYTHON_DEPENDS:= \
  22. simplejson chardet dateutil mysqlclient pytz qrcode requests requests-oauthlib \
  23. django1 django-constance django-appconf django-compressor django-formtools \
  24. django-jsonfield django-picklefield django-postoffice django-restframework \
  25. pillow django-simple-captcha django-statici18n django-webpack-loader
  26. define Package/seafile-seahub
  27. SECTION:=net
  28. CATEGORY:=Network
  29. TITLE:=Seafile server - seahub component
  30. URL:=https://seafile.com/
  31. DEPENDS:=+python \
  32. +python-flup +gunicorn +openpyxl \
  33. $(foreach dep,$(SEAFILE_PYTHON_DEPENDS),+python-$(dep))
  34. endef
  35. define Build/Configure
  36. endef
  37. MAKE_VARS += \
  38. PYTHON="$(HOST_PYTHON_BIN)" \
  39. DJANGO_ADMIN_PY="$(STAGING_DIR_HOSTPKG)/bin/django-admin"
  40. define Build/Compile
  41. $(call Build/Compile/HostPyPipInstall,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS))
  42. $(call Build/Compile/Default,locale)
  43. endef
  44. define Package/seafile-seahub/description
  45. The web end of seafile server.
  46. NOTE: in order to have better performance, localization support is turned off by default.
  47. Please set 'USE_I18N = True' in seahub_settings.py if you intend to use languages other than English.
  48. endef
  49. define Package/seafile-seahub/install
  50. $(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server/seahub
  51. $(CP) $(PKG_BUILD_DIR)/{locale,media,fabfile,seahub,sql,tests,thirdpart,tools} $(1)/usr/share/seafile/seafile-server/seahub/
  52. $(CP) $(PKG_BUILD_DIR)/*.{sh,template,py,txt} $(1)/usr/share/seafile/seafile-server/seahub/
  53. $(CP) $(PKG_BUILD_DIR)/{CONTRIBUTORS,HACKING,README.markdown} $(1)/usr/share/seafile/seafile-server/seahub/
  54. $(CP) $(PKG_BUILD_DIR)/pylintrc* $(1)/usr/share/seafile/seafile-server/seahub/
  55. find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
  56. $(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
  57. endef
  58. $(eval $(call BuildPackage,seafile-seahub))