aboutsummaryrefslogtreecommitdiff
path: root/net/seafile-seahub
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2019-06-03 15:17:23 +0300
committerAlexandru Ardelean <ardeleanalex@gmail.com>2019-06-18 15:07:46 +0300
commitcf9975544476fc268432fcb24b07707b4f5ba39a (patch)
tree356f298f20e9601a4ecb9aea5713a378cca65fc9 /net/seafile-seahub
parent1c5f5b61d3c8515177c6a81be2806a0afd848fe4 (diff)
seafile-seahub: de-couple build a bit more
seafile-seahub's build is a mess. It hijacks some OpenWrt mk files into the build. This can be avoided by provided some of the required parameters via env-vars and patching the env-vars into the build. Which is what this patch does. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'net/seafile-seahub')
-rw-r--r--net/seafile-seahub/Makefile7
-rw-r--r--net/seafile-seahub/patches/020-Makefile-fixes.patch12
2 files changed, 12 insertions, 7 deletions
diff --git a/net/seafile-seahub/Makefile b/net/seafile-seahub/Makefile
index 04b6cb39d..c3fc35196 100644
--- a/net/seafile-seahub/Makefile
+++ b/net/seafile-seahub/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)
PKG_HASH:=53a9efdb6791fd3a2a191e89cb0f133632056046ec08adbb2ad72088e6161430
PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
-PKG_BUILD_DEPENDS:=python-pytz/host
+HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="django>=1.11"
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python-package.mk
@@ -41,7 +41,12 @@ 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
diff --git a/net/seafile-seahub/patches/020-Makefile-fixes.patch b/net/seafile-seahub/patches/020-Makefile-fixes.patch
index 07180cbb4..36c808493 100644
--- a/net/seafile-seahub/patches/020-Makefile-fixes.patch
+++ b/net/seafile-seahub/patches/020-Makefile-fixes.patch
@@ -1,8 +1,8 @@
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
-+include $(TOPDIR)/rules.mk
-+include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
++PYTHON ?= python
++DJANGO_ADMIN_PY ?= django-admin.py
+
PROJECT=seahub
@@ -12,7 +12,7 @@
locale:
@echo "--> Compile locales"
- django-admin.py compilemessages
-+ $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages)
++ $(DJANGO_ADMIN_PY) compilemessages
@echo ""
uglify:
@@ -21,19 +21,19 @@
statici18n:
@echo "--> Generate JS locale files in static/scripts/i18n"
- python manage.py compilejsi18n
-+ $(call HostPython,,manage.py compilejsi18n)
++ $(PYTHON) manage.py compilejsi18n
collectstatic:
@echo "--> Collect django static files to media/assets"
rm -rf media/assets 2> /dev/null
- python manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js
-+ $(call HostPython,,manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js)
++ $(PYTHON) manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js
compressstatic:
@echo "--> Compress static files(css) to media/CACHE"
rm -rf media/CACHE 2> /dev/null
- python manage.py compress
-+ $(call HostPython,,manage.py compress)
++ $(PYTHON) manage.py compress
clean:
@echo '--> Cleaning media/static cache & dist'