Files
openwrt-packages/net/seafile-seahub/Makefile
Jeffery To 722a5b8efa python3: Use hash-checking mode when installing host pip packages
In hash-checking mode[1], pip will verify downloaded package archives
(source tarballs in our case) against known SHA256 hashes before
installing the packages.

As a consequence, this requires the use of requirements files[2] and
pinning packages to known versions.

The syntax for package Makefiles has changed slightly;
HOST_PYTHON3_PACKAGE_BUILD_DEPENDS no longer accepts requirement
specifiers like "foo>=1.0", only requirements file names (which are the
same as package names in the most common case).

This also updates affected packages, in particular:

* python-zipp: "setuptools_scm[toml]" has been split into
  "setuptools-scm toml" to reuse the requirements file for
  setuptools-scm (the extra depends installed by "setuptools_scm[toml]"
  is toml).

* python-pycparser: This previously used ply 3.10, whereas the
  requirements file will now install 3.11.

[1]: https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode
[2]: https://pip.pypa.io/en/stable/user_guide/#requirements-files

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-08-17 23:05:49 +08:00

97 lines
3.0 KiB
Makefile

#
# Copyright (C) 2007-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-seahub
PKG_VERSION:=7.1.4
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)-server?
PKG_HASH:=921ef4373311c06c1192975a294d7d38c12ac34381a7df19542391fc1d810baf
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE.txt
PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Django-1.11
PKG_BUILD_PARALLEL:=0
PYTHON3_PKG_BUILD:=0
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python3-package.mk
define Package/seafile-seahub
SECTION:=net
CATEGORY:=Network
TITLE:=Seafile server - seahub component
URL:=https://seafile.com/
DEPENDS:= \
+gunicorn3 \
+python3 \
+python3-chardet \
+python3-cryptodome \
+python3-dateutil \
+python3-django1 \
+python3-django-formtools \
+python3-django-picklefield \
+python3-django-postoffice \
+python3-django-restframework39 \
+python3-django-simple-captcha \
+python3-django-statici18n \
+python3-django-webpack-loader \
+python3-openpyxl \
+python3-pillow \
+python3-pyjwt \
+python3-pymysql \
+python3-pytz \
+python3-qrcode \
+python3-requests \
+python3-requests-oauthlib \
+python3-seafile-ccnet \
+python3-searpc
endef
define Package/seafile-seahub/description
The web end of seafile server.
Note: Localization support is turned off by default for performance
reasons. Set 'USE_I18N = True' in /etc/seafile/conf/seahub_settings.py
to use languages other than English.
endef
define Build/Configure
endef
MAKE_VARS += \
PYTHON="$(HOST_PYTHON3_BIN)" \
DJANGO_ADMIN_PY="$(STAGING_DIR_HOSTPKG)/bin/django-admin"
define Build/Compile
$(call HostPython3/PipInstall,$(PYTHON3_PKG_HOST_PIP_INSTALL_ARGS))
$(call Build/Compile/Default,locale)
endef
define Py3Package/seafile-seahub/install
$(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server/seahub/tools
$(CP) $(PKG_BUILD_DIR)/{frontend,locale,media,seahub,sql,static,thirdpart} $(1)/usr/share/seafile/seafile-server/seahub/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/manage.py $(1)/usr/share/seafile/seafile-server/seahub/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/tools/secret_key_generator.py $(1)/usr/share/seafile/seafile-server/seahub/tools/
$(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
mv $(1)/usr/share/seafile/seafile-server/seahub/media/avatars $(1)/usr/share/seafile/seafile-server/seahub/media/avatars_default
endef
Py3Package/seafile-seahub/filespec:=
$(eval $(call Py3Package,seafile-seahub))
$(eval $(call BuildPackage,seafile-seahub))
$(eval $(call BuildPackage,seafile-seahub-src))