[med-svn] [Git][med-team/pixelmed-codec][master] 7 commits: d/jpegparse Add new command line tool.

Mathieu Malaterre gitlab at salsa.debian.org
Tue Aug 18 10:33:36 BST 2020



Mathieu Malaterre pushed to branch master at Debian Med / pixelmed-codec


Commits:
f62f131a by Mathieu Malaterre at 2020-08-18T11:30:00+02:00
d/jpegparse Add new command line tool.

- - - - -
b22dfb2f by Mathieu Malaterre at 2020-08-18T11:30:19+02:00
d/patches: Add patch to handle help2man

- - - - -
988f22ba by Mathieu Malaterre at 2020-08-18T11:30:35+02:00
d/jpegparse.1.in: Add template for help2man

- - - - -
f2a8b931 by Mathieu Malaterre at 2020-08-18T11:30:35+02:00
d/rules: Build jpegparse man page

- - - - -
d120f155 by Mathieu Malaterre at 2020-08-18T11:30:35+02:00
d/control: Reflect location of new command line tool: jpegparse.

- - - - -
063f26c4 by Mathieu Malaterre at 2020-08-18T11:30:35+02:00
d/manpages: Install jpegparse manpage

- - - - -
35c55097 by Mathieu Malaterre at 2020-08-18T11:32:26+02:00
d/changelog: Upload -3 to sid

- - - - -


8 changed files:

- debian/changelog
- debian/control
- + debian/jpegparse
- + debian/jpegparse.1.in
- + debian/libpixelmed-codec-java.manpages
- + debian/patches/add_usage.patch
- debian/patches/series
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,19 @@
+pixelmed-codec (20200328-3) unstable; urgency=medium
+
+  [ Chris Lamb ]
+  * d/patches: please make the build reproducible. Closes: #968185
+
+  [ Mathieu Malaterre ]
+  * Team upload.
+  * d/jpegparse Add new command line tool.
+  * d/patches: Add patch to handle help2man
+  * d/jpegparse.1.in: Add template for help2man
+  * d/rules: Build jpegparse man page
+  * d/control: Reflect location of new command line tool: jpegparse.
+  * d/manpages: Install jpegparse manpage
+
+ -- Mathieu Malaterre <malat at debian.org>  Tue, 18 Aug 2020 11:32:08 +0200
+
 pixelmed-codec (20200328-2) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -24,7 +24,8 @@ Description: JPEG selective block redaction codec for pixelmed
  DICOM objects, support for display of directories, images, reports and
  spectra, and DICOM object validation.
  .
- This package contains the JPEG selective block redaction codec.
+ This package contains the JPEG selective block redaction codec as well
+ as the jpegparse command line tool.
 
 Package: libpixelmed-imageio-java
 Architecture: all


=====================================
debian/jpegparse
=====================================
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+java -cp /usr/share/java/pixelmed_codec.jar com.pixelmed.codec.jpeg.Parse "$@"


=====================================
debian/jpegparse.1.in
=====================================
@@ -0,0 +1,30 @@
+[SYNOPSIS]
+If only an input file is supplied, will dump rather than copy.
+
+If a decompressed output file is supplied, will write in big endian if
+precision greater than 8, and will appended component number before file
+extension iff more than one component.
+
+two or three parameters, the input file, the copied compressed output file, and
+the decompressed output file
+
+[DESCRIPTION]
+A command line tool to parse a JPEG bitstream
+
+Includes the ability to selectively redact blocks and leave other blocks alone,
+to permit "lossless" redaction.
+
+Includes the ability to decompress lossless JPEG.
+
+Development of this class was supported by funding from MDDX Research and
+Informatics.
+
+[COMMENT]
+This manual page was written by Mathieu Malaterre <malat at debian.org> for the
+Debian GNU/Linux system, but may be used by others.
+
+[AUTHOR]
+David A. Clunie (dclunie)
+
+[COPYRIGHT]
+Copyright (c) 2014-2015, David A. Clunie DBA Pixelmed Publishing. All rights reserved.


=====================================
debian/libpixelmed-codec-java.manpages
=====================================
@@ -0,0 +1 @@
+debian/jpegparse.1


=====================================
debian/patches/add_usage.patch
=====================================
@@ -0,0 +1,18 @@
+Description: Handle --help to support help2man
+Author: Mathieu Malaterre <malat at debian.org>
+Last-Update: 2020-08-18
+
+--- pixelmed-codec-20200328.orig/com/pixelmed/codec/jpeg/Parse.java
++++ pixelmed-codec-20200328/com/pixelmed/codec/jpeg/Parse.java
+@@ -507,6 +507,11 @@ public class Parse {
+ 	 */
+ 	public static void main(String arg[]) {
+ 		try {
++    if (arg.length < 1 || arg[0].equals("--help")) {
++      System.err.println("Error: Incorrect number of arguments");
++      System.err.println("Usage: jpegparse input.jpg");
++      System.exit(1);
++    }
+ 			InputStream in = new FileInputStream(arg[0]);
+ 			OutputStream copiedCompressedOutput = arg.length > 1 && arg[1].length() > 0 ? new FileOutputStream(arg[1]) : null;
+ 			DecompressedOutput decompressedOutput = arg.length > 2 && arg[2].length() > 0 ? new DecompressedOutput(new File(arg[2]),ByteOrder.BIG_ENDIAN) : null;


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
 set_java_home.patch
 # debian_jars.patch
 reproducible_build.patch
+add_usage.patch


=====================================
debian/rules
=====================================
@@ -8,3 +8,13 @@ export JAVA_HOME=/usr/lib/jvm/default-java
 
 override_dh_clean:
 	dh_clean BUILDDATE
+
+override_dh_install: debian/jpegparse.1
+	dh_install debian/jpegparse $(DESTDIR)/usr/bin/
+
+VER_FULL = $(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-)
+
+debian/jpegparse.1: debian/jpegparse.1.in
+	help2man --include=$< --output=$@ \
+		--name="JPEG parse program" --no-discard-stderr \
+		--no-info debian/`basename $@ .1` --version-string=$(VER_FULL)



View it on GitLab: https://salsa.debian.org/med-team/pixelmed-codec/-/compare/f55ac0c4c4694b8e320ce6cc5604659ca4dfb145...35c55097a697e1aeeab1486967d4f8109e4bb4fb

-- 
View it on GitLab: https://salsa.debian.org/med-team/pixelmed-codec/-/compare/f55ac0c4c4694b8e320ce6cc5604659ca4dfb145...35c55097a697e1aeeab1486967d4f8109e4bb4fb
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200818/214ecf2a/attachment-0001.html>


More information about the debian-med-commit mailing list