Files
jboss-jdk-misc/jboss-jdk-misc.spec

75 lines
2.1 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package jboss-jdk-misc
#
# 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 namedreltag .Final
%global namedversion %{version}%{?namedreltag}
%global parent jboss
%global subname jdk-misc
Name: %{parent}-%{subname}
Version: 3
Release: 0
Summary: Stubbed versions of "sun.misc" JDK packages
License: Apache-2.0
URL: https://github.com/jboss/jdk-misc
Source0: https://github.com/jboss/%{subname}/archive/refs/tags/%{namedversion}.tar.gz
Source1: %{name}-build.xml
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local >= 6
BuildArch: noarch
%description
Stubbed versions of "sun.misc" JDK packages for certain library builds.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{subname}-%{namedversion}
cp %{SOURCE1} build.xml
%build
%{ant} package javadoc
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}
install -pm 0644 target/%{subname}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar
# javadoc
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%files javadoc
%{_javadocdir}/%{name}
%changelog