From 1dad161ef4dc75fca2bca6f2a90ce20e16020d44 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 20 Jul 2020 13:44:16 +0200 Subject: [PATCH] Follow symlinks when copying Maven home in bootstrap mode --- xmvn.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xmvn.spec b/xmvn.spec index bda8b86..794f2c6 100644 --- a/xmvn.spec +++ b/xmvn.spec @@ -234,13 +234,13 @@ version=4.0.0-SNAPSHOT maven_home=$(realpath $(dirname $(realpath $(which mvn)))/..) install -d -m 755 %{buildroot}%{_datadir}/%{name} -cp -r %{name}-${version}*/* %{buildroot}%{_datadir}/%{name}/ +cp -r%{?mbi:L} %{name}-${version}*/* %{buildroot}%{_datadir}/%{name}/ for cmd in mvn mvnDebug; do cat <%{buildroot}%{_datadir}/%{name}/bin/$cmd #!/bin/sh -e export _FEDORA_MAVEN_HOME="%{_datadir}/%{name}" -exec ${maven_home}/bin/$cmd "\${@}" +exec %{_datadir}/maven/bin/$cmd "\${@}" EOF chmod 755 %{buildroot}%{_datadir}/%{name}/bin/$cmd done @@ -251,10 +251,10 @@ done %jpackage_script org.fedoraproject.xmvn.tools.subst.SubstCli "" "" xmvn/xmvn-subst:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander xmvn-subst # copy over maven lib directory -cp -r ${maven_home}/lib/* %{buildroot}%{_datadir}/%{name}/lib/ +cp -r%{?mbi:L} ${maven_home}/lib/* %{buildroot}%{_datadir}/%{name}/lib/ # possibly recreate symlinks that can be automated with xmvn-subst -%if !0%{?sclraw_phase} +%if !0%{?mbi} %{name}-subst -s -R %{buildroot} %{buildroot}%{_datadir}/%{name}/ %endif