# # spec file for package jmagick # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{!?make_build:%global make_build make %{?_smp_mflags}} %global git_hash 586c8bb Name: jmagick Version: 7.0.4 Release: 0 Summary: An open source Java interface of ImageMagick License: LGPL-2.1-only Group: Development/Libraries/Java URL: https://github.com/techblue/%{name} Source0: %{url}/tarball/%{git_hash}#/%{name}-%{version}.tar.gz Patch0: no-javah.patch Patch1: jmagick-ver6.patch Patch2: jmagick-reproducible-jar-mtime.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: fdupes BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: xmvn-install BuildRequires: pkgconfig(ImageMagick) %description JMagick is an open source Java interface of ImageMagick. It is implemented in the form of a thin Java Native Interface (JNI) layer into the ImageMagick API. %package javadoc Summary: API documentation for %{name} Group: Documentation/HTML BuildArch: noarch %description javadoc API documentation for %{name}. %prep %setup -q -n techblue-%{name}-%{git_hash} %patch -P 0 -p1 %if %{?pkg_vcmp:%pkg_vcmp ImageMagick-devel < 7}%{!?pkg_vcmp:1} %patch -P 1 -p1 %endif %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0} %patch -P 2 -p1 %endif sed -i \ -e 's#System.loadLibrary("JMagick")#System.load("%{_libdir}/%{name}/"+System.mapLibraryName("JMagick"))#' \ src/magick/Magick{,Loader}.java test/magicktest/Loop.java %{mvn_file} : %{name} %build autoreconf -i -f || : automake -a || : %configure --with-javadoc-dir=javadoc %make_build -j1 all javadoc %install install -dm0755 %{buildroot}%{_libdir}/%{name} install -pm0755 lib/libJMagick*.so %{buildroot}%{_libdir}/%{name} %{mvn_artifact} %{name}:%{name}:%{version} lib/%{name}-%{version}.jar %mvn_install -J javadoc %fdupes %{buildroot}%{_javadocdir}/%{name} %files -f .mfiles %license LICENSE %doc README CREDITS Changelog.txt %{_libdir}/%{name} %files javadoc -f .mfiles-javadoc %license LICENSE %changelog