From d5fb3841028e8a6491a7da965d2af11497338e20 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 28 Oct 2019 10:43:34 +0100 Subject: [PATCH] Fix snapshot versioning in build/install scriplets --- xmvn.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xmvn.spec b/xmvn.spec index daede35..0655470 100644 --- a/xmvn.spec +++ b/xmvn.spec @@ -217,23 +217,25 @@ cp -aL ${maven_home} target/dependency/apache-maven-$mver %build %mvn_build -s -j +version=4.0.0-SNAPSHOT tar --delay-directory-restore -xvf target/*tar.bz2 -chmod -R +rwX %{name}-%{version}* +chmod -R +rwX %{name}-${version}* # These are installed as doc -rm -f %{name}-%{version}*/{AUTHORS-XMVN,README-XMVN.md,LICENSE,NOTICE,NOTICE-XMVN} +rm -f %{name}-${version}*/{AUTHORS-XMVN,README-XMVN.md,LICENSE,NOTICE,NOTICE-XMVN} # Not needed - we use JPackage launcher scripts -rm -Rf %{name}-%{version}*/lib/{installer,resolver,subst,bisect}/ +rm -Rf %{name}-${version}*/lib/{installer,resolver,subst,bisect}/ # Irrelevant Maven launcher scripts -rm -f %{name}-%{version}*/bin/* +rm -f %{name}-${version}*/bin/* %install %mvn_install +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 %{name}-${version}*/* %{buildroot}%{_datadir}/%{name}/ for cmd in mvn mvnDebug; do cat <%{buildroot}%{_datadir}/%{name}/bin/$cmd