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>
(cherry-picked from commit cf99755444
)
This commit is contained in:
parent
b9a352b256
commit
88c3765a69
2 changed files with 12 additions and 7 deletions
|
@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)
|
||||||
PKG_HASH:=53a9efdb6791fd3a2a191e89cb0f133632056046ec08adbb2ad72088e6161430
|
PKG_HASH:=53a9efdb6791fd3a2a191e89cb0f133632056046ec08adbb2ad72088e6161430
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
|
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 $(INCLUDE_DIR)/package.mk
|
||||||
include ../../lang/python/python-package.mk
|
include ../../lang/python/python-package.mk
|
||||||
|
@ -41,7 +41,12 @@ endef
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
MAKE_VARS += \
|
||||||
|
PYTHON="$(HOST_PYTHON_BIN)" \
|
||||||
|
DJANGO_ADMIN_PY="$(STAGING_DIR_HOSTPKG)/bin/django-admin"
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
|
$(call Build/Compile/HostPyPipInstall,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS))
|
||||||
$(call Build/Compile/Default,locale)
|
$(call Build/Compile/Default,locale)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -1,3 +1,6 @@
|
@@ -1,3 +1,6 @@
|
||||||
+include $(TOPDIR)/rules.mk
|
+PYTHON ?= python
|
||||||
+include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
|
+DJANGO_ADMIN_PY ?= django-admin.py
|
||||||
+
|
+
|
||||||
PROJECT=seahub
|
PROJECT=seahub
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
locale:
|
locale:
|
||||||
@echo "--> Compile locales"
|
@echo "--> Compile locales"
|
||||||
- django-admin.py compilemessages
|
- django-admin.py compilemessages
|
||||||
+ $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages)
|
+ $(DJANGO_ADMIN_PY) compilemessages
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
uglify:
|
uglify:
|
||||||
|
@ -21,19 +21,19 @@
|
||||||
statici18n:
|
statici18n:
|
||||||
@echo "--> Generate JS locale files in static/scripts/i18n"
|
@echo "--> Generate JS locale files in static/scripts/i18n"
|
||||||
- python manage.py compilejsi18n
|
- python manage.py compilejsi18n
|
||||||
+ $(call HostPython,,manage.py compilejsi18n)
|
+ $(PYTHON) manage.py compilejsi18n
|
||||||
|
|
||||||
collectstatic:
|
collectstatic:
|
||||||
@echo "--> Collect django static files to media/assets"
|
@echo "--> Collect django static files to media/assets"
|
||||||
rm -rf media/assets 2> /dev/null
|
rm -rf media/assets 2> /dev/null
|
||||||
- python 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
|
||||||
+ $(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:
|
compressstatic:
|
||||||
@echo "--> Compress static files(css) to media/CACHE"
|
@echo "--> Compress static files(css) to media/CACHE"
|
||||||
rm -rf media/CACHE 2> /dev/null
|
rm -rf media/CACHE 2> /dev/null
|
||||||
- python manage.py compress
|
- python manage.py compress
|
||||||
+ $(call HostPython,,manage.py compress)
|
+ $(PYTHON) manage.py compress
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo '--> Cleaning media/static cache & dist'
|
@echo '--> Cleaning media/static cache & dist'
|
||||||
|
|
Loading…
Reference in a new issue