Files
jakarta-interceptor-api/jakarta-interceptor-api.spec

81 lines
2.6 KiB
RPMSpec

#
# spec file for package jakarta-interceptor-api
#
# 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/
#
%global base_name interceptors
Name: jakarta-interceptor-api
Version: 2.2.0
Release: 0
Summary: Jakarta Interceptor
License: EPL-2.0
Group: Development/Libraries/Java
URL: https://jakarta.ee/specifications/interceptors/
Source0: https://github.com/jakartaee/%{base_name}/archive/refs/tags/%{version}-RELEASE.tar.gz
Source1: %{base_name}-build.xml
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: jakarta-annotations
BuildRequires: java-devel >= 9
BuildRequires: javapackages-local >= 6
Requires: java-headless >= 1.8
BuildArch: noarch
%description
Jakarta Interceptors defines a means of interposing on business method invocations and specific
events—such as lifecycle events and timeout events—that occur on instances of Jakarta EE
components and other managed classes.
%package javadoc
Summary: API documentation for %{name}
%description javadoc
This package provides %{summary}.
%prep
%setup -q -n %{base_name}-%{version}-RELEASE
cp %{SOURCE1} api/build.xml
%build
pushd api
mkdir -p lib
build-jar-repository -s lib jakarta-annotations/jakarta.annotation-api
ant package javadoc
popd
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 api/target/jakarta.interceptor-api-%{version}.jar %{buildroot}%{_javadir}/%{name}/jakarta.interceptor-api.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
%{mvn_install_pom} api/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/jakarta.interceptor-api.pom
%add_maven_depmap %{name}/jakarta.interceptor-api.pom %{name}/jakarta.interceptor-api.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr api/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license LICENSE.md NOTICE.md
%doc README.md
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE.md NOTICE.md
%changelog