From 11fda9ed89d3196c27822db7679f10df322fb2ef Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Thu, 5 May 2022 10:06:58 +0200 Subject: [PATCH] Add libfastqrcodegen-java package --- debian/control | 28 ++++ debian/libfastqrcodegen-java.poms | 1 + debian/maven.ignoreRules | 4 + debian/maven.rules | 1 + .../patches/0003-Add-java-fast-pom.xml.patch | 151 ++++++++++++++++++ debian/patches/series | 1 + debian/rules | 19 +++ 7 files changed, 205 insertions(+) create mode 100644 debian/libfastqrcodegen-java.poms create mode 100644 debian/maven.ignoreRules create mode 100644 debian/maven.rules create mode 100644 debian/patches/0003-Add-java-fast-pom.xml.patch diff --git a/debian/control b/debian/control index c2c180f..1650984 100644 --- a/debian/control +++ b/debian/control @@ -4,9 +4,12 @@ Priority: optional Maintainer: Yangfl Build-Depends: debhelper-compat (= 13), + default-jdk, + maven-debian-helper, Build-Depends-Indep: dh-python, python3, + libmaven-compiler-plugin-java, python3-setuptools, Rules-Requires-Root: no Standards-Version: 4.6.0 @@ -138,3 +141,28 @@ Description: QR Code generator library in multiple languages - Python3 version * Open source code under the permissive MIT License . This package contains the module in Python3. + +Package: libfastqrcodegen-java +Section: java +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, ${maven:Depends}, ${maven:CompileDepends} +Description: QR Code generator library in multiple languages - fast Java version + This project aims to be the best, clearest QR Code generator library in + multiple languages. The primary goals are flexible options and absolute + correctness. Secondary goals are compact implementation size and good + documentation comments. Core features: + * Available in 7 programming languages, all with nearly equal functionality: + Java, JavaScript, TypeScript, Python, C++, C, Rust + * Significantly shorter code but more documentation comments compared to + competing libraries + * Supports encoding all 40 versions (sizes) and all 4 error correction levels, + as per the QR Code Model 2 standard + * Output formats: Raw modules/pixels of the QR symbol (all languages), SVG XML + string (all languages except C), BufferedImage raster bitmap (Java only), + HTML5 canvas (JavaScript and TypeScript only) + * Encodes numeric and special-alphanumeric text in less space than general + text + * Open source code under the permissive MIT License + . + This package contains the fast libarary for Java. diff --git a/debian/libfastqrcodegen-java.poms b/debian/libfastqrcodegen-java.poms new file mode 100644 index 0000000..e613562 --- /dev/null +++ b/debian/libfastqrcodegen-java.poms @@ -0,0 +1 @@ +java-fast/pom.xml --has-package-version diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules new file mode 100644 index 0000000..a7175a8 --- /dev/null +++ b/debian/maven.ignoreRules @@ -0,0 +1,4 @@ +org.apache.maven.plugins maven-gpg-plugin * * * * +org.apache.maven.plugins maven-javadoc-plugin * * * * +org.apache.maven.plugins maven-release-plugin * * * * +org.apache.maven.plugins maven-source-plugin * * * * diff --git a/debian/maven.rules b/debian/maven.rules new file mode 100644 index 0000000..038c2cd --- /dev/null +++ b/debian/maven.rules @@ -0,0 +1 @@ +io.nayuki fastqrcodegen jar s/.*/debian/ * * diff --git a/debian/patches/0003-Add-java-fast-pom.xml.patch b/debian/patches/0003-Add-java-fast-pom.xml.patch new file mode 100644 index 0000000..534056c --- /dev/null +++ b/debian/patches/0003-Add-java-fast-pom.xml.patch @@ -0,0 +1,151 @@ +From: Jochen Sprickerhof +Date: Thu, 5 May 2022 16:33:09 +0200 +Subject: Add java-fast/pom.xml + +https://github.com/nayuki/QR-Code-generator/pull/143 +--- + java-fast/pom.xml | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 135 insertions(+) + create mode 100644 java-fast/pom.xml + +diff --git a/java-fast/pom.xml b/java-fast/pom.xml +new file mode 100644 +index 0000000..19bcd3a +--- /dev/null ++++ b/java-fast/pom.xml +@@ -0,0 +1,135 @@ ++ ++ ++ 4.0.0 ++ ++ io.nayuki ++ fastqrcodegen ++ 1.8.0 ++ jar ++ ++ UTF-8 ++ ++ ++ ++ ++ ++ ++ ++ org.apache.maven.plugins ++ maven-compiler-plugin ++ 3.8.1 ++ ++ ++ default-compile ++ ++ 9 ++ ++ ++ ++ java8-compile ++ ++ compile ++ ++ ++ 1.8 ++ 1.8 ++ ++ module-info.java ++ ++ ++ ++ ++ ++ ++ ++ org.apache.maven.plugins ++ maven-release-plugin ++ ++ ++ java-fast/pom.xml ++ ++ ++ ++ ++ ++ org.apache.maven.plugins ++ maven-source-plugin ++ 2.2.1 ++ ++ ++ attach-sources ++ ++ jar-no-fork ++ ++ ++ ++ ++ ++ ++ org.apache.maven.plugins ++ maven-javadoc-plugin ++ 3.1.1 ++ ++ ++ attach-javadocs ++ ++ jar ++ ++ ++ ++ ++ ++ ++ org.apache.maven.plugins ++ maven-gpg-plugin ++ 1.5 ++ ++ ++ sign-artifacts ++ verify ++ ++ sign ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Fast QR Code generator library ++ High quality fast QR Code generator library ++ https://www.nayuki.io/page/qr-code-generator-library ++ 2016 ++ ++ ++ The MIT License ++ https://opensource.org/licenses/MIT ++ repo ++ ++ ++ ++ ++ Project Nayuki ++ me@nayuki.io ++ https://www.nayuki.io/ ++ ++ ++ ++ ++ scm:git:git://github.com/nayuki/QR-Code-generator.git ++ scm:git:ssh://github.com:nayuki/QR-Code-generator.git ++ https://github.com/nayuki/QR-Code-generator/tree/master/java-fast ++ ++ ++ ++ ossrh ++ https://oss.sonatype.org/content/repositories/snapshots ++ ++ ++ ossrh ++ https://oss.sonatype.org/service/local/staging/deploy/maven2/ ++ ++ ++ diff --git a/debian/patches/series b/debian/patches/series index 494c965..c21b53b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-Make-C-shared-lib.patch 0002-Make-C-shared-lib.patch +0003-Add-java-fast-pom.xml.patch diff --git a/debian/rules b/debian/rules index 9bff7c0..a5652b8 100755 --- a/debian/rules +++ b/debian/rules @@ -28,12 +28,31 @@ clean: override_dh_auto_clean-indep: -dh_auto_clean --buildsystem=pybuild --sourcedirectory=python/ + # mh_(un)patchpoms does not obeye --sourcedirectory + mh_patchpoms -plibfastqrcodegen-java + dh_auto_clean --buildsystem=maven --sourcedirectory=java-fast/ -plibfastqrcodegen-java + mh_unpatchpoms -plibfastqrcodegen-java + rm -rf java-fast/src rm -rf python/qrcodegen.egg-info +execute_before_dh_auto_configure-indep: + # mddir, ln: workaround till upstream has a build system + mkdir -p java-fast/src/main/java/ + ln -s -t java-fast/src/main/java/ ../../../io/ + dh_auto_configure --buildsystem=maven -plibfastqrcodegen-java + override_dh_auto_build-indep: dh_auto_build --buildsystem=pybuild --sourcedirectory=python/ + dh_auto_build --buildsystem=maven --sourcedirectory=java-fast/ override_dh_auto_install-indep: + # mv, sed, rm: work around buildsystem=maven calling mh_resolve_dependencies in java-fast/ + mv java-fast/pom.xml.save java-fast/pom.xml.backup + dh_auto_install -plibfastqrcodegen-java --buildsystem=maven --sourcedirectory=java-fast/ + mv java-fast/pom.xml.backup java-fast/pom.xml.save + mh_unpatchpoms -plibfastqrcodegen-java + sed -i 's/maven\./maven:/' debian/libfastqrcodegen-java.substvars + rm -r java-fast/.debianVersion java-fast/debian/ dh_auto_install --buildsystem=pybuild --sourcedirectory=python/ override_dh_auto_clean-arch: -- 2.36.0