Pierre Gruet pushed to branch master at Debian Java Maintainers / jmagick


Commits:
23c74c08 by Pierre Gruet at 2024-09-26T21:13:34+02:00
Putting the shared lib in the jni package and adding a symlink from the 
canonical jni directory

- - - - -
c99bb331 by Pierre Gruet at 2024-09-26T21:13:55+02:00
Using maven-repo-helper in d/rules

- - - - -
67c38c66 by Pierre Gruet at 2024-09-26T21:14:44+02:00
Filling in d/not-installed to skip the .la and the .jar files in /usr/lib/

- - - - -
e3e97307 by Pierre Gruet at 2024-09-26T21:15:10+02:00
Adding autopkgtest

- - - - -


8 changed files:

- + debian/libjmagick7-jni.install
- + debian/not-installed
- debian/rules
- + debian/source/include-binaries
- + debian/tests/Example.java
- + debian/tests/control
- + debian/tests/in.jpg
- + debian/tests/jmagickExample


Changes:

=====================================
debian/libjmagick7-jni.install
=====================================
@@ -0,0 +1,2 @@
+usr/lib/*/libJMagick-*.so
+usr/lib/*/libJMagick-*.so.*


=====================================
debian/not-installed
=====================================
@@ -0,0 +1,2 @@
+usr/lib/*/jmagick-*.jar
+usr/lib/*/libJMagick-*.la


=====================================
debian/rules
=====================================
@@ -1,10 +1,20 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+
 export JAVA_HOME=/usr/lib/jvm/default-java
 
 %:
-       dh $@
+       dh $@ --with maven_repo_helper
 
 override_dh_auto_test:
        # not fatal due to be sensible to border and exact version of 
imagemagick
-       dh_auto_test || true
\ No newline at end of file
+       dh_auto_test || true
+
+override_dh_link:
+       dh_link
+       # Creating a symlink from the JNI dir to the shared lib stored in the
+       # canonical library directory
+       mkdir -p debian/libjmagick7-jni/usr/lib/jni
+       cd debian/libjmagick7-jni/usr/lib/jni &&\
+           ln -s ../${DEB_HOST_MULTIARCH}/libJMagick-*.so libJMagick.so


=====================================
debian/source/include-binaries
=====================================
@@ -0,0 +1 @@
+debian/tests/in.jpg


=====================================
debian/tests/Example.java
=====================================
@@ -0,0 +1,25 @@
+// Copyright 2024 Pierre Gruet <[email protected]>
+
+import java.io.*;
+import magick.*;
+
+class Example {
+       public static void main(String args[]) throws MagickException, 
IOException {
+        // Loading input image
+               ImageInfo orig = new ImageInfo("in.jpg");
+               MagickImage imageNew = new MagickImage(orig);
+
+        // Defining the context: opacity, font, ...
+               DrawInfo context = new DrawInfo(orig);
+               context.setFill(PixelPacket.queryColorDatabase("blue"));
+               context.setPointsize(28);
+               context.setOpacity(95);
+               context.setText("Example");
+               context.setGeometry("+30+30");
+               imageNew.annotateImage(context);
+
+        // Saving image.
+               imageNew.setFileName("out.jpg");
+               imageNew.writeImage(orig); 
+       }
+}


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,2 @@
+Tests: jmagickExample
+Depends: libjmagick7-java, default-jdk


=====================================
debian/tests/in.jpg
=====================================
Binary files /dev/null and b/debian/tests/in.jpg differ


=====================================
debian/tests/jmagickExample
=====================================
@@ -0,0 +1,20 @@
+#!/bin/sh
+# autopkgtest check: build a simple program and launch it.
+# (C) 2024 Pierre Gruet.
+# Author: Pierre Gruet <[email protected]>
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+
+cp debian/tests/Example.java $WORKDIR
+cp debian/tests/in.jpg $WORKDIR
+cd $WORKDIR
+
+# Building and launching
+javac -cp /usr/share/java/jmagick.jar Example.java
+java -cp .:/usr/share/java/jmagick.jar Example
+
+# Was the output file created?
+[ -e out.jpg ]



View it on GitLab: 
https://salsa.debian.org/java-team/jmagick/-/compare/de6e82bdf874af55d4c5abd2221021f6902f7eab...e3e97307694df5ef4b8a81267f7491024e6d86df

-- 
View it on GitLab: 
https://salsa.debian.org/java-team/jmagick/-/compare/de6e82bdf874af55d4c5abd2221021f6902f7eab...e3e97307694df5ef4b8a81267f7491024e6d86df
You're receiving this email because of your account on salsa.debian.org.


_______________________________________________
pkg-java-commits mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to