Fix snapshot versioning in build/install scriplets

This commit is contained in:
Mikolaj Izdebski 2019-10-28 10:43:34 +01:00
parent cd269ac8a8
commit d5fb384102

View File

@ -217,23 +217,25 @@ cp -aL ${maven_home} target/dependency/apache-maven-$mver
%build %build
%mvn_build -s -j %mvn_build -s -j
version=4.0.0-SNAPSHOT
tar --delay-directory-restore -xvf target/*tar.bz2 tar --delay-directory-restore -xvf target/*tar.bz2
chmod -R +rwX %{name}-%{version}* chmod -R +rwX %{name}-${version}*
# These are installed as doc # 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 # 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 # Irrelevant Maven launcher scripts
rm -f %{name}-%{version}*/bin/* rm -f %{name}-${version}*/bin/*
%install %install
%mvn_install %mvn_install
version=4.0.0-SNAPSHOT
maven_home=$(realpath $(dirname $(realpath $(which mvn)))/..) maven_home=$(realpath $(dirname $(realpath $(which mvn)))/..)
install -d -m 755 %{buildroot}%{_datadir}/%{name} 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 for cmd in mvn mvnDebug; do
cat <<EOF >%{buildroot}%{_datadir}/%{name}/bin/$cmd cat <<EOF >%{buildroot}%{_datadir}/%{name}/bin/$cmd