From 437621931a1561ae23604c619fde40f78d750c3c Mon Sep 17 00:00:00 2001 From: Gergely Kiss Date: Sat, 30 Apr 2016 10:37:30 +0200 Subject: [PATCH] seafile: import version 5.1.1 and its dependencies Signed-off-by: Gergely Kiss --- lang/chardet/Makefile | 53 ++++ lang/django-appconf/Makefile | 48 +++ lang/django-compressor/Makefile | 49 +++ lang/django-constance/Makefile | 48 +++ lang/django-jsonfield/Makefile | 48 +++ lang/django-picklefield/Makefile | 48 +++ lang/django-postoffice/Makefile | 49 +++ lang/django-restframework/Makefile | 49 +++ lang/django-statici18n/Makefile | 48 +++ lang/django/Makefile | 65 ++++ lang/et_xmlfile/Makefile | 48 +++ lang/flup/Makefile | 48 +++ lang/gunicorn/Makefile | 53 ++++ lang/jdcal/Makefile | 48 +++ lang/openpyxl/Makefile | 48 +++ lang/python-dateutil/Makefile | 48 +++ lang/pytz/Makefile | 48 +++ lang/rcssmin/Makefile | 57 ++++ lang/simplejson/Makefile | 6 +- lang/six/Makefile | 48 +++ libs/libsearpc/Makefile | 27 +- libs/libzdb/Makefile | 14 +- .../patches/010-cross-compile-fixes.patch | 22 +- .../020-filterh-use-host-built-version.patch | 2 +- net/seafile-ccnet/Makefile | 19 +- net/seafile-ccnet/patches/010-Makefile.patch | 31 ++ .../patches/010-libevent-include-path.patch | 300 ------------------ net/seafile-seahub/Makefile | 131 +------- .../patches/020-Makefile-fixes.patch | 28 ++ net/seafile-server/Makefile | 102 +++--- net/seafile-server/files/seafile.conf | 10 + net/seafile-server/files/seafile.init | 166 ++++++++-- net/seafile-server/files/seahub.init | 226 +++++++++++++ .../patches/020-script-patches.patch | 95 ++++-- .../030-pidfiles-in-same-directory.patch | 8 +- .../patches/040-seafile-admin.patch | 69 ++-- .../050-libevhtp-search-path-fix.patch | 17 - .../050-libseafile-makefile-fixes.patch | 43 +++ .../patches/060-libevent2-include-path.patch | 107 ------- .../patches/060-timestamps-as-int64.patch | 39 +++ 40 files changed, 1655 insertions(+), 758 deletions(-) create mode 100644 lang/chardet/Makefile create mode 100644 lang/django-appconf/Makefile create mode 100644 lang/django-compressor/Makefile create mode 100644 lang/django-constance/Makefile create mode 100644 lang/django-jsonfield/Makefile create mode 100644 lang/django-picklefield/Makefile create mode 100644 lang/django-postoffice/Makefile create mode 100644 lang/django-restframework/Makefile create mode 100644 lang/django-statici18n/Makefile create mode 100644 lang/django/Makefile create mode 100644 lang/et_xmlfile/Makefile create mode 100644 lang/flup/Makefile create mode 100644 lang/gunicorn/Makefile create mode 100644 lang/jdcal/Makefile create mode 100644 lang/openpyxl/Makefile create mode 100644 lang/python-dateutil/Makefile create mode 100644 lang/pytz/Makefile create mode 100644 lang/rcssmin/Makefile create mode 100644 lang/six/Makefile create mode 100644 net/seafile-ccnet/patches/010-Makefile.patch delete mode 100644 net/seafile-ccnet/patches/010-libevent-include-path.patch create mode 100644 net/seafile-seahub/patches/020-Makefile-fixes.patch create mode 100755 net/seafile-server/files/seahub.init delete mode 100644 net/seafile-server/patches/050-libevhtp-search-path-fix.patch create mode 100644 net/seafile-server/patches/050-libseafile-makefile-fixes.patch delete mode 100644 net/seafile-server/patches/060-libevent2-include-path.patch create mode 100644 net/seafile-server/patches/060-timestamps-as-int64.patch diff --git a/lang/chardet/Makefile b/lang/chardet/Makefile new file mode 100644 index 000000000..6343b4e73 --- /dev/null +++ b/lang/chardet/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2007-2016 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:=chardet +PKG_VERSION:=2.3.0 +PKG_RELEASE:=1 +PKG_LICENSE:=LGPL-2.1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/c/chardet/ +PKG_MD5SUM:=25274d664ccb5130adae08047416e1a8 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/chardet + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Universal encoding detector for Python 2 and 3 + URL:=https://github.com/chardet/chardet + DEPENDS:=+python +endef + +define Package/chardet/description + Universal encoding detector for Python 2 and 3 +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/chardet/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chardetect \ + $(1)/usr/bin + # fix python exec path in scripts + sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/chardetect +endef + +$(eval $(call BuildPackage,chardet)) diff --git a/lang/django-appconf/Makefile b/lang/django-appconf/Makefile new file mode 100644 index 000000000..b6ce461db --- /dev/null +++ b/lang/django-appconf/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=django-appconf +PKG_VERSION:=1.0.1 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django-appconf/ +PKG_MD5SUM:=29c87a00f0d098b90f3ac6113ae6e52d +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-appconf + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=A helper class for handling configuration defaults of packaged apps gracefully. + URL:=http://django-appconf.readthedocs.org/ + DEPENDS:=+python +django +endef + +define Package/django-appconf/description + A helper class for handling configuration defaults of packaged apps gracefully. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-appconf/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-appconf)) diff --git a/lang/django-compressor/Makefile b/lang/django-compressor/Makefile new file mode 100644 index 000000000..41bf85d94 --- /dev/null +++ b/lang/django-compressor/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2007-2016 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:=django-compressor +PKG_VERSION:=2.0 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=django_compressor-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django_compressor/ +PKG_BUILD_DIR:=$(BUILD_DIR)/django_compressor-$(PKG_VERSION)/ +PKG_MD5SUM:=98254da44f1676d7b871ffeb14115175 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-compressor + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Compresses linked and inline JavaScript or CSS into single cached files. + URL:=http://django-compressor.readthedocs.org/ + DEPENDS:=+python +django +endef + +define Package/django-compressor/description + Compresses linked and inline JavaScript or CSS into single cached files. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-compressor/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-compressor)) diff --git a/lang/django-constance/Makefile b/lang/django-constance/Makefile new file mode 100644 index 000000000..b7c5b364e --- /dev/null +++ b/lang/django-constance/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=django-constance +PKG_VERSION:=1.1.2 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django-constance/ +PKG_MD5SUM:=00d58c8d6c8cd7e352d14854aba8d5aa +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-constance + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Django live settings with pluggable backends, including Redis. + URL:=https://github.com/jazzband/django-constance + DEPENDS:=+python +django +endef + +define Package/django-constance/description + Django live settings with pluggable backends, including Redis. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-constance/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-constance)) diff --git a/lang/django-jsonfield/Makefile b/lang/django-jsonfield/Makefile new file mode 100644 index 000000000..3227bed3a --- /dev/null +++ b/lang/django-jsonfield/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=django-jsonfield +PKG_VERSION:=0.9.19 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django-jsonfield/ +PKG_MD5SUM:=6ccf381732f67272a9b8b29b44079df7 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-jsonfield + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=JSONField for django models + URL:=https://github.com/bradjasper/django-jsonfield + DEPENDS:=+python +django +endef + +define Package/django-jsonfield/description + JSONField for django models +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-jsonfield/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-jsonfield)) diff --git a/lang/django-picklefield/Makefile b/lang/django-picklefield/Makefile new file mode 100644 index 000000000..0747796ea --- /dev/null +++ b/lang/django-picklefield/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=django-picklefield +PKG_VERSION:=0.3.2 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django-picklefield/ +PKG_MD5SUM:=b2c17ca9e03704ce33890e6aefc7b2e5 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-picklefield + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Pickled object field for Django + URL:=http://github.com/gintas/django-picklefield/ + DEPENDS:=+python +django +endef + +define Package/django-picklefield/description + Pickled object field for Django +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-picklefield/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-picklefield)) diff --git a/lang/django-postoffice/Makefile b/lang/django-postoffice/Makefile new file mode 100644 index 000000000..86d360430 --- /dev/null +++ b/lang/django-postoffice/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2007-2016 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:=django-postoffice +PKG_VERSION:=2.0.7 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django-post_office/ +PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)/ +PKG_MD5SUM:=9c2dfea47834c98193f7bc442500ec40 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-postoffice + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=A Django app to monitor and send mail asynchronously, complete with template support. + URL:=https://github.com/ui/django-postoffice + DEPENDS:=+python +django +django-jsonfield +endef + +define Package/django-postoffice/description + A Django app to monitor and send mail asynchronously, complete with template support. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-postoffice/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-postoffice)) diff --git a/lang/django-restframework/Makefile b/lang/django-restframework/Makefile new file mode 100644 index 000000000..5ae695670 --- /dev/null +++ b/lang/django-restframework/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2007-2016 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:=django-restframework +PKG_VERSION:=3.3.3 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/djangorestframework/ +PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION) +PKG_MD5SUM:=6f5ee9646e7fa87dad4385d3c7e7678d +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-restframework + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Web APIs for Django, made easy. + URL:=http://www.django-rest-framework.org/ + DEPENDS:=+python +django +endef + +define Package/django-restframework/description + Web APIs for Django, made easy. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-restframework/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-restframework)) diff --git a/lang/django-statici18n/Makefile b/lang/django-statici18n/Makefile new file mode 100644 index 000000000..544725fe7 --- /dev/null +++ b/lang/django-statici18n/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=django-statici18n +PKG_VERSION:=1.1.5 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django-statici18n/ +PKG_MD5SUM:=ad9941818f54428508fece4a463ea1cc +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django-statici18n + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=A Django app that provides helper for generating JavaScript catalog to static files. + URL:=http://django-statici18n.readthedocs.org/ + DEPENDS:=+python +django +endef + +define Package/django-statici18n/description + A Django app that provides helper for generating JavaScript catalog to static files. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-statici18n/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-statici18n)) diff --git a/lang/django/Makefile b/lang/django/Makefile new file mode 100644 index 000000000..c932cc1c4 --- /dev/null +++ b/lang/django/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2007-2016 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:=django +PKG_VERSION:=1.8.12 +PKG_RELEASE=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/django/django.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=c168aeba175dbb92c615460a360cb1ea978de5d3 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/django + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=The web framework for perfectionists with deadlines. + MAINTAINER:=Gergely Kiss + URL:=https://www.djangoproject.com/ + DEPENDS:=+python +endef + +define Package/django/description + The web framework for perfectionists with deadlines. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \ + $(1)/usr/bin +endef + +define Package/django/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \ + $(1)/usr/bin + # fix python exec path + sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py +endef + +$(eval $(call BuildPackage,django)) diff --git a/lang/et_xmlfile/Makefile b/lang/et_xmlfile/Makefile new file mode 100644 index 000000000..f0c013970 --- /dev/null +++ b/lang/et_xmlfile/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=et_xmlfile +PKG_VERSION:=1.0.1 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/e/et_xmlfile/ +PKG_MD5SUM:=f47940fd9d556375420b2e276476cfaf +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/et_xmlfile + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=An implementation of lxml.xmlfile for the standard library + URL:=https://bitbucket.org/openpyxl/et_xmlfile + DEPENDS:=+python +endef + +define Package/et_xmlfile/description + An implementation of lxml.xmlfile for the standard library +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/et_xmlfile/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,et_xmlfile)) diff --git a/lang/flup/Makefile b/lang/flup/Makefile new file mode 100644 index 000000000..b0514f4fb --- /dev/null +++ b/lang/flup/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=flup +PKG_VERSION:=1.0.2 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/f/flup/ +PKG_MD5SUM:=24dad7edc5ada31dddd49456ee8d5254 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/flup + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Random assortment of WSGI servers + URL:=http://www.saddi.com/software/flup/ + DEPENDS:=+python +endef + +define Package/flup/description + Random assortment of WSGI servers +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/flup/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,flup)) diff --git a/lang/gunicorn/Makefile b/lang/gunicorn/Makefile new file mode 100644 index 000000000..d9c344f02 --- /dev/null +++ b/lang/gunicorn/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2007-2016 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:=gunicorn +PKG_VERSION:=19.4.5 +PKG_RELEASE=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/g/gunicorn/ +PKG_MD5SUM:=ce45c2dccba58784694dd77f23d9a677 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/gunicorn + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=WSGI HTTP Server for UNIX + MAINTAINER:=Gergely Kiss + URL:=http://gunicorn.org/ + DEPENDS:=+python +endef + +define Package/gunicorn/description + WSGI HTTP Server for UNIX +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/gunicorn/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gunicorn* \ + $(1)/usr/bin + # fix python exec path in scripts + $(SED) 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/gunicorn* +endef + +$(eval $(call BuildPackage,gunicorn)) diff --git a/lang/jdcal/Makefile b/lang/jdcal/Makefile new file mode 100644 index 000000000..34d3970fc --- /dev/null +++ b/lang/jdcal/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=jdcal +PKG_VERSION:=1.2 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/j/jdcal/ +PKG_MD5SUM:=ab8d5ba300fd1eb01514f363d19b1eb9 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/jdcal + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Julian dates from proleptic Gregorian and Julian calendars. + URL:=http://github.com/phn/jdcal + DEPENDS:=+python +endef + +define Package/jdcal/description + Julian dates from proleptic Gregorian and Julian calendars. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/jdcal/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,jdcal)) diff --git a/lang/openpyxl/Makefile b/lang/openpyxl/Makefile new file mode 100644 index 000000000..56c744ca5 --- /dev/null +++ b/lang/openpyxl/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=openpyxl +PKG_VERSION:=2.4.0-a1 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/o/openpyxl/ +PKG_MD5SUM:=e5ca6d23ceccb15115d45cdf26e736fc +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/openpyxl + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=A Python library to read/write Excel 2010 xlsx/xlsm files + URL:=https://openpyxl.readthedocs.org/ + DEPENDS:=+python +django +endef + +define Package/openpyxl/description + A Python library to read/write Excel 2010 xlsx/xlsm files +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/openpyxl/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,openpyxl)) diff --git a/lang/python-dateutil/Makefile b/lang/python-dateutil/Makefile new file mode 100644 index 000000000..01fbca606 --- /dev/null +++ b/lang/python-dateutil/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=python-dateutil +PKG_VERSION:=2.5.2 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-2-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/p/python-dateutil/ +PKG_MD5SUM:=eafe168e8f404bf384514f5116eedbb6 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-dateutil + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Extensions to the standard Python datetime module + URL:=https://dateutil.readthedocs.org/ + DEPENDS:=+python +six +endef + +define Package/python-dateutil/description + Extensions to the standard Python datetime module +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/python-dateutil/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python-dateutil)) diff --git a/lang/pytz/Makefile b/lang/pytz/Makefile new file mode 100644 index 000000000..3d40a4094 --- /dev/null +++ b/lang/pytz/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=pytz +PKG_VERSION:=2016.3 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/p/pytz/ +PKG_MD5SUM:=abae92c3301b27bd8a9f56b14f52cb29 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/pytz + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=World timezone definitions, modern and historical + URL:=https://sourceforge.net/projects/pytz/ + DEPENDS:=+python +endef + +define Package/pytz/description + World timezone definitions, modern and historical +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/pytz/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,pytz)) diff --git a/lang/rcssmin/Makefile b/lang/rcssmin/Makefile new file mode 100644 index 000000000..572247428 --- /dev/null +++ b/lang/rcssmin/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2007-2016 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:=rcssmin +PKG_VERSION:=1.0.6 +PKG_RELEASE=1 +PKG_LICENSE:=Apache-2.0 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/ndparker/rcssmin.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=4764e3bc47ca8d44be3198892e73c51d8a0a9970 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/rcssmin + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Fast CSS minifier for Python + MAINTAINER:=Gergely Kiss + URL:=http://opensource.perlig.de/rcssmin/ + DEPENDS:=+python +endef + +define Package/rcssmin/description + Fast CSS minifier for Python +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +define Package/rcssmin/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,rcssmin)) diff --git a/lang/simplejson/Makefile b/lang/simplejson/Makefile index 89da1b2a4..2d7c75ccf 100644 --- a/lang/simplejson/Makefile +++ b/lang/simplejson/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2014 OpenWrt.org +# Copyright (C) 2007-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=simplejson -PKG_VERSION:=3.6.5 +PKG_VERSION:=3.8.2 PKG_RELEASE:=1 PKG_LICENSE:=MIT PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://pypi.python.org/packages/source/s/simplejson/ -PKG_MD5SUM:=b65dc21c7aaad14c6b4ad0d9179e437d +PKG_MD5SUM:=53b1371bbf883b129a12d594a97e9a18 PKG_BUILD_DEPENDS:=python python-setuptools include $(INCLUDE_DIR)/package.mk diff --git a/lang/six/Makefile b/lang/six/Makefile new file mode 100644 index 000000000..5fec1d478 --- /dev/null +++ b/lang/six/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 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:=six +PKG_VERSION:=1.10.0 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/s/six/ +PKG_MD5SUM:=34eed507548117b2ab523ab14b2f8b55 +PKG_BUILD_DEPENDS:=python python-setuptools + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/six + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Gergely Kiss + TITLE:=Python 2 and 3 compatibility utilities + URL:=http://pypi.python.org/pypi/six/ + DEPENDS:=+python +endef + +define Package/six/description + Python 2 and 3 compatibility utilities +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/six/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,six)) diff --git a/libs/libsearpc/Makefile b/libs/libsearpc/Makefile index 15c0e8ba3..2e99b2ea7 100644 --- a/libs/libsearpc/Makefile +++ b/libs/libsearpc/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2014 OpenWrt.org +# Copyright (C) 2007-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsearpc -PKG_VERSION:=3.1.7 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_VERSION:=5.1.1 +PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 PKG_LICENSE:=GPL-3.0 PKG_SOURCE_PROTO:=git @@ -22,6 +22,7 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk +$(call include_mk, python-package.mk) define Package/libsearpc SECTION:=libs @@ -43,21 +44,6 @@ CONFIGURE_ARGS += --enable-compile-demo=no \ TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv -include $(INCLUDE_DIR)/host-build.mk - -define Host/Configure -endef - -define Host/Compile -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR)/host/bin - $(INSTALL_BIN) $(HOST_BUILD_DIR)/lib/searpc-codegen.py $(STAGING_DIR)/host/bin/ -endef - -$(eval $(call HostBuild)) - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/{bin,include} $(INSTALL_DIR) $(1)/usr/lib/pkgconfig @@ -69,9 +55,10 @@ endef define Package/libsearpc/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DIR) $(1)/usr/lib/python2.7/site-packages + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/pysearpc $(1)/usr/lib/python2.7/site-packages/ + $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/pysearpc $(1)$(PYTHON_PKG_DIR) + find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f endef $(eval $(call BuildPackage,libsearpc)) diff --git a/libs/libzdb/Makefile b/libs/libzdb/Makefile index cf17a2cff..8f6db1bac 100644 --- a/libs/libzdb/Makefile +++ b/libs/libzdb/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2014 OpenWrt.org +# Copyright (C) 2007-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libzdb -PKG_VERSION:=3.0 +PKG_VERSION:=3.1 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.tildeslash.com/libzdb/dist/ -PKG_MD5SUM:=3bb9efff10a1f3ebc5b76c1055c48635 +PKG_MD5SUM:=01d8519a596d62f6b43559cc29ecd36d PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -23,10 +23,6 @@ PKG_BUILD_DEPENDS:=libzdb/host include $(INCLUDE_DIR)/package.mk -ifeq ($(CONFIG_USE_MUSL),n) - LDFLAGS += -lnsl -endif - define Package/libzdb SECTION:=libs CATEGORY:=Libraries @@ -67,8 +63,8 @@ define Host/Compile endef define Host/Install - $(INSTALL_DIR) $(STAGING_DIR)/host/bin - $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR)/host/bin/ + $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin + $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR_HOST)/bin/ endef $(eval $(call HostBuild)) diff --git a/libs/libzdb/patches/010-cross-compile-fixes.patch b/libs/libzdb/patches/010-cross-compile-fixes.patch index 489b18c0a..8f7274bec 100644 --- a/libs/libzdb/patches/010-cross-compile-fixes.patch +++ b/libs/libzdb/patches/010-cross-compile-fixes.patch @@ -1,6 +1,6 @@ -diff -rupN libzdb-3.0.orig/configure.ac libzdb-3.0/configure.ac ---- libzdb-3.0.orig/configure.ac 2014-01-06 22:17:57.000000000 +0100 -+++ libzdb-3.0/configure.ac 2014-11-20 13:59:27.456957651 +0100 +diff -rupN libzdb-3.1.orig/configure.ac libzdb-3.1/configure.ac +--- libzdb-3.1.orig/configure.ac 2015-08-31 14:46:02.000000000 +0200 ++++ libzdb-3.1/configure.ac 2016-04-18 19:43:13.836937134 +0200 @@ -196,15 +196,6 @@ AC_SEARCH_LIBS([pthread_create], [pthrea # Database Libraries @@ -40,7 +40,7 @@ diff -rupN libzdb-3.0.orig/configure.ac libzdb-3.0/configure.ac - DBCPPFLAGS="$DBCPPFLAGS `$MYSQLCONFIG --include`" - DBLDFLAGS="$DBLDFLAGS `$MYSQLCONFIG --libs`" + DBCPPFLAGS="$DBCPPFLAGS -I$STAGING_DIR/usr/include/mysql" -+ DBLDFLAGS="$DBLDFLAGS -L$STAGING_DIR/usr/lib/mysql -L$STAGING_DIR/usr/lib -lmysqlclient -lz -lcrypt -lm $LDFLAGS" ++ DBLDFLAGS="$DBLDFLAGS -L$STAGING_DIR/usr/lib/mysql -L$STAGING_DIR/usr/lib -lmysqlclient -lz -lcrypt -lnsl -lm" AC_DEFINE([HAVE_LIBMYSQLCLIENT], 1, [Define to 1 to enable mysql]) else CPPFLAGS=$svd_CPPFLAGS @@ -95,18 +95,18 @@ diff -rupN libzdb-3.0.orig/configure.ac libzdb-3.0/configure.ac - [ - svd_LDFLAGS=$LDFLAGS - svd_CPPFLAGS=$CPPFLAGS -- LDFLAGS="-L$with_sqlite/lib $LDFLAGS -lsqlite3" +- LDFLAGS="-L$with_sqlite/lib $LDFLAGS" - CPPFLAGS="-I$with_sqlite/include $CPPFLAGS" - AC_SEARCH_LIBS([sqlite3_open], [sqlite3], - [ - DBCPPFLAGS="$DBCPPFLAGS -I$with_sqlite/include" - DBLDFLAGS="$DBLDFLAGS -L$with_sqlite/lib/ -lsqlite3" -- ],[sqlite="no"]) +- ],[sqlite="no"],[-ldl]) - LDFLAGS=$svd_LDFLAGS - CPPFLAGS=$svd_CPPFLAGS - - ], -- AC_SEARCH_LIBS([sqlite3_open], [sqlite3], [], [sqlite="no"])) +- AC_SEARCH_LIBS([sqlite3_open], [sqlite3], [], [sqlite="no"], [-ldl])) + AC_SEARCH_LIBS([sqlite3_open], [sqlite3], [], [sqlite="no"]) fi ], @@ -157,7 +157,7 @@ diff -rupN libzdb-3.0.orig/configure.ac libzdb-3.0/configure.ac AC_CHECK_FUNCS([timegm]) -@@ -487,11 +421,6 @@ echo "| PostgreSQL: +@@ -516,11 +450,6 @@ echo "| PostgreSQL: else echo "| PostgreSQL: DISABLED |" fi @@ -169,9 +169,9 @@ diff -rupN libzdb-3.0.orig/configure.ac libzdb-3.0/configure.ac echo "+------------------------------------------------------------+" -diff -rupN libzdb-3.0.orig/Makefile.am libzdb-3.0/Makefile.am ---- libzdb-3.0.orig/Makefile.am 2014-01-06 22:34:08.000000000 +0100 -+++ libzdb-3.0/Makefile.am 2014-11-20 13:51:22.508204689 +0100 +diff -rupN libzdb-3.1.orig/Makefile.am libzdb-3.1/Makefile.am +--- libzdb-3.1.orig/Makefile.am 2015-08-31 14:55:18.000000000 +0200 ++++ libzdb-3.1/Makefile.am 2016-04-18 19:43:42.215769551 +0200 @@ -45,11 +45,6 @@ libzdb_la_SOURCES += src/db/sqlite/SQLit src/db/sqlite/SQLiteResultSet.c \ src/db/sqlite/SQLitePreparedStatement.c diff --git a/libs/libzdb/patches/020-filterh-use-host-built-version.patch b/libs/libzdb/patches/020-filterh-use-host-built-version.patch index 1edfd77b3..74c166a6c 100644 --- a/libs/libzdb/patches/020-filterh-use-host-built-version.patch +++ b/libs/libzdb/patches/020-filterh-use-host-built-version.patch @@ -14,7 +14,7 @@ diff -rupN libzdb-3.0.orig/Makefile.am libzdb-3.0/Makefile.am RE2C = @RE2C@ RE2CFLAGS = -b -FILTERH = ./tools/bin/filterh -+FILTERH = $(STAGING_DIR)/host/bin/filterh ++FILTERH = $(STAGING_DIR_HOST)/bin/filterh AM_CPPFLAGS = $(CPPFLAGS) $(DBCPPFLAGS) AM_CPPFLAGS += -Isrc -Isrc/util -Isrc/net -Isrc/db -Isrc/exceptions diff --git a/net/seafile-ccnet/Makefile b/net/seafile-ccnet/Makefile index 91e6e237b..55d0c5c67 100644 --- a/net/seafile-ccnet/Makefile +++ b/net/seafile-ccnet/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2015 OpenWrt.org +# Copyright (C) 2007-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,20 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=seafile-ccnet -PKG_VERSION:=4.1.2 -PKG_RELEASE=$(PKG_SOURCE_VERSION)-2 +PKG_VERSION:=5.1.1 +PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 PKG_LICENSE:=GPL-3.0 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/haiwen/ccnet.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=a73109f09af4ecc49cdc4c57cdde51b38e15c31a +PKG_SOURCE_VERSION:=6d94fdc4296d542a5552039dc13a67c3448e8b13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_FIXUP:=autoreconf PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk +$(call include_mk, python-package.mk) define Package/seafile-ccnet SECTION:=net @@ -32,6 +33,7 @@ define Package/seafile-ccnet DEPENDS:=+libsearpc +libevent2 +libopenssl \ +glib2 +python +libzdb +libuuid \ +libpthread +libsqlite3 +jansson $(ICONV_DEPENDS) + EXTRA_DEPENDS:=libsearpc (=5.1.1-8998e7b2c5587f0b94c48db24e2952d08def5add-1) endef define Package/seafile-ccnet/description @@ -48,18 +50,18 @@ CONFIGURE_ARGS += --disable-client \ --disable-compile-demo \ --disable-console -PKG_BUILD_DEPENDS:=vala/host \ - libsearpc/host +PKG_BUILD_DEPENDS:=vala/host TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv \ -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz define Package/seafile-ccnet/install $(INSTALL_DIR) $(1)/usr/{bin,lib} - $(INSTALL_DIR) $(1)/usr/lib/python2.7/site-packages + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) $(CP) $(PKG_INSTALL_DIR)/usr/bin/ccnet* $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/ccnet $(1)/usr/lib/python2.7/site-packages/ + $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/ccnet $(1)$(PYTHON_PKG_DIR) $(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.so* $(1)/usr/lib/ + find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f endef define Build/InstallDev @@ -67,7 +69,6 @@ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/include/ccnet* $(1)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libccnet.pc $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.a $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.so* $(1)/usr/lib/ endef diff --git a/net/seafile-ccnet/patches/010-Makefile.patch b/net/seafile-ccnet/patches/010-Makefile.patch new file mode 100644 index 000000000..d476d25f5 --- /dev/null +++ b/net/seafile-ccnet/patches/010-Makefile.patch @@ -0,0 +1,31 @@ +diff -rupN seafile-ccnet-5.1.1.orig/lib/Makefile.am seafile-ccnet-5.1.1/lib/Makefile.am +--- seafile-ccnet-5.1.1.orig/lib/Makefile.am 2016-04-21 11:04:46.000000000 +0200 ++++ seafile-ccnet-5.1.1/lib/Makefile.am 2016-04-22 10:02:52.583732050 +0200 +@@ -1,3 +1,4 @@ ++include $(TOPDIR)/rules.mk + + AM_CPPFLAGS = @GLIB2_CFLAGS@ -I$(top_srcdir)/include \ + -I$(top_srcdir)/include/ccnet \ +@@ -72,11 +73,11 @@ ccnet-client.c: ccnet-object.h + + ccnet-object.h: ${ccnet_object_define} + rm -f $@ +- valac --pkg posix ${ccnet_object_define} -C -H ccnet-object.h ++ "$(STAGING_DIR_HOST)/bin/valac" --pkg posix ${ccnet_object_define} -C -H ccnet-object.h + + ccnetobj.c: ${ccnet_object_define} + rm -f $@ +- valac -C --pkg posix ${ccnet_object_define} ++ "$(STAGING_DIR_HOST)/bin/valac" -C --pkg posix ${ccnet_object_define} + + searpc_gen = searpc-signature.h searpc-marshal.h + +@@ -86,7 +87,7 @@ rpc_table.stamp: ${top_srcdir}/lib/rpc_t + @rm -f rpc_table.tmp + @touch rpc_table.tmp + @echo "[libsearpc]: generating rpc header files" +- @PYTHON@ `which searpc-codegen.py` ${top_srcdir}/lib/rpc_table.py ++ @PYTHON@ "$(STAGING_DIR)/usr/bin/searpc-codegen.py" ${top_srcdir}/lib/rpc_table.py + @echo "[libsearpc]: done" + @mv -f rpc_table.tmp $@ + diff --git a/net/seafile-ccnet/patches/010-libevent-include-path.patch b/net/seafile-ccnet/patches/010-libevent-include-path.patch deleted file mode 100644 index 11b809c1e..000000000 --- a/net/seafile-ccnet/patches/010-libevent-include-path.patch +++ /dev/null @@ -1,300 +0,0 @@ -diff -rupN seafile-ccnet-4.1.2.orig/include/ccnet/ccnet-client.h seafile-ccnet-4.1.2/include/ccnet/ccnet-client.h ---- seafile-ccnet-4.1.2.orig/include/ccnet/ccnet-client.h 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/include/ccnet/ccnet-client.h 2015-09-09 19:22:23.515461892 +0200 -@@ -10,11 +10,7 @@ - #include - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #include "ccnet-session-base.h" - -diff -rupN seafile-ccnet-4.1.2.orig/include/ccnet/cevent.h seafile-ccnet-4.1.2/include/ccnet/cevent.h ---- seafile-ccnet-4.1.2.orig/include/ccnet/cevent.h 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/include/ccnet/cevent.h 2015-09-09 19:22:23.516461920 +0200 -@@ -6,13 +6,9 @@ - #ifndef CEVENT_H - #define CEVENT_H - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include - #include --#else --#include --#endif - - #include - -diff -rupN seafile-ccnet-4.1.2.orig/lib/job-mgr.c seafile-ccnet-4.1.2/lib/job-mgr.c ---- seafile-ccnet-4.1.2.orig/lib/job-mgr.c 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/lib/job-mgr.c 2015-09-09 19:22:23.516461920 +0200 -@@ -1,11 +1,7 @@ - /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include --#else --#include --#endif - - #include - #include -diff -rupN seafile-ccnet-4.1.2.orig/lib/libccnet_utils.h seafile-ccnet-4.1.2/lib/libccnet_utils.h ---- seafile-ccnet-4.1.2.orig/lib/libccnet_utils.h 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/lib/libccnet_utils.h 2015-09-09 19:22:23.517461948 +0200 -@@ -15,11 +15,7 @@ - #include - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #ifdef WIN32 - #include -diff -rupN seafile-ccnet-4.1.2.orig/lib/mainloop.c seafile-ccnet-4.1.2/lib/mainloop.c ---- seafile-ccnet-4.1.2.orig/lib/mainloop.c 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/lib/mainloop.c 2015-09-09 19:22:23.517461948 +0200 -@@ -3,13 +3,9 @@ - #include "include.h" - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include - #include --#else --#include --#endif - - static int - cmdrsp_cb (const char *code, char *content, int clen, void *data) -diff -rupN seafile-ccnet-4.1.2.orig/lib/net.h seafile-ccnet-4.1.2/lib/net.h ---- seafile-ccnet-4.1.2.orig/lib/net.h 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/lib/net.h 2015-09-09 19:22:23.517461948 +0200 -@@ -19,11 +19,7 @@ - #include - #endif - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #ifdef WIN32 - #define ECONNREFUSED WSAECONNREFUSED -diff -rupN seafile-ccnet-4.1.2.orig/lib/packet-io.h seafile-ccnet-4.1.2/lib/packet-io.h ---- seafile-ccnet-4.1.2.orig/lib/packet-io.h 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/lib/packet-io.h 2015-09-09 19:22:23.518461976 +0200 -@@ -5,11 +5,7 @@ - - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - struct buffer; - -diff -rupN seafile-ccnet-4.1.2.orig/lib/processor.c seafile-ccnet-4.1.2/lib/processor.c ---- seafile-ccnet-4.1.2.orig/lib/processor.c 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/lib/processor.c 2015-09-09 19:22:23.518461976 +0200 -@@ -4,11 +4,7 @@ - - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #include "ccnet-client.h" - #include "processor.h" -diff -rupN seafile-ccnet-4.1.2.orig/lib/timer.c seafile-ccnet-4.1.2/lib/timer.c ---- seafile-ccnet-4.1.2.orig/lib/timer.c 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/lib/timer.c 2015-09-09 19:22:23.519462004 +0200 -@@ -1,12 +1,8 @@ - /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include - #include --#else --#include --#endif - - #include - -diff -rupN seafile-ccnet-4.1.2.orig/lib/utils.h seafile-ccnet-4.1.2/lib/utils.h ---- seafile-ccnet-4.1.2.orig/lib/utils.h 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/lib/utils.h 2015-09-09 19:22:23.519462004 +0200 -@@ -11,11 +11,7 @@ - #include - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #ifdef WIN32 - #include -diff -rupN seafile-ccnet-4.1.2.orig/net/cluster/server.c seafile-ccnet-4.1.2/net/cluster/server.c ---- seafile-ccnet-4.1.2.orig/net/cluster/server.c 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/net/cluster/server.c 2015-09-09 19:24:33.800125741 +0200 -@@ -6,11 +6,7 @@ - #include - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #include "inner-session.h" - #include "outer-session.h" -diff -rupN seafile-ccnet-4.1.2.orig/net/common/connect-mgr.h seafile-ccnet-4.1.2/net/common/connect-mgr.h ---- seafile-ccnet-4.1.2.orig/net/common/connect-mgr.h 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/net/common/connect-mgr.h 2015-09-09 19:22:23.520462032 +0200 -@@ -3,11 +3,7 @@ - #ifndef CCNET_CONNECTION_MANAGER - #define CCNET_CONNECTION_MANAGER - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #include "timer.h" - -diff -rupN seafile-ccnet-4.1.2.orig/net/common/packet-io.c seafile-ccnet-4.1.2/net/common/packet-io.c ---- seafile-ccnet-4.1.2.orig/net/common/packet-io.c 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/net/common/packet-io.c 2015-09-09 19:22:23.521462060 +0200 -@@ -13,13 +13,9 @@ - - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include - #include --#else --#include --#endif - - #include - #include -diff -rupN seafile-ccnet-4.1.2.orig/net/common/packet-io.h seafile-ccnet-4.1.2/net/common/packet-io.h ---- seafile-ccnet-4.1.2.orig/net/common/packet-io.h 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/net/common/packet-io.h 2015-09-09 19:22:23.521462060 +0200 -@@ -5,13 +5,9 @@ - - #include "packet.h" - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include - #include --#else --#include --#endif - - /* struct evbuffer; */ - /* for libevent2 */ -diff -rupN seafile-ccnet-4.1.2.orig/net/common/peer.c seafile-ccnet-4.1.2/net/common/peer.c ---- seafile-ccnet-4.1.2.orig/net/common/peer.c 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/net/common/peer.c 2015-09-09 19:22:23.522462088 +0200 -@@ -2,14 +2,10 @@ - - #include "common.h" - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include - #include - #include --#else --#include --#endif - - #include - #include -diff -rupN seafile-ccnet-4.1.2.orig/net/common/session.h seafile-ccnet-4.1.2/net/common/session.h ---- seafile-ccnet-4.1.2.orig/net/common/session.h 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/net/common/session.h 2015-09-09 19:22:23.523462116 +0200 -@@ -3,13 +3,9 @@ - #ifndef CCNET_SESSION_H - #define CCNET_SESSION_H - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include - #include --#else --#include --#endif - - #include - #include -diff -rupN seafile-ccnet-4.1.2.orig/net/daemon/ccnet-daemon.c seafile-ccnet-4.1.2/net/daemon/ccnet-daemon.c ---- seafile-ccnet-4.1.2.orig/net/daemon/ccnet-daemon.c 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/net/daemon/ccnet-daemon.c 2015-09-09 19:24:59.313846178 +0200 -@@ -6,12 +6,8 @@ - #include - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include --#else --#include --#endif - - #include "daemon-session.h" - #include "rpc-service.h" -diff -rupN seafile-ccnet-4.1.2.orig/net/daemon/ccnet-test.c seafile-ccnet-4.1.2/net/daemon/ccnet-test.c ---- seafile-ccnet-4.1.2.orig/net/daemon/ccnet-test.c 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/net/daemon/ccnet-test.c 2015-09-09 19:24:45.089444412 +0200 -@@ -5,11 +5,7 @@ - - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #include "utils.h" - -diff -rupN seafile-ccnet-4.1.2.orig/net/server/ccnet-server.c seafile-ccnet-4.1.2/net/server/ccnet-server.c ---- seafile-ccnet-4.1.2.orig/net/server/ccnet-server.c 2015-09-09 18:49:35.000000000 +0200 -+++ seafile-ccnet-4.1.2/net/server/ccnet-server.c 2015-09-09 19:25:53.967392265 +0200 -@@ -6,11 +6,7 @@ - #include - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #include "server-session.h" - #include "user-mgr.h" diff --git a/net/seafile-seahub/Makefile b/net/seafile-seahub/Makefile index 6821c3aca..161588aa4 100644 --- a/net/seafile-seahub/Makefile +++ b/net/seafile-seahub/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2015 OpenWrt.org +# Copyright (C) 2007-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=seafile-seahub -PKG_VERSION:=4.1.2 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_VERSION:=5.1.1 +PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 PKG_LICENSE:=Apache-2.0 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/haiwen/seahub.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=3fb1288f920de03a4e2e6a06b60671ce98971742 +PKG_SOURCE_VERSION:=95f762f396c81f840fe658ab983df53784083bb1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz include $(INCLUDE_DIR)/package.mk @@ -27,117 +27,24 @@ define Package/seafile-seahub TITLE:=Seafile server - seahub component MAINTAINER:=Gergely Kiss URL:=http://seafile.com/ - DEPENDS:=+python +simplejson +pillow +python-setuptools + DEPENDS:=+simplejson +python +pillow +chardet +django +django-appconf \ + +django-compressor +django-constance +django-jsonfield +django-picklefield \ + +django-postoffice +django-restframework +django-statici18n +et_xmlfile \ + +flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql +pytz +rcssmin endef -define Package/seafile-seahub/description - The web end of seafile server. - - NOTE: in order to have better performance, language support is turned off by default. - Please set 'USE_I18N = True' in seahub_settings.py to support multiple languages. -endef - -PKG_BUILD_DEPENDS:=python-setuptools -PYTHONPATH:=$(PYTHONPATH):$(PKG_BUILD_DIR)/thirdpart - -define Download/django - FILE=Django-1.5.8.tar.gz - URL=https://www.djangoproject.com/m/releases/1.5/ - MD5SUM:=675fc736e2c29090f005e217ccf90b5b -endef - -define Download/djblets - PROTO=git - URL=https://github.com/djblets/djblets.git - SUBDIR=djblets-0.6.14 - FILE=djblets-0.6.14.tar.gz - VERSION=58c09bae9b71ac164f78c76746fd2e545aae6c68 -endef - -define Download/gunicorn - FILE=gunicorn-0.16.1.tar.gz - URL=https://pypi.python.org/packages/source/g/gunicorn/ - MD5SUM:=d53d5d04d941f2a3089e814e753a218f -endef - -define Download/six - FILE=six-1.4.1.tar.gz - URL=https://pypi.python.org/packages/source/s/six/ - MD5SUM:=bdbb9e12d3336c198695aa4cf3a61d62 -endef - -define Download/chardet - FILE=chardet-2.1.1.tar.gz - URL=https://pypi.python.org/packages/source/c/chardet/ - MD5SUM:=295367fd210d20f3febda615a88e1ef0 -endef - -define Download/flup - FILE=flup-1.0.2-py2.6.egg - URL=https://pypi.python.org/packages/2.6/f/flup/ - MD5SUM:=93ec6e3baeee3e5649a8456105178d4e -endef - -define Download/lockfile - FILE=lockfile-0.9.1.tar.gz - URL=https://pypi.python.org/packages/source/l/lockfile/ - MD5SUM:=ce61468d4c1263e3005737bbed2641f0 -endef - -define Download/python-daemon - FILE=python-daemon-1.5.5.tar.gz - URL=https://pypi.python.org/packages/source/p/python-daemon/ - MD5SUM:=1f6cd41473c2e201021a0aeef395b2b1 +define Build/Configure endef -define Download/python-dateutil - FILE=python-dateutil-1.5.tar.gz - URL=https://pypi.python.org/packages/source/p/python-dateutil/ - MD5SUM:=0dcb1de5e5cad69490a3b6ab63f0cfa5 +define Build/Compile + $(call Build/Compile/Default,locale) endef -define Build/Configure -endef +define Package/seafile-seahub/description + The web end of seafile server. -define Build/Compile - # Download python dependencies - $(eval $(call Download,django)) - $(eval $(call Download,djblets)) - $(eval $(call Download,gunicorn)) - $(eval $(call Download,six)) - $(eval $(call Download,chardet)) - $(eval $(call Download,flup)) - $(eval $(call Download,lockfile)) - $(eval $(call Download,python-daemon)) - $(eval $(call Download,python-dateutil)) - # Install python dependencies - $(call HostPython,, \ - $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ - $(DL_DIR)/Django-1.5.8.tar.gz) - $(call HostPython,, \ - $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ - $(DL_DIR)/djblets-0.6.14.tar.gz) - $(call HostPython,, \ - $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ - $(DL_DIR)/gunicorn-0.16.1.tar.gz) - $(call HostPython,, \ - $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ - $(DL_DIR)/six-1.4.1.tar.gz) - $(call HostPython,, \ - $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ - $(DL_DIR)/chardet-2.1.1.tar.gz) - $(call HostPython,, \ - $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ - $(DL_DIR)/flup-1.0.2-py2.6.egg) - $(call HostPython,, \ - $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ - $(DL_DIR)/lockfile-0.9.1.tar.gz) - $(call HostPython,, \ - $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ - $(DL_DIR)/python-daemon-1.5.5.tar.gz) - $(call HostPython,, \ - $(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \ - $(DL_DIR)/python-dateutil-1.5.tar.gz) + 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 @@ -146,14 +53,8 @@ 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/ - # 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 + $(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)) diff --git a/net/seafile-seahub/patches/020-Makefile-fixes.patch b/net/seafile-seahub/patches/020-Makefile-fixes.patch new file mode 100644 index 000000000..49b67f8f1 --- /dev/null +++ b/net/seafile-seahub/patches/020-Makefile-fixes.patch @@ -0,0 +1,28 @@ +diff -rupN seafile-seahub-5.1.1.orig/Makefile seafile-seahub-5.1.1/Makefile +--- seafile-seahub-5.1.1.orig/Makefile 2016-04-26 23:59:48.000000000 +0200 ++++ seafile-seahub-5.1.1/Makefile 2016-04-28 09:03:35.507105416 +0200 +@@ -1,3 +1,6 @@ ++include $(TOPDIR)/rules.mk ++$(call include_mk, python-package.mk) ++ + PROJECT=seahub + + develop: setup-git +@@ -9,7 +12,7 @@ dist: locale uglify statici18n collectst + + locale: + @echo "--> Compile locales" +- django-admin.py compilemessages ++ $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages) + @echo "" + + uglify: +@@ -19,7 +22,7 @@ uglify: + + statici18n: + @echo "--> Generate JS locale files in static/scripts/i18n" +- python manage.py compilejsi18n ++ $(call HostPython,,manage.py compilejsi18n) + + collectstatic: + @echo "--> Collect django static files to media/assets" diff --git a/net/seafile-server/Makefile b/net/seafile-server/Makefile index 949345d8a..bbc155a45 100644 --- a/net/seafile-server/Makefile +++ b/net/seafile-server/Makefile @@ -1,29 +1,28 @@ # -# Copyright (C) 2007-2015 OpenWrt.org +# Copyright (C) 2007-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -# NOTE: make sure to update EXTRA_DEPENDS in case of version/release changes! - include $(TOPDIR)/rules.mk PKG_NAME:=seafile-server -PKG_VERSION:=4.1.2 -PKG_RELEASE=$(PKG_SOURCE_VERSION)-5 +PKG_VERSION:=5.1.1 +PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 PKG_LICENSE:=GPL-3.0 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/haiwen/seafile.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=c0166019c712e2e1d5e532fd5f7401b1b72db6d8 +PKG_SOURCE_VERSION:=5a8677a3acdde748caa387adfc054da64f2a24ea PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_FIXUP:=autoreconf PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk +$(call include_mk, python-package.mk) define Package/seafile-server SECTION:=net @@ -31,21 +30,16 @@ define Package/seafile-server TITLE:=Seafile server MAINTAINER:=Gergely Kiss URL:=http://seafile.com/ - DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub \ - +sqlite3-cli +python-mysql +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 \ - +libmysqlclient +libpthread +libuuid \ - +bash +sudo +procps-ng +procps-ng-pkill $(ICONV_DEPENDS) - EXTRA_DEPENDS:=seafile-ccnet (=4.1.2-a73109f09af4ecc49cdc4c57cdde51b38e15c31a-2), seafile-seahub (=4.1.2-3fb1288f920de03a4e2e6a06b60671ce98971742) + DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql \ + +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient +libevhtp \ + +libpthread +libuuid +bash +procps +procps-pkill $(ICONV_DEPENDS) + EXTRA_DEPENDS:=seafile-ccnet (=5.1.1-6d94fdc4296d542a5552039dc13a67c3448e8b13-1), seafile-seahub (=5.1.1-95f762f396c81f840fe658ab983df53784083bb1-1), libevhtp (>=1.2.10) endef define Package/seafile-server/description Open source cloud storage with advanced features on privacy protection and teamwork. endef -define Package/seafile-server/conffiles -/etc/config/seafile -endef - CONFIGURE_ARGS += --disable-riak \ --disable-client \ --disable-fuse \ @@ -55,87 +49,71 @@ CONFIGURE_ARGS += --disable-riak \ --disable-server-pkg \ --disable-console -PKG_BUILD_DEPENDS:=vala/host \ - libsearpc/host \ - libevhtp-1.1 +PKG_BUILD_DEPENDS:=vala/host TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv \ -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz +define Package/seafile-server/conffiles +/etc/config/seafile +endef + define Package/seafile-server/install $(INSTALL_DIR) $(1)/usr/{bin,lib} - $(INSTALL_DIR) $(1)/usr/lib/python2.7/site-packages - $(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server/runtime - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server + $(INSTALL_DIR) $(1)/usr/share/seafile/conf + $(INSTALL_DIR) $(1)/etc/{config,init.d} $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/seafile/ $(1)/usr/lib/python2.7/site-packages/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/seaserv/ $(1)/usr/lib/python2.7/site-packages/ + $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seafile/ $(1)$(PYTHON_PKG_DIR)/ + $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seaserv/ $(1)$(PYTHON_PKG_DIR)/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libseafile.so* $(1)/usr/lib/ $(CP) $(PKG_BUILD_DIR)/scripts/seaf-gc.sh $(1)/usr/share/seafile/seafile-server/ + $(CP) $(PKG_BUILD_DIR)/scripts/seaf-fsck.sh $(1)/usr/share/seafile/seafile-server/ $(CP) $(PKG_BUILD_DIR)/scripts/setup-seafile-mysql.py $(1)/usr/share/seafile/seafile-server/ $(CP) $(PKG_BUILD_DIR)/scripts/setup-seafile-mysql.sh $(1)/usr/share/seafile/seafile-server/ $(CP) $(PKG_BUILD_DIR)/scripts/sqlite2mysql.py $(1)/usr/share/seafile/seafile-server/ $(CP) $(PKG_BUILD_DIR)/scripts/sqlite2mysql.sh $(1)/usr/share/seafile/seafile-server/ + $(CP) $(PKG_BUILD_DIR)/scripts/check_init_admin.py $(1)/usr/share/seafile/seafile-server/ $(CP) $(PKG_BUILD_DIR)/scripts/upgrade/ $(1)/usr/share/seafile/seafile-server/ - $(INSTALL_BIN) ./files/seafile.init $(1)/etc/init.d/seafile $(CP) ./files/seafile.conf $(1)/etc/config/seafile + $(INSTALL_BIN) ./files/seafile.init $(1)/etc/init.d/seafile + $(INSTALL_BIN) ./files/seahub.init $(1)/etc/init.d/seahub + find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f endef define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) $(CP) $(PKG_INSTALL_DIR)/usr/include/seafile/ $(1)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseafile.pc $(1)/usr/lib/pkgconfig/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libseafile.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seafile/ $(1)$(PYTHON_PKG_DIR)/ + $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seaserv/ $(1)$(PYTHON_PKG_DIR)/ endef define Package/seafile-server/postinst #!/bin/sh -if ! group_exists seafile; then - group_add_next seafile; fi - -SEAFILE_GID=$$(grep -s '^seafile:' "$${IPKG_INSTROOT}/etc/group" | cut -d: -f3) - -if ! user_exists seafile; then - user_add seafile "" "$${SEAFILE_GID}" seafile /usr/share/seafile /bin/sh; fi - -if [ -z "$${IPKG_INSTROOT}" ] +if [ ! -d /usr/share/seafile/seafile-data ] then - chown -R seafile:seafile /usr/share/seafile/ - chmod -R o-rwx /usr/share/seafile/ + echo "*** Installation completed, running configuration script..." + /etc/init.d/seafile setup - if [ ! -d /usr/share/seafile/seafile-data ] + if [ $$? -ne 0 ] then - echo "*** Installation completed, running configuration script..." - /etc/init.d/seafile setup - - if [ $$? -ne 0 ] - then - echo - echo "*** ERROR: Configuration failed. Please fix the issues if any and re-run the script using the command below:" - echo "*** \"/etc/init.d/seafile setup\"" - fi - - echo - echo "*** NOTE: you need to create an admin account before using Seafile." - echo "*** Please run \"/etc/init.d/seafile create_admin\" to do so." - else - echo "*** It seems you are upgrading from an older version." - echo "*** If so, please run the appropriate upgrade scripts before using the new version of Seafile." - echo "*** Upgrade scripts are located at \"/usr/share/seafile/seafile-server/upgrade\"" echo - echo "*** For more information, please read http://manual.seafile.com/deploy/upgrade.html" + echo "*** ERROR: Configuration failed. Please fix the issues if any and re-run the script using the command below:" + echo "*** \"/etc/init.d/seafile setup\"" fi else - cat > "$${IPKG_INSTROOT}/etc/uci-defaults/99_seafile-server" << EOF -#!/bin/sh - -chown -R seafile:seafile /usr/share/seafile/ -chmod -R o-rwx /usr/share/seafile/ -exit 0 -EOF + echo "*** seafile-data directory already exists." + echo "*** In case you are upgrading seafile, please run the appropriate upgrade script" + echo "*** manually before using the new version of Seafile." + echo "*** Upgrade scripts are located at \"/usr/share/seafile/seafile-server/upgrade\"" + echo + echo "*** For more information, please read http://manual.seafile.com/deploy/upgrade.html" fi endef diff --git a/net/seafile-server/files/seafile.conf b/net/seafile-server/files/seafile.conf index fa8240e94..f4c0ea9d0 100644 --- a/net/seafile-server/files/seafile.conf +++ b/net/seafile-server/files/seafile.conf @@ -1,2 +1,12 @@ # Start Seahub in fastcgi mode - 1 = enable, 0 = disable SEAHUB_FASTCGI=0 +# Listen on the port specified below (defaults to 8000) +SEAHUB_PORT=8000 +# Method of serving requests (fastcgi mode only) - threaded or prefork +# Using threaded mode is recommended as it consumes less resources +SEAHUB_METHOD=threaded +# The maximum number of worker processes/threads (fastcgi mode only) +# General formula: (2 x $num_cores) + 1 +# To set the number of workers in WSGI mode (which is the default) +# please edit /usr/share/seafile/seafile-server/runtime/seahub.conf +SEAHUB_WORKERS=3 diff --git a/net/seafile-server/files/seafile.init b/net/seafile-server/files/seafile.init index 42f98e2d9..1c6553a2e 100755 --- a/net/seafile-server/files/seafile.init +++ b/net/seafile-server/files/seafile.init @@ -1,57 +1,157 @@ -#!/bin/sh /etc/rc.common +#!/bin/bash /etc/rc.common -START=99 +START=98 APP=seafile EXTRA_HELP=" setup Runs the setup script create_admin Creates the administrative login reset_admin Alias to create_admin" EXTRA_COMMANDS="setup create_admin reset_admin" -SEAHUB_FASTCGI=0 +TOPDIR=/usr/share/seafile +default_ccnet_conf_dir=${TOPDIR}/ccnet +central_config_dir=${TOPDIR}/conf +seaf_controller=/usr/bin/seafile-controller -[ -f /etc/config/seafile ] && \ - . /etc/config/seafile +function validate_ccnet_conf_dir () { + if [[ ! -d ${default_ccnet_conf_dir} ]]; then + echo "Error: there is no ccnet config directory." + echo "Have you run \"/etc/init.d/seafile setup\"?" + echo "" + exit 1 + fi +} + +function validate_central_conf_dir () { + if [[ ! -d ${central_config_dir} ]]; then + echo "Error: there is no conf/ directory." + echo "Have you run \"/etc/init.d/seafile setup\"?" + echo "" + exit 1 + fi +} + +function read_seafile_data_dir () { + seafile_ini=${default_ccnet_conf_dir}/seafile.ini + if [[ ! -f ${seafile_ini} ]]; then + echo "Error: ${seafile_ini} not found." + exit 1 + fi + seafile_data_dir=$(cat "${seafile_ini}") + if [[ ! -d ${seafile_data_dir} ]]; then + echo "Your seafile server data directory \"${seafile_data_dir}\" is invalid or doesn't exits." + echo "Please check it first, or create this directory yourself." + echo "" + exit 1 + fi +} + +function test_config() { + if ! ${seaf_controller} --test \ + -c "${default_ccnet_conf_dir}" \ + -d "${seafile_data_dir}" \ + -F "${central_config_dir}" ; then + exit 1 + fi +} + +function check_component_running() { + name=$1 + cmd=$2 + if pid=$(pgrep -f "$cmd" 2>/dev/null); then + return 1 + fi +} -export PATH="/usr/share/seafile/seafile-server/seahub/thirdpart:${PATH}" -export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:${PYTHONPATH}" +function validate_already_running () { + check_component_running "seafile-controller" "seafile-controller -F ${central_config_dir}" || return 1 + check_component_running "ccnet-server" "ccnet-server -F ${central_config_dir}" || return 1 + check_component_running "seaf-server" "seaf-server -F ${central_config_dir}" || return 1 + check_component_running "fileserver" "fileserver -F ${central_config_dir}" || return 1 + check_component_running "seafdav" "wsgidav.server.run_server" || return 1 +} + +function start_seafile_server () { + if ! validate_already_running; then + if [[ "$name" == "seafile-controller" ]]; then + echo "Seafile already running." + else + echo "Error: component [$name] is already running. Please try stopping it manually by running \"kill $pid\"." + echo "To force killing the process, use \"kill -9 $pid\"." + fi + exit 1 + fi + validate_central_conf_dir + validate_ccnet_conf_dir + read_seafile_data_dir + test_config + + echo "Starting seafile server, please wait ..." -start() { - if [ ! -d /var/run/seafile ] - then - mkdir /var/run/seafile - chown seafile:seafile /var/run/seafile - chmod o-rwx /var/run/seafile + ${seaf_controller} \ + -F "${central_config_dir}" \ + -c "${default_ccnet_conf_dir}" \ + -d "${seafile_data_dir}" + + sleep 3 + + # check if seafile server started successfully + if ! pgrep -f "seafile-controller -F ${central_config_dir}" 2>/dev/null 1>&2; then + echo "Failed to start seafile server" + exit 1 fi - if [ ${SEAHUB_FASTCGI} -eq 1 ]; then - cd "/usr/share/seafile" && \ - sudo PYTHONPATH="${PYTHONPATH}" -u seafile -E \ - "/usr/bin/seafile-admin" start --fastcgi + echo "Seafile server started" + echo +} + +function stop_seafile_server () { + if ! pgrep -f "seafile-controller -F ${central_config_dir}" 2>/dev/null 1>&2; then + echo "Seafile server not running" else - cd "/usr/share/seafile" && \ - sudo PYTHONPATH="${PYTHONPATH}" -u seafile -E \ - "/usr/bin/seafile-admin" start + echo "Stopping seafile server ..." + pkill -SIGTERM -f "seafile-controller -F ${central_config_dir}" + pkill -f "ccnet-server -F ${central_config_dir}" + pkill -f "seaf-server -F ${central_config_dir}" + pkill -f "fileserver -F ${central_config_dir}" + pkill -f "soffice.*--invisible --nocrashreport" + pkill -f "wsgidav.server.run_server" + retry=1 + while ! validate_already_running && [ $retry -lt 60 ]; do sleep 1; ((retry++)); done + if ! validate_already_running; then + echo "Error: [$name] component is still running. Please try stopping it manually by running \"kill $pid\"." + echo "To force killing the process, use \"kill -9 $pid\"." + fi + fi } -stop() { - cd "/usr/share/seafile" && \ - sudo PYTHONPATH="${PYTHONPATH}" -u seafile -E \ - "/usr/bin/seafile-admin" stop +function restart_seafile_server () { + stop_seafile_server + start_seafile_server +} + +function start() { + start_seafile_server +} + +function stop() { + stop_seafile_server +} + +function restart() { + restart_seafile_server } -setup() { - cd "/usr/share/seafile" && \ - sudo PYTHONPATH="${PYTHONPATH}" -u seafile -E \ - "/usr/bin/seafile-admin" setup +function setup() { + cd "$TOPDIR" && \ + /usr/bin/seafile-admin setup } -create_admin() { - cd "/usr/share/seafile" && \ - sudo PYTHONPATH="${PYTHONPATH}" -u seafile -E \ - "/usr/bin/seafile-admin" create-admin +function create_admin() { + cd "$TOPDIR" && \ + /usr/bin/seafile-admin create-admin } -reset_admin() { +function reset_admin() { create_admin } diff --git a/net/seafile-server/files/seahub.init b/net/seafile-server/files/seahub.init new file mode 100755 index 000000000..da3a1d1a7 --- /dev/null +++ b/net/seafile-server/files/seahub.init @@ -0,0 +1,226 @@ +#!/bin/bash /etc/rc.common + +START=99 +APP=seahub +EXTRA_HELP=" clearsessions Clears expired sessions from database" +EXTRA_COMMANDS="clearsessions" + +SEAHUB_FASTCGI=0 +SEAHUB_PORT=8000 +SEAHUB_METHOD=threaded +SEAHUB_WORKERS=3 + +[ -f /etc/config/seafile ] && \ + . /etc/config/seafile + +INSTALLPATH=/usr/share/seafile/seafile-server +TOPDIR=$(dirname "${INSTALLPATH}") +default_ccnet_conf_dir=${TOPDIR}/ccnet +central_config_dir=${TOPDIR}/conf + +manage_py=${INSTALLPATH}/seahub/manage.py +gunicorn_conf=${INSTALLPATH}/runtime/seahub.conf +pidfile=/var/run/seafile/seahub.pid +errorlog=${INSTALLPATH}/runtime/error.log +accesslog=${INSTALLPATH}/runtime/access.log +gunicorn_exe=/usr/bin/gunicorn + +function check_python_executable() { + if [[ "$PYTHON" != "" && -x $PYTHON ]]; then + return 0 + fi + + if which python2.7 2>/dev/null 1>&2; then + PYTHON=python2.7 + elif which python27 2>/dev/null 1>&2; then + PYTHON=python27 + else + echo + echo "Can't find a python executable of version 2.7 or above in PATH" + echo "Install python 2.7+ before continue." + echo "Or if you installed it in a non-standard PATH, set the PYTHON enviroment varirable to it" + echo + exit 1 + fi +} + +function validate_ccnet_conf_dir() { + if [[ ! -d ${default_ccnet_conf_dir} ]]; then + echo "Error: there is no ccnet config directory." + echo "Have you run '/etc/init.d/seafile setup'?" + echo "" + exit 1 + fi +} + +function read_seafile_data_dir() { + seafile_ini=${default_ccnet_conf_dir}/seafile.ini + if [[ ! -f ${seafile_ini} ]]; then + echo "Error: ${seafile_ini} not found." + exit 1 + fi + seafile_data_dir=$(cat "${seafile_ini}") + if [[ ! -d ${seafile_data_dir} ]]; then + echo "Your seafile server data directory \"${seafile_data_dir}\" is invalid or doesn't exits." + echo "Please check it first, or create this directory yourself." + echo "" + exit 1 + fi +} + +function validate_seahub_running() { + if pid=$(pgrep -f "${manage_py}" 2>/dev/null); then + return 1 + elif pid=$(pgrep -f "seahub.wsgi:application" 2>/dev/null); then + return 1 + fi +} + +function validate_port() { + if ! [[ ${SEAHUB_PORT} =~ ^[1-9][0-9]{1,4}$ ]] ; then + printf "\033[033m${SEAHUB_PORT}\033[m is not a valid port number\n" + exit 1 + fi +} + +function warning_if_seafile_not_running() { + if ! pgrep -f "seafile-controller -F ${central_config_dir}" 2>/dev/null 1>&2; then + echo + echo "Error: seafile-controller not running. Have you run \"/etc/init.d/seafile start\"?" + echo + exit 1 + fi +} + +function prepare_seahub_log_dir() { + logdir="${TOPDIR}/logs" + if ! [[ -d "${logsdir}" ]]; then + if ! mkdir -p "${logdir}"; then + echo "Error: failed to create log dir \"${logdir}\"" + exit 1 + fi + fi + export SEAHUB_LOG_DIR="${logdir}" +} + +function before_start() { + prepare_env + warning_if_seafile_not_running + if ! validate_seahub_running; then + echo "Seahub is already running." + exit 1 + fi + prepare_seahub_log_dir + validate_port +} + +function start_seahub() { + before_start + echo "Starting seahub at port ${SEAHUB_PORT} ..." + check_init_admin + $PYTHON $gunicorn_exe seahub.wsgi:application -c "${gunicorn_conf}" -b "0.0.0.0:${SEAHUB_PORT}" --preload + + # Ensure seahub is started successfully + retry=1 + while ! validate_seahub_running && [[ ! -f "${pidfile}" ]] && [[ $retry -lt 120 ]]; do sleep 1; ((retry++)); done + if ! validate_seahub_running && [[ -f "${pidfile}" ]]; then + echo + echo "Seahub is started" + echo + else + printf "\033[33mError: Seahub failed to start.\033[m\n" + exit 1 + fi +} + +function start_seahub_fastcgi() { + before_start + + # Returns 127.0.0.1 if SEAFILE_FASTCGI_HOST is unset or hasn't got any value, + # otherwise returns value of SEAFILE_FASTCGI_HOST environment variable + address=`(test -z "$SEAFILE_FASTCGI_HOST" && echo "127.0.0.1") || echo $SEAFILE_FASTCGI_HOST` + + echo "Starting seahub (fastcgi) at ${address}:${SEAHUB_PORT} ..." + check_init_admin + $PYTHON "${manage_py}" runfcgi host=${address} port=${SEAHUB_PORT} pidfile=${pidfile} \ + outlog=${accesslog} errlog=${errorlog} maxchildren=${SEAHUB_WORKERS} method=${SEAHUB_METHOD} + + # Ensure seahub is started successfully + retry=1 + while ! validate_seahub_running && [[ ! -f "${pidfile}" ]] && [[ $retry -lt 120 ]]; do sleep 1; ((retry++)); done + if ! validate_seahub_running && [[ -f "${pidfile}" ]]; then + echo + echo "Seahub is started" + echo + else + printf "\033[33mError: Seahub failed to start.\033[m\n" + exit 1 + fi +} + +function prepare_env() { + check_python_executable + validate_ccnet_conf_dir + read_seafile_data_dir + + export CCNET_CONF_DIR=${default_ccnet_conf_dir} + export SEAFILE_CONF_DIR=${seafile_data_dir} + export SEAFILE_CENTRAL_CONF_DIR=${central_config_dir} + export PYTHONPATH="${INSTALLPATH}/seahub:${INSTALLPATH}/seahub/thirdpart:${PYTHONPATH}" +} + +function clear_sessions() { + prepare_env + + echo "Start clear expired session records ..." + $PYTHON "${manage_py}" clearsessions + + echo + echo "Done" + echo +} + +function stop_seahub() { + if [[ -f ${pidfile} ]]; then + pid=$(cat "${pidfile}") + echo "Stopping seahub ..." + kill ${pid} + rm -f ${pidfile} + retry=1 + while ! validate_seahub_running && [ $retry -lt 60 ]; do sleep 1; ((retry++)); done + if ! validate_seahub_running; then + echo "Error: seahub cannot be stopped. Please try stopping it manually by running \"kill $(echo "$pid" | tr '\n' ' ')\"." + echo "To force killing the processes, use \"kill -9 $(echo "$pid" | tr '\n' ' ')\"." + fi + else + echo "Seahub is not running" + fi +} + +function check_init_admin() { + check_init_admin_script=${INSTALLPATH}/check_init_admin.py + if ! $PYTHON $check_init_admin_script; then + exit 1 + fi +} + +function start() { + if [ "$SEAHUB_FASTCGI" == "1" ]; then + start_seahub_fastcgi + else + start_seahub + fi +} + +function stop() { + stop_seahub +} + +function restart() { + stop + start +} + +function clearsessions() { + clear_sessions +} diff --git a/net/seafile-server/patches/020-script-patches.patch b/net/seafile-server/patches/020-script-patches.patch index 8bb7ae707..585784dd4 100644 --- a/net/seafile-server/patches/020-script-patches.patch +++ b/net/seafile-server/patches/020-script-patches.patch @@ -1,40 +1,77 @@ -diff -rupN seafile-3.1.7-server.orig/scripts/seaf-gc.sh seafile-3.1.7-server/scripts/seaf-gc.sh ---- seafile-3.1.7-server.orig/scripts/seaf-gc.sh 2014-10-16 05:30:04.000000000 +0200 -+++ seafile-3.1.7-server/scripts/seaf-gc.sh 2014-12-13 00:51:12.919136978 +0100 -@@ -6,11 +6,10 @@ SCRIPT=$(readlink -f "$0") - INSTALLPATH=$(dirname "${SCRIPT}") +diff -rupN seafile-server-5.1.1.orig/scripts/seaf-fsck.sh seafile-server-5.1.1/scripts/seaf-fsck.sh +--- seafile-server-5.1.1.orig/scripts/seaf-fsck.sh 2016-04-21 11:05:26.000000000 +0200 ++++ seafile-server-5.1.1/scripts/seaf-fsck.sh 2016-04-22 09:10:13.075581325 +0200 +@@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}") TOPDIR=$(dirname "${INSTALLPATH}") default_ccnet_conf_dir=${TOPDIR}/ccnet + default_conf_dir=${TOPDIR}/conf +-seaf_fsck=${INSTALLPATH}/seafile/bin/seaf-fsck ++seaf_fsck=/usr/bin/seaf-fsck + + export PATH=${INSTALLPATH}/seafile/bin:$PATH + export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} +diff -rupN seafile-server-5.1.1.orig/scripts/seaf-gc.sh seafile-server-5.1.1/scripts/seaf-gc.sh +--- seafile-server-5.1.1.orig/scripts/seaf-gc.sh 2016-04-21 11:05:26.000000000 +0200 ++++ seafile-server-5.1.1/scripts/seaf-gc.sh 2016-04-22 09:10:27.211581999 +0200 +@@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}") + TOPDIR=$(dirname "${INSTALLPATH}") + default_ccnet_conf_dir=${TOPDIR}/ccnet + default_conf_dir=${TOPDIR}/conf -seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc +seaf_gc=/usr/bin/seafserv-gc seaf_gc_opts="" --export PATH=${INSTALLPATH}/seafile/bin:$PATH --export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} -+export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH" - - script_name=$0 - function usage () { -@@ -78,9 +77,7 @@ function run_seaf_gc () { - - echo "Starting seafserv-gc, please wait ..." - -- LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_gc} \ -- -c "${default_ccnet_conf_dir}" -d "${seafile_data_dir}" \ -- ${seaf_gc_opts} -+ ${seaf_gc} -c "${default_ccnet_conf_dir}" -d "${seafile_data_dir}" ${seaf_gc_opts} + export PATH=${INSTALLPATH}/seafile/bin:$PATH +diff -rupN seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh seafile-server-5.1.1/scripts/setup-seafile-mysql.sh +--- seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh 2016-04-21 11:05:26.000000000 +0200 ++++ seafile-server-5.1.1/scripts/setup-seafile-mysql.sh 2016-04-22 09:11:50.083585953 +0200 +@@ -40,15 +40,10 @@ function check_python_executable() { + function check_python_module () { + module=$1 + name=$2 +- hint=$3 + printf " Checking python module: ${name} ... " + if ! $PYTHON -c "import ${module}" 2>/dev/null 1>&2; then + echo + printf "\033[33m ${name} \033[m is not installed, Please install it first.\n" +- if [[ "${hint}" != "" ]]; then +- printf "${hint}" +- echo +- fi + err_and_quit; + fi + echo -e "Done." +@@ -70,14 +65,10 @@ function check_python () { + if [[ $PYTHON == "python2.6" ]]; then + py26="2.6" + fi +- hint="\nOn Debian/Ubntu: apt-get install python-setuptools\nOn CentOS/RHEL: yum install python${py26}-distribute" +- check_python_module pkg_resources setuptools "${hint}" +- +- hint="\nOn Debian/Ubntu: apt-get install python-imaging\nOn CentOS/RHEL: yum install python${py26}-imaging" +- check_python_module PIL python-imaging "${hint}" - echo "seafserv-gc run done" +- hint='\nOn Debian/Ubuntu:\n\nsudo apt-get install python-mysqldb\n\nOn CentOS/RHEL:\n\nsudo yum install MySQL-python' +- check_python_module MySQLdb python-mysqldb "${hint}" ++ check_python_module pkg_resources setuptools ++ check_python_module PIL python-imaging ++ check_python_module MySQLdb python-mysqldb + fi echo -diff -rupN seafile-3.1.7-server.orig/scripts/setup-seafile-mysql.sh seafile-3.1.7-server/scripts/setup-seafile-mysql.sh ---- seafile-3.1.7-server.orig/scripts/setup-seafile-mysql.sh 2014-10-16 05:30:04.000000000 +0200 -+++ seafile-3.1.7-server/scripts/setup-seafile-mysql.sh 2014-12-13 00:51:49.242172631 +0100 -@@ -9,6 +9,8 @@ set -e - SCRIPT=$(readlink -f "$0") - INSTALLPATH=$(dirname "${SCRIPT}") + } +@@ -85,5 +76,6 @@ function check_python () { + check_python; + export PYTHON=$PYTHON +export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH" -+ - cd "$INSTALLPATH" - python_script=setup-seafile-mysql.py + exec $PYTHON "$python_script" +diff -rupN seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh seafile-server-5.1.1/scripts/sqlite2mysql.sh +--- seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh 2016-04-21 11:05:26.000000000 +0200 ++++ seafile-server-5.1.1/scripts/sqlite2mysql.sh 2016-04-22 09:02:22.047558854 +0200 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # + # This shell script and corresponding sqlite2mysql.py are used to + # migrate Seafile data from SQLite to MySQL. diff --git a/net/seafile-server/patches/030-pidfiles-in-same-directory.patch b/net/seafile-server/patches/030-pidfiles-in-same-directory.patch index 4338f1790..bb3f86c08 100644 --- a/net/seafile-server/patches/030-pidfiles-in-same-directory.patch +++ b/net/seafile-server/patches/030-pidfiles-in-same-directory.patch @@ -1,6 +1,6 @@ -diff -rupN seafile-3.1.7-server.orig/controller/seafile-controller.c seafile-3.1.7-server/controller/seafile-controller.c ---- seafile-3.1.7-server.orig/controller/seafile-controller.c 2014-10-16 05:30:04.000000000 +0200 -+++ seafile-3.1.7-server/controller/seafile-controller.c 2014-11-28 16:50:24.053674057 +0100 +diff -rupN seafile-server-5.1.1.orig/controller/seafile-controller.c seafile-server-5.1.1/controller/seafile-controller.c +--- seafile-server-5.1.1.orig/controller/seafile-controller.c 2016-04-19 15:44:32.000000000 +0200 ++++ seafile-server-5.1.1/controller/seafile-controller.c 2016-04-19 16:23:05.785000218 +0200 @@ -21,7 +21,7 @@ SeafileController *ctl; @@ -10,7 +10,7 @@ diff -rupN seafile-3.1.7-server.orig/controller/seafile-controller.c seafile-3.1 char *bin_dir = NULL; char *installpath = NULL; -@@ -614,9 +614,9 @@ stop_ccnet_server () +@@ -575,9 +575,9 @@ stop_ccnet_server () static void init_pidfile_path (SeafileController *ctl) { diff --git a/net/seafile-server/patches/040-seafile-admin.patch b/net/seafile-server/patches/040-seafile-admin.patch index 1948c738b..667cdadd1 100644 --- a/net/seafile-server/patches/040-seafile-admin.patch +++ b/net/seafile-server/patches/040-seafile-admin.patch @@ -1,62 +1,55 @@ -diff -rupN seafile-3.1.7-server.orig/tools/seafile-admin seafile-3.1.7-server/tools/seafile-admin ---- seafile-3.1.7-server.orig/tools/seafile-admin 2014-10-16 05:30:04.000000000 +0200 -+++ seafile-3.1.7-server/tools/seafile-admin 2014-12-22 21:52:25.929781054 +0100 -@@ -416,13 +416,13 @@ def create_gunicorn_conf(): - content = '''\ - import os - daemon = True --workers = 3 -+workers = 1 -+threads = 3 +diff -rupN seafile-server-5.1.1.orig/tools/seafile-admin seafile-server-5.1.1/tools/seafile-admin +--- seafile-server-5.1.1.orig/tools/seafile-admin 2016-04-19 15:44:33.000000000 +0200 ++++ seafile-server-5.1.1/tools/seafile-admin 2016-04-26 10:55:11.826798430 +0200 +@@ -449,9 +449,12 @@ workers = 3 # Logging runtime_dir = os.path.dirname(__file__) -pidfile = os.path.join(runtime_dir, 'seahub.pid') +pidfile = '/var/run/seafile/seahub.pid' errorlog = os.path.join(runtime_dir, 'error.log') --accesslog = os.path.join(runtime_dir, 'access.log') + accesslog = os.path.join(runtime_dir, 'access.log') ++ ++# for file upload, we need a longer timeout value (default is only 30s, too short) ++timeout = 1200 ''' + try: - with open(confpath, 'w') as fp: -@@ -607,6 +607,7 @@ def start_seahub_gunicorn(): - 'gunicorn_django', - '-c', conf[CONF_SEAHUB_CONF], - '-b', '0.0.0.0:%s' % conf[CONF_SEAHUB_PORT], -+ '-t', '120', - ] +@@ -526,6 +529,7 @@ def check_django_version(): - info('Starting seahub...') -@@ -625,6 +626,7 @@ def start_seahub_fastcgi(): - 'pidfile=%(pidfile)s', - 'outlog=%(outlog)s', - 'errlog=%(errlog)s', -+ 'method=threaded', - ] - cmdline = ' '.join(argv) % \ -@@ -693,7 +695,7 @@ def check_layout(args): - conf[CONF_SEAFILE_DIR] = seafile_data_dir - conf[CONF_SEAHUB_DIR] = seahub_dir - conf[CONF_SEAHUB_CONF] = seahub_conf -- conf[CONF_SEAHUB_PIDFILE] = os.path.join(runtime_dir, 'seahub.pid') -+ conf[CONF_SEAHUB_PIDFILE] = '/var/run/seafile/seahub.pid' - conf[CONF_SEAHUB_OUTLOG] = os.path.join(runtime_dir, 'access.log') - conf[CONF_SEAHUB_ERRLOG] = os.path.join(runtime_dir, 'error.log') + def check_python_module(import_name, package_name=None, silent=False): ++ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "seahub.settings") + package_name = package_name or import_name + if not silent: + info('checking %s' % package_name) +@@ -785,7 +789,7 @@ def check_layout(args): + conf[CONF_SEAFILE_DIR] = seafile_data_dir + conf[CONF_SEAHUB_DIR] = seahub_dir + conf[CONF_SEAHUB_CONF] = seahub_conf +- conf[CONF_SEAHUB_PIDFILE] = os.path.join(runtime_dir, 'seahub.pid') ++ conf[CONF_SEAHUB_PIDFILE] = '/var/run/seafile/seahub.pid' + conf[CONF_SEAHUB_OUTLOG] = os.path.join(runtime_dir, 'access.log') + conf[CONF_SEAHUB_ERRLOG] = os.path.join(runtime_dir, 'error.log') -@@ -738,10 +740,9 @@ def setup_seafile(args): +@@ -836,10 +840,13 @@ def setup_seafile(args): print '-----------------------------------------------------------------' print '-----------------------------------------------------------------' print - print 'To start/stop seafile server:' -+ print 'To start, stop or restart seafile server, please run as root:' ++ print 'To start, stop or restart seafile:' ++ print ++ print highlight(' # /etc/init.d/seafile { start | stop | restart }') print - print highlight(' $ cd %s' % cwd) - print highlight(' $ %s { start | stop }' % SCRIPT_NAME) -+ print highlight(' # /etc/init.d/seafile { start | stop | restart }') ++ print 'To start, stop or restart seahub:' ++ print ++ print highlight(' # /etc/init.d/seahub { start | stop | restart }') print print 'If you have any problem, refer to\n' print -@@ -802,8 +803,7 @@ def start_seafile(args): +@@ -903,8 +910,7 @@ def start_seafile(args): def stop_seafile(dummy): info('Stopping seafile server') pkill('seafile-controller') diff --git a/net/seafile-server/patches/050-libevhtp-search-path-fix.patch b/net/seafile-server/patches/050-libevhtp-search-path-fix.patch deleted file mode 100644 index cb7e545d1..000000000 --- a/net/seafile-server/patches/050-libevhtp-search-path-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -rupN seafile-server-4.1.2.orig/server/Makefile.am seafile-server-4.1.2/server/Makefile.am ---- seafile-server-4.1.2.orig/server/Makefile.am 2015-05-02 11:04:11.000000000 +0200 -+++ seafile-server-4.1.2/server/Makefile.am 2015-06-14 01:28:55.924834806 +0200 -@@ -4,6 +4,7 @@ AM_CFLAGS = -DPKGDATADIR=\"$(pkgdatadir) - -DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \ - -DSEAFILE_SERVER \ - -DFULL_FEATURE \ -+ -I$(STAGING_DIR)/usr/include/libevhtp-1.1 \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/lib \ - -I$(top_builddir)/lib \ -@@ -122,4 +123,4 @@ seaf_server_LDADD = @CCNET_LIBS@ \ - @SEARPC_LIBS@ @JANSSON_LIBS@ @ZDB_LIBS@ @CURL_LIBS@ ${LIB_WS32} @ZLIB_LIBS@ \ - @LIBARCHIVE_LIBS@ - --seaf_server_LDFLAGS = @STATIC_COMPILE@ @SERVER_PKG_RPATH@ -+seaf_server_LDFLAGS = @STATIC_COMPILE@ @SERVER_PKG_RPATH@ -L$(STAGING_DIR)/usr/lib/libevhtp-1.1 diff --git a/net/seafile-server/patches/050-libseafile-makefile-fixes.patch b/net/seafile-server/patches/050-libseafile-makefile-fixes.patch new file mode 100644 index 000000000..7eb435460 --- /dev/null +++ b/net/seafile-server/patches/050-libseafile-makefile-fixes.patch @@ -0,0 +1,43 @@ +diff -rupN seafile-server-5.1.1.orig/lib/Makefile.am seafile-server-5.1.1/lib/Makefile.am +--- seafile-server-5.1.1.orig/lib/Makefile.am 2016-04-21 11:05:26.000000000 +0200 ++++ seafile-server-5.1.1/lib/Makefile.am 2016-04-22 10:09:41.567751561 +0200 +@@ -1,3 +1,5 @@ ++include $(TOPDIR)/rules.mk ++ + pcfiles = libseafile.pc + pkgconfig_DATA = $(pcfiles) + pkgconfigdir = $(libdir)/pkgconfig +@@ -35,7 +37,7 @@ seafile-rpc-wrapper.c: seafile-object.h + + seafile-object.h: ${seafile_object_define} + rm -f $@ +- valac --pkg posix ${seafile_object_define} -C -H seafile-object.h ++ "$(STAGING_DIR_HOST)/bin/valac" --pkg posix ${seafile_object_define} -C -H seafile-object.h + + DISTCLEANFILES = ${searpc_gen} + +@@ -64,7 +66,7 @@ rpc_table.stamp: ${top_srcdir}/lib/rpc_t + @rm -f rpc_table.tmp + @touch rpc_table.tmp + @echo "[libsearpc]: generating rpc header files" +- @PYTHON@ `which searpc-codegen.py` ${top_srcdir}/lib/rpc_table.py ++ @PYTHON@ "$(STAGING_DIR)/usr/bin/searpc-codegen.py" ${top_srcdir}/lib/rpc_table.py + @echo "[libsearpc]: done" + @mv -f rpc_table.tmp $@ + +@@ -74,7 +76,7 @@ vala.stamp: ${seafile_object_define} + rm -f ${seafile_object_gen} + @rm -f vala.tmp + @touch vala.tmp +- valac -C --pkg posix $^ ++ "$(STAGING_DIR_HOST)/bin/valac" -C --pkg posix $^ + @mv -f vala.tmp $@ + + ${seafile_object_gen}: vala.stamp +@@ -90,5 +92,5 @@ install-data-local: + if MACOS + sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles) + else +- ${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles) ++ ${SED} "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles) + endif diff --git a/net/seafile-server/patches/060-libevent2-include-path.patch b/net/seafile-server/patches/060-libevent2-include-path.patch deleted file mode 100644 index 958a13647..000000000 --- a/net/seafile-server/patches/060-libevent2-include-path.patch +++ /dev/null @@ -1,107 +0,0 @@ -diff -rupN seafile-server-4.1.2.orig/lib/net.c seafile-server-4.1.2/lib/net.c ---- seafile-server-4.1.2.orig/lib/net.c 2015-09-09 19:31:56.000000000 +0200 -+++ seafile-server-4.1.2/lib/net.c 2015-09-14 20:20:30.906021296 +0200 -@@ -31,11 +31,7 @@ - - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #include "net.h" - -diff -rupN seafile-server-4.1.2.orig/lib/net.h seafile-server-4.1.2/lib/net.h ---- seafile-server-4.1.2.orig/lib/net.h 2015-09-09 19:31:56.000000000 +0200 -+++ seafile-server-4.1.2/lib/net.h 2015-09-14 20:20:30.906021296 +0200 -@@ -19,11 +19,7 @@ - #include - #endif - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #ifdef WIN32 - #define ECONNREFUSED WSAECONNREFUSED -diff -rupN seafile-server-4.1.2.orig/lib/utils.h seafile-server-4.1.2/lib/utils.h ---- seafile-server-4.1.2.orig/lib/utils.h 2015-09-09 19:31:56.000000000 +0200 -+++ seafile-server-4.1.2/lib/utils.h 2015-09-14 20:20:30.907021326 +0200 -@@ -13,11 +13,7 @@ - #include - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #ifdef __linux__ - #include -diff -rupN seafile-server-4.1.2.orig/server/access-file.c seafile-server-4.1.2/server/access-file.c ---- seafile-server-4.1.2.orig/server/access-file.c 2015-09-09 19:31:56.000000000 +0200 -+++ seafile-server-4.1.2/server/access-file.c 2015-09-14 20:20:30.907021326 +0200 -@@ -3,13 +3,9 @@ - #define DEBUG_FLAG SEAFILE_DEBUG_HTTP - #include "log.h" - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include - #include --#else --#include --#endif - - #include - -diff -rupN seafile-server-4.1.2.orig/server/http-server.c seafile-server-4.1.2/server/http-server.c ---- seafile-server-4.1.2.orig/server/http-server.c 2015-09-09 19:31:56.000000000 +0200 -+++ seafile-server-4.1.2/server/http-server.c 2015-09-14 20:20:30.908021355 +0200 -@@ -6,11 +6,7 @@ - #include - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #include - -diff -rupN seafile-server-4.1.2.orig/server/listen-mgr.c seafile-server-4.1.2/server/listen-mgr.c ---- seafile-server-4.1.2.orig/server/listen-mgr.c 2015-09-09 19:31:56.000000000 +0200 -+++ seafile-server-4.1.2/server/listen-mgr.c 2015-09-14 20:23:15.614452334 +0200 -@@ -3,11 +3,9 @@ - #include - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include - #include - #include --#endif - - - #include "seafile-session.h" -diff -rupN seafile-server-4.1.2.orig/server/upload-file.c seafile-server-4.1.2/server/upload-file.c ---- seafile-server-4.1.2.orig/server/upload-file.c 2015-09-09 19:31:56.000000000 +0200 -+++ seafile-server-4.1.2/server/upload-file.c 2015-09-14 20:20:30.909021385 +0200 -@@ -6,11 +6,7 @@ - #include - #include - --#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #include --#else --#include --#endif - - #include - diff --git a/net/seafile-server/patches/060-timestamps-as-int64.patch b/net/seafile-server/patches/060-timestamps-as-int64.patch new file mode 100644 index 000000000..5e655d839 --- /dev/null +++ b/net/seafile-server/patches/060-timestamps-as-int64.patch @@ -0,0 +1,39 @@ +diff -rupN seafile-server-5.1.1.orig/lib/repo.vala seafile-server-5.1.1/lib/repo.vala +--- seafile-server-5.1.1.orig/lib/repo.vala 2016-04-19 15:44:32.000000000 +0200 ++++ seafile-server-5.1.1/lib/repo.vala 2016-04-25 21:29:33.327962235 +0200 +@@ -30,7 +30,7 @@ public class Repo : Object { + // data format version + public int version { get; set; } + +- public int last_modify { get; set; } ++ public int64 last_modify { get; set; } + public int64 size { get; set; } + public int64 file_count { get; set; } + public string head_cmmt_id { get; set; } +@@ -40,7 +40,7 @@ public class Repo : Object { + public string repo_id { get; set; } + public string repo_name { get; set; } + public string repo_desc { get; set; } +- public int last_modified { get; set; } ++ public int64 last_modified { get; set; } + + // Section 2: Encryption related + // Members in this section should be set for every Repo object +@@ -63,7 +63,7 @@ public class Repo : Object { + get { return _relay_id; } + set { _relay_id = value; } + } +- public int last_sync_time { get; set; } ++ public int64 last_sync_time { get; set; } + public bool auto_sync { get; set; } + public bool worktree_invalid { get; set; } + +@@ -155,7 +155,7 @@ public class DeletedEntry : Object { + public string obj_name { get; set; } + public string basedir { get; set; } + public int mode { get; set; } +- public int delete_time { get; set; } ++ public int64 delete_time { get; set; } + public int64 file_size { get; set; } + public string scan_stat { get; set; } + }