File ehcache.spec of Package ehcache

#
# spec file for "ehcache"
#
# Copyright (c) 2026 mackdk
#
# 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 http://bugs.opensuse.org/
#

Name:           ehcache
Version:        3.11.1
Release:        0
Summary:        Ehcache
License:        Apache-2.0
Group:          Development/Libraries/Java
URL:            https://github.com/ehcache/ehcache3/
Source0:        %{name}-%{version}.tar.gz
Source1:        build.sh
Source2:        %{name}-%{version}.pom
Patch0:         0001-Fix-gradle-build.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  xz
BuildRequires:  java-devel
BuildRequires:  java-1_8_0-openjdk-devel
BuildRequires:  ehcache-kit == ad6354bda6403663a318ff4a41888b5f6096c05e
BuildRequires:  javapackages-local
BuildRequires:  maven-local
BuildArch:      noarch
Requires:       java

%description
Ehcache is an open source, standards-based cache that boosts performance,
offloads your database, and simplifies scalability. It's the most widely-used
Java-based cache because it's robust, proven, full-featured, and integrates
with other popular libraries and frameworks. Ehcache scales from in-process
caching, all the way to mixed in-process/out-of-process deployments with
terabyte-sized caches.



%prep
%setup -q -c -n src
%patch0 -p2
cp -f %{SOURCE1} .
cp -f %{SOURCE2} .
cp -Rf %{_libdir}/tetra ../kit

%build
cd ..
sh src/build.sh

%install
export NO_BRP_CHECK_BYTECODE_VERSION=true
mkdir -p %{buildroot}%{_javadir}/ehcache
cp -a ehcache3-3.11.1/ehcache/build/libs/%{name}-%{version}.jar %{buildroot}%{_javadir}/ehcache/
cp -a ehcache3-3.11.1/ehcache/build/libs/%{name}-%{version}-jakarta.jar %{buildroot}%{_javadir}/ehcache/

# Install maven metadata
mkdir -p %{buildroot}%{_mavenpomdir}/%{name}
%{mvn_install_pom} %{name}-%{version}.pom %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
%add_maven_depmap %{name}/%{name}.pom ehcache/%{name}-%{version}.jar
%add_maven_depmap %{name}/%{name}.pom ehcache/%{name}-%{version}-jakarta.jar

%files -f .mfiles
%defattr(-,root,root)
%{_javadir}/*

%changelog
openSUSE Build Service is sponsored by