New package layout for modular builds

This commit is contained in:
Mikolaj Izdebski 2021-04-10 17:39:38 +02:00
parent e03ae40d1c
commit d8aea44ff4

View File

@ -6,17 +6,10 @@
%global __requires_exclude_from \\.jar$
%global __provides_exclude_from \\.jar$
%if 0%{?_module_build}
%global mavenHomePath %{_datadir}/xmvn
%global metadataPath %{_datadir}/maven-metadata
%global artifactsPath %{_javadir}
%global launchersPath %{_bindir}
%else
%global mavenHomePath %{_datadir}/%{name}
%global metadataPath %{mavenHomePath}/maven-metadata
%global artifactsPath %{_javadir}
%global launchersPath %{mavenHomePath}/bin
%endif
%global launchersPath %{_libexecdir}/%{name}
Name: javapackages-bootstrap
Version: 1.4.0
@ -268,13 +261,6 @@ Requires: coreutils
Requires: java-11-openjdk-devel
Requires: procps-ng
%if 0%{?_module_build}
Provides: ant
Provides: ant-junit
Provides: java_cup
Provides: jflex
%endif
%description
In a nutshell, Java Packages Bootstrap (JPB) is a standalone build of all Java
software packages that are required for Java Packages Tools (JPT) to work.
@ -337,9 +323,10 @@ do
done
# Use toolchains.xml provided by javapackages-tools
%if 0%{?_module_build}
rm %{buildroot}%{_datadir}/xmvn/conf/toolchains.xml
%endif
ln -sf %{_datadir}/xmvn/conf/toolchains.xml %{buildroot}%{mavenHomePath}/conf/toolchains.xml
install -d -m 755 %{buildroot}%{_rpmmacrodir}
echo '%%jpb_env PATH=/usr/libexec/javapackages-bootstrap:$PATH' >%{buildroot}%{_rpmmacrodir}/macros.%{name}
%check
%{buildroot}%{launchersPath}/xmvn --version
@ -349,6 +336,7 @@ rm %{buildroot}%{_datadir}/xmvn/conf/toolchains.xml
%{metadataPath}/*
%{artifactsPath}/*
%{launchersPath}/*
%{_rpmmacrodir}
%license %{_licensedir}/%{name}
%doc README.md