From 53972c82964dd1337dff4ccbcdd484d243aef0ba Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Sat, 27 Nov 2021 04:37:33 -0700 Subject: [PATCH] package/python-zopfli: new package Signed-off-by: James Hilliard Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + package/Config.in | 1 + package/python-zopfli/Config.in | 7 +++++++ package/python-zopfli/python-zopfli.hash | 5 +++++ package/python-zopfli/python-zopfli.mk | 21 +++++++++++++++++++++ 5 files changed, 35 insertions(+) create mode 100644 package/python-zopfli/Config.in create mode 100644 package/python-zopfli/python-zopfli.hash create mode 100644 package/python-zopfli/python-zopfli.mk diff --git a/DEVELOPERS b/DEVELOPERS index 3b31b89568..82853cdc18 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1272,6 +1272,7 @@ F: package/python-sockjs/ F: package/python-terminaltables/ F: package/python-tinycss2/ F: package/python-yarl/ +F: package/python-zopfli/ N: James Knight F: package/atkmm/ diff --git a/package/Config.in b/package/Config.in index b9c2765830..e90d30e81c 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1296,6 +1296,7 @@ menu "External python modules" source "package/python-zc-lockfile/Config.in" source "package/python-zeroconf/Config.in" source "package/python-zope-interface/Config.in" + source "package/python-zopfli/Config.in" endmenu endif source "package/quickjs/Config.in" diff --git a/package/python-zopfli/Config.in b/package/python-zopfli/Config.in new file mode 100644 index 0000000000..69d4b8b514 --- /dev/null +++ b/package/python-zopfli/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_ZOPFLI + bool "python-zopfli" + depends on BR2_PACKAGE_PYTHON3 + help + Zopfli module for python. + + https://github.com/fonttools/py-zopfli diff --git a/package/python-zopfli/python-zopfli.hash b/package/python-zopfli/python-zopfli.hash new file mode 100644 index 0000000000..92b51bdf18 --- /dev/null +++ b/package/python-zopfli/python-zopfli.hash @@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/zopfli/json +md5 f66b6f4132533b9b0ab8b0af757237bf zopfli-0.1.9.zip +sha256 78de3cc08a8efaa8013d61528907d91ac4d6cc014ffd8a41cc10ee75e9e60d7b zopfli-0.1.9.zip +# Locally computed sha256 checksums +sha256 018b1cb87efdf7a04c2fcc13d57ed63f62149113fb207b27ea13430d64f13513 COPYING diff --git a/package/python-zopfli/python-zopfli.mk b/package/python-zopfli/python-zopfli.mk new file mode 100644 index 0000000000..95a0067b05 --- /dev/null +++ b/package/python-zopfli/python-zopfli.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# python-zopfli +# +################################################################################ + +PYTHON_ZOPFLI_VERSION = 0.1.9 +PYTHON_ZOPFLI_SOURCE = zopfli-$(PYTHON_ZOPFLI_VERSION).zip +PYTHON_ZOPFLI_SITE = https://files.pythonhosted.org/packages/10/7d/278fd896401b0ef76e06cd42c3ce1541572d83b1c713b6786795c60a1bbe +PYTHON_ZOPFLI_SETUP_TYPE = setuptools +PYTHON_ZOPFLI_LICENSE = Apache-2.0 +PYTHON_ZOPFLI_LICENSE_FILES = COPYING +PYTHON_ZOPFLI_DEPENDENCIES = host-python-setuptools-scm + +define PYTHON_ZOPFLI_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(PYTHON_ZOPFLI_DL_DIR)/$(PYTHON_ZOPFLI_SOURCE) + mv $(@D)/zopfli-$(PYTHON_ZOPFLI_VERSION)/* $(@D) + $(RM) -r $(@D)/zopfli-$(PYTHON_ZOPFLI_VERSION) +endef + +$(eval $(python-package))