From d8aea44ff42666b86c99c01eaecd5c9076ef8990 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 10 Apr 2021 17:39:38 +0200 Subject: [PATCH] New package layout for modular builds --- javapackages-bootstrap.spec | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/javapackages-bootstrap.spec b/javapackages-bootstrap.spec index 1fdab13..d7e0783 100644 --- a/javapackages-bootstrap.spec +++ b/javapackages-bootstrap.spec @@ -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