From f90a62727870a209c97d773d3fd02fb048e939c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 6 Apr 2025 11:39:37 +0200 Subject: [PATCH] Adding python implementation as python3-qrcodegen. Signed-off-by: Daniel Baumann --- debian/control | 17 +++++++++++++++++ debian/rules | 14 +++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index bebf46f..db1481b 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,10 @@ Priority: optional Maintainer: Daniel Baumann Build-Depends: debhelper-compat (= 13), + dh-sequence-python3, node-typescript, + python3-all, + python3-setuptools, terser, Rules-Requires-Root: no Standards-Version: 4.7.2 @@ -27,3 +30,17 @@ Description: QR Code generator library (javascript) Model 2 standard. . This package contains the javascript implementation. + +Package: python3-qrcodegen +Architecture: all +Section: python +Depends: + ${misc:Depends}, + ${python3:Depends}, +Description: QR Code generator library (Python) + The Nayuki QR Code generator library aims to be the best library for generating + QR Codes by providing flexible options and absolute correctness. It supports + all 40 versions (sizes) and all 4 error correction levels, as per the QR Code + Model 2 standard. + . + This package contains the Python implementation. diff --git a/debian/rules b/debian/rules index 211e56c..f686fea 100755 --- a/debian/rules +++ b/debian/rules @@ -1,19 +1,27 @@ #!/usr/bin/make -f +export PYBUILD_NAME=qrcodegen + %: - dh ${@} + dh ${@} --buildsystem=pybuild --sourcedirectory=python execute_after_dh_auto_clean: + # libjs-qrcodegen rm -f typescript-javascript/*.js* -override_dh_auto_build: + # python3-qrcodegen + rm -rf python/*.egg-info + +execute_after_dh_auto_build: + # libjs-qrcodegen cd typescript-javascript && \ sh ./build.sh cd typescript-javascript && \ terser qrcodegen.js -c -m -o qrcodegen.min.js --source-map -override_dh_auto_install: +execute_after_dh_auto_install: + # libjs-qrcodegen mkdir -p debian/libjs-qrcodegen/usr/share/qr-code-generator/javascript cp typescript-javascript/qrcodegen.*js* debian/libjs-qrcodegen/usr/share/qr-code-generator/javascript