diff options
author | Gergely Kiss <mail.gery@gmail.com> | 2014-12-17 17:06:20 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-12-19 12:02:14 +0100 |
commit | 38bf5dc75051a2c3d63ebcf8c4fad8c11947c765 (patch) | |
tree | 24d531ec404eb7f3a8239a6bbce2b6232fbea590 /net/seafile-seahub | |
parent | fa9cc681e79ff2140e25f5cadddd8e9bddbc9d58 (diff) |
seafile-seahub: fix installation process of python dependencies
Solves "bash: easy_install: command not found" error during build
Signed-off-by: Gergely Kiss <mail.gery@gmail.com>
Diffstat (limited to 'net/seafile-seahub')
-rw-r--r-- | net/seafile-seahub/Makefile | 57 |
1 files changed, 37 insertions, 20 deletions
diff --git a/net/seafile-seahub/Makefile b/net/seafile-seahub/Makefile index 30a1e9d5d..be4aa5c70 100644 --- a/net/seafile-seahub/Makefile +++ b/net/seafile-seahub/Makefile @@ -19,6 +19,7 @@ PKG_SOURCE_VERSION:=a984c86442e7fc10c3bcf6d92b4843f7263547eb PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) define Package/seafile-seahub SECTION:=net @@ -37,11 +38,40 @@ define Package/seafile-seahub/description endef PKG_BUILD_DEPENDS:=python-setuptools +PYTHONPATH:=$(PYTHONPATH):$(PKG_BUILD_DIR)/thirdpart define Build/Configure endef define Build/Compile + # Install python dependencies + $(call HostPython,, \ + $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ + https://www.djangoproject.com/m/releases/1.5/Django-1.5.8.tar.gz) + $(call HostPython,, \ + $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ + https://github.com/djblets/djblets/archive/release-0.6.14.tar.gz) + $(call HostPython,, \ + $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ + https://pypi.python.org/packages/source/g/gunicorn/gunicorn-0.16.1.tar.gz) + $(call HostPython,, \ + $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ + https://pypi.python.org/packages/source/s/six/six-1.4.1.tar.gz) + $(call HostPython,, \ + $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ + https://pypi.python.org/packages/source/c/chardet/chardet-2.1.1.tar.gz) + $(call HostPython,, \ + $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ + https://pypi.python.org/packages/2.6/f/flup/flup-1.0.2-py2.6.egg) + $(call HostPython,, \ + $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ + https://pypi.python.org/packages/source/l/lockfile/lockfile-0.9.1.tar.gz) + $(call HostPython,, \ + $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ + https://pypi.python.org/packages/source/p/python-daemon/python-daemon-1.5.5.tar.gz) + $(call HostPython,, \ + $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ + https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-1.5.tar.gz) endef define Package/seafile-seahub/install @@ -50,26 +80,13 @@ define Package/seafile-seahub/install $(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/ - # Installing python dependencies - export PYTHONPATH="$(1)/usr/share/seafile/seafile-server/seahub/thirdpart:$(STAGING_DIR)/$(PYTHON_PKG_DIR)"; \ - export PYTHONOPTIMIZE=""; \ - export PYTHONDONTWRITEBYTECODE=1; \ - easy_install -d $(1)/usr/share/seafile/seafile-server/seahub/thirdpart -Z https://www.djangoproject.com/m/releases/1.5/Django-1.5.8.tar.gz; \ - easy_install -d $(1)/usr/share/seafile/seafile-server/seahub/thirdpart -Z -N https://github.com/djblets/djblets/archive/release-0.6.14.tar.gz; \ - easy_install -d $(1)/usr/share/seafile/seafile-server/seahub/thirdpart -Z https://pypi.python.org/packages/source/g/gunicorn/gunicorn-0.16.1.tar.gz; \ - easy_install -d $(1)/usr/share/seafile/seafile-server/seahub/thirdpart -Z https://pypi.python.org/packages/source/s/six/six-1.4.1.tar.gz; \ - easy_install -d $(1)/usr/share/seafile/seafile-server/seahub/thirdpart -Z https://pypi.python.org/packages/source/c/chardet/chardet-2.1.1.tar.gz; \ - easy_install -d $(1)/usr/share/seafile/seafile-server/seahub/thirdpart -Z https://pypi.python.org/packages/2.6/f/flup/flup-1.0.2-py2.6.egg; \ - easy_install -d $(1)/usr/share/seafile/seafile-server/seahub/thirdpart -Z https://pypi.python.org/packages/source/l/lockfile/lockfile-0.9.1.tar.gz; \ - easy_install -d $(1)/usr/share/seafile/seafile-server/seahub/thirdpart -Z https://pypi.python.org/packages/source/p/python-daemon/python-daemon-1.5.5.tar.gz; \ - easy_install -d $(1)/usr/share/seafile/seafile-server/seahub/thirdpart -Z https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-1.5.tar.gz - # fix python exec path in scripts - sed -i 's/#!\/usr\/bin\/python/#!\/usr\/bin\/env python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/chardetect.py - sed -i 's/#!\/usr\/bin\/python/#!\/usr\/bin\/env python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/django-admin.py - sed -i 's/#!\/usr\/bin\/python/#!\/usr\/bin\/env python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/gunicorn - sed -i 's/#!\/usr\/bin\/python/#!\/usr\/bin\/env python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/gunicorn_django - sed -i 's/#!\/usr\/bin\/python/#!\/usr\/bin\/env python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/gunicorn_paster - find $(PKG_BUILD_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f + # fix python exec path in scripts + sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/chardetect.py + sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/django-admin.py + sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/gunicorn + sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/gunicorn_django + sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/gunicorn_paster + find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f sed -i "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 |