File hibernate-models.spec of Package hibernate-models

#
# spec file for package hibernate-models
#
# Copyright (c) 2025 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/
#

%global mvn_pomdir /usr/share/maven-poms
%global mvn_metadir /usr/share/maven-metadata

Name:           hibernate-models
Version:        1.0.1
Release:        0
License:        Apache-2.0
Summary:        Hibernate abstraction model
URL:            http://hibernate.org
Group:          Development/Libraries/Java
Source0:        hibernate-models-1.0.1.tar.gz
Source1:        build.sh
Patch0:         0001-Sources-updated.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  hibernate-models-kit == f752a89865eec498ae91aa0e3dbed8f21ce4d134
BuildRequires:  python-base
BuildRequires:  java-devel >= 21
BuildRequires:  javapackages-local
BuildRequires:  xmvn-install
BuildRequires:  xmvn-resolve
BuildRequires:  xz
BuildRequires:  mvn(org.jboss.logging:jboss-logging) == 3.6.1.Final
#BuildRequires:  mvn(io.smallrye:jandex)
BuildRequires:  mvn(net.bytebuddy:byte-buddy)
BuildArch:      noarch
ExcludeArch:    aarch64 ppc64le s390x
Requires:       java

%description
Provides support for dealing with an application’s managed resources as a de-typed
abstraction model backed by one or more sources. Consumers can then access details
from that abstraction model in a unified way, regardless of the underlying source.

%package byte-buddy
Summary:        Hibernate Models - hibernate-models-byte-buddy

%description byte-buddy
A de-typed abstraction over reflection and annotations


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

%build
cd ..
sh src/build.sh

cd src
%{mvn_package} ":hibernate-models"
%{mvn_package} ":hibernate-models-bytebuddy" byte-buddy
#%{mvn_package} ":hibernate-models-jandex" models

# Not provide hibernate-models-jandex because of missing dependencies
for m in hibernate-models-bytebuddy hibernate-models; do
    cp hibernate-models-%{version}/$m/build/publications/publishedArtifacts/pom-default.xml $m.xml
    %{mvn_artifact} $m.xml hibernate-models-%{version}/$m/build/libs/$m-%{version}.jar
done


%install
%mvn_install

%files -f .mfiles
%license hibernate-models-%{version}/LICENSE

%files byte-buddy -f .mfiles-byte-buddy
%license hibernate-models-%{version}/LICENSE


%changelog
openSUSE Build Service is sponsored by