Sync from SUSE:SLFO:Main jna revision 320e7387f3272a6dcba8c9e75fb35802

This commit is contained in:
Adrian Schröter 2024-05-31 14:45:15 +02:00
parent dec4edc0a2
commit 60cdfaa852
5 changed files with 46 additions and 19 deletions

BIN
5.13.0.tar.gz (Stored with Git LFS)

Binary file not shown.

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/java-native-access/jna.git</param>
<param name="revision">5.13.0</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="exclude">**/*.jar</param>
<param name="exclude">dist</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

BIN
jna-5.13.0.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Mon Apr 29 12:36:21 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- The binaries are compatible with java 1.8
-------------------------------------------------------------------
Wed Feb 21 13:35:16 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Use %patch -P N instead of deprecated %patchN.
- Fetch sources using source service in order to avoid binary files
in the tarball
-------------------------------------------------------------------
Tue Jan 23 15:33:23 UTC 2024 - Fridrich Strba <fstrba@suse.com>

View File

@ -17,6 +17,9 @@
#
# The automatic requires would be java-headless >= 9, but the
# binaries are java 8 compatible
%define __requires_exclude java-headless
Name: jna
Version: 5.13.0
Release: 0
@ -24,7 +27,7 @@ Summary: Pure Java access to native libraries
License: Apache-2.0 OR LGPL-2.1-or-later
Group: Development/Libraries/Java
URL: https://github.com/twall/jna
Source0: https://github.com/twall/%{name}/archive/%{version}.tar.gz
Source0: %{name}-%{version}.tar.xz
Source1000: %{name}-rpmlintrc
Patch0: jna-build.patch
Patch1: jna-callback.patch
@ -35,13 +38,13 @@ BuildRequires: ant
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: java-devel >= 9
BuildRequires: javapackages-local
BuildRequires: javapackages-local >= 6
BuildRequires: libX11-devel
BuildRequires: libXt-devel
BuildRequires: libffi-devel
BuildRequires: objectweb-asm
BuildRequires: pkg-config
Requires: java >= 1.8
BuildRequires: pkgconfig
Requires: java-headless >= 1.8
Provides: jna-native = %{version}-%{release}
Obsoletes: jna-native < %{version}-%{release}
Provides: libjnidispatch = %{version}-%{release}
@ -59,6 +62,7 @@ of use take priority.
Summary: Contrib for %{name}
Group: Development/Libraries/Java
Requires: %{name} = %{version}-%{release}
Requires: java-headless >= 1.8
Provides: jna-platform = %{version}-%{release}
Obsoletes: jna-platform < %{version}-%{release}
BuildArch: noarch
@ -76,18 +80,14 @@ This package contains the javadocs for %{name}.
%prep
%setup -q
# Cleanup the dist tarball
find . -name '*jar' | xargs rm
rm -rf dist
dos2unix OTHERS
# Then apply patches
%patch0 -p1 -b .orig
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch -P 0 -p1 -b .orig
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%if 0%{?suse_version} < 1550
%patch4 -p1
%patch -P 4 -p1
%endif
sed -i 's|@LIBDIR@|%{_libdir}/%{name}|' src/com/sun/jna/Native.java
@ -124,9 +124,9 @@ install -p -m 644 ./contrib/platform/dist/jna-platform-jpms.jar %{buildroot}%{_j
ln -sf ../%{name}-platform.jar %{buildroot}%{_javadir}/%{name}/%{name}-platform.jar
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -p -m 644 build/pom-jna.xml %{buildroot}/%{_mavenpomdir}/%{name}.pom
install -p -m 644 build/pom-jna-platform.xml %{buildroot}/%{_mavenpomdir}/%{name}-platform.pom
%{mvn_install_pom} build/pom-jna.xml %{buildroot}/%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar -a net.java.dev.jna:jna-jpms
%{mvn_install_pom} build/pom-jna-platform.xml %{buildroot}/%{_mavenpomdir}/%{name}-platform.pom
%add_maven_depmap %{name}-platform.pom %{name}-platform.jar -a net.java.dev.jna:platform,net.java.dev.jna:jna-platform-jpms -f contrib
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}