1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-19 23:28:39 +02:00
openwrt-packages/net/seafile-seahub/Makefile
Alexandru Ardelean c21a453ffd django: split django1 package and update to 2.2.6
After many failed attempts at upgrading Django to 2.2.6, the solution seems
to be to split a `python-django1` package that works with Python2 and
upgrade `python3-django` to the latest 2.2[.6] LTS release.

This also means that all Python2 Django packages will be stuck & based on
Django 1.11[.24] LTS release. But, it's currently the sanest approach I
could find to be able to perform an upgrade of Django to 2.2, and not break
Seafile.

Upgrading Seafile is also pretty difficult, as their Python3 support is not
yet finished & released. And in the meantime, we want to allow people to
use newer Django versions.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2019-10-24 09:13:38 -03:00

75 lines
2.6 KiB
Makefile

#
# Copyright (C) 2007-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-seahub
PKG_VERSION:=6.3.4
PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)-server?
PKG_HASH:=53a9efdb6791fd3a2a191e89cb0f133632056046ec08adbb2ad72088e6161430
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE.txt
HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="django>=1.11"
PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python-package.mk
SEAFILE_PYTHON_DEPENDS:= \
simplejson chardet dateutil mysqlclient pytz qrcode requests requests-oauthlib \
django1 django-constance django-appconf django-compressor django-formtools \
django-jsonfield django-picklefield django-postoffice django-restframework \
pillow django-simple-captcha django-statici18n django-webpack-loader
define Package/seafile-seahub
SECTION:=net
CATEGORY:=Network
TITLE:=Seafile server - seahub component
URL:=https://seafile.com/
DEPENDS:=+python \
+python-flup +gunicorn +openpyxl \
$(foreach dep,$(SEAFILE_PYTHON_DEPENDS),+python-$(dep))
endef
define Build/Configure
endef
MAKE_VARS += \
PYTHON="$(HOST_PYTHON_BIN)" \
DJANGO_ADMIN_PY="$(STAGING_DIR_HOSTPKG)/bin/django-admin"
define Build/Compile
$(call Build/Compile/HostPyPipInstall,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS))
$(call Build/Compile/Default,locale)
endef
define Package/seafile-seahub/description
The web end of seafile server.
NOTE: in order to have better performance, localization support is turned off by default.
Please set 'USE_I18N = True' in seahub_settings.py if you intend to use languages other than English.
endef
define Package/seafile-seahub/install
$(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server/seahub
$(CP) $(PKG_BUILD_DIR)/{locale,media,fabfile,seahub,sql,tests,thirdpart,tools} $(1)/usr/share/seafile/seafile-server/seahub/
$(CP) $(PKG_BUILD_DIR)/*.{sh,template,py,txt} $(1)/usr/share/seafile/seafile-server/seahub/
$(CP) $(PKG_BUILD_DIR)/{CONTRIBUTORS,HACKING,README.markdown} $(1)/usr/share/seafile/seafile-server/seahub/
$(CP) $(PKG_BUILD_DIR)/pylintrc* $(1)/usr/share/seafile/seafile-server/seahub/
find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
$(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
endef
$(eval $(call BuildPackage,seafile-seahub))