Install versioned commands and manpages
This commit is contained in:
parent
180d45516a
commit
5c6c03b4f2
21
maven.spec
21
maven.spec
@ -77,6 +77,10 @@ Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release}
|
|||||||
Requires(post): (alternatives if fedora-release >= 30 else chkconfig)
|
Requires(post): (alternatives if fedora-release >= 30 else chkconfig)
|
||||||
Requires(postun): (alternatives if fedora-release >= 30 else chkconfig)
|
Requires(postun): (alternatives if fedora-release >= 30 else chkconfig)
|
||||||
|
|
||||||
|
# Require full javapackages-tools since maven-script uses
|
||||||
|
# /usr/share/java-utils/java-functions
|
||||||
|
Requires: javapackages-tools
|
||||||
|
|
||||||
# Theoretically Maven might be usable with just JRE, but typical Maven
|
# Theoretically Maven might be usable with just JRE, but typical Maven
|
||||||
# workflow requires full JDK, so we recommend it here.
|
# workflow requires full JDK, so we recommend it here.
|
||||||
Recommends: java-devel
|
Recommends: java-devel
|
||||||
@ -97,9 +101,6 @@ Summary: Core part of Maven
|
|||||||
# installed first to avoid triggering rhbz#1014355.
|
# installed first to avoid triggering rhbz#1014355.
|
||||||
OrderWithRequires: xmvn-minimal
|
OrderWithRequires: xmvn-minimal
|
||||||
|
|
||||||
# Require full javapackages-tools since maven-script uses
|
|
||||||
# /usr/share/java-utils/java-functions
|
|
||||||
Requires: javapackages-tools
|
|
||||||
# Maven upstream uses patched version of SLF4J. They unpack
|
# Maven upstream uses patched version of SLF4J. They unpack
|
||||||
# slf4j-simple-sources.jar, apply non-upstreamable, Maven-specific
|
# slf4j-simple-sources.jar, apply non-upstreamable, Maven-specific
|
||||||
# patch (using a script written in Groovy), compile and package as
|
# patch (using a script written in Groovy), compile and package as
|
||||||
@ -187,6 +188,14 @@ install -d -m 755 %{buildroot}%{_mandir}/man1/
|
|||||||
touch %{buildroot}%{_bindir}/{mvn,mvnDebug}
|
touch %{buildroot}%{_bindir}/{mvn,mvnDebug}
|
||||||
touch %{buildroot}%{_mandir}/man1/{mvn,mvnDebug}.1
|
touch %{buildroot}%{_mandir}/man1/{mvn,mvnDebug}.1
|
||||||
|
|
||||||
|
# Versioned commands and manpages
|
||||||
|
%if 0%{?maven_version_suffix:1}
|
||||||
|
ln -s %{homedir}/bin/mvn %{buildroot}%{_bindir}/mvn%{maven_version_suffix}
|
||||||
|
ln -s %{homedir}/bin/mvnDebug %{buildroot}%{_bindir}/mvnDebug%{maven_version_suffix}
|
||||||
|
ln -s %{homedir}/bin/mvn.1.gz %{buildroot}%{_mandir}/man1/mvn%{maven_version_suffix}.1.gz
|
||||||
|
ln -s %{homedir}/bin/mvnDebug.1.gz %{buildroot}%{_mandir}/man1/mvnDebug%{maven_version_suffix}.1.gz
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%post -n %{?module_prefix}%{name}
|
%post -n %{?module_prefix}%{name}
|
||||||
update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alternatives_priority}0 \
|
update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alternatives_priority}0 \
|
||||||
@ -214,6 +223,12 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt
|
|||||||
%{_datadir}/bash-completion
|
%{_datadir}/bash-completion
|
||||||
%ghost %{_mandir}/man1/mvn.1.gz
|
%ghost %{_mandir}/man1/mvn.1.gz
|
||||||
%ghost %{_mandir}/man1/mvnDebug.1.gz
|
%ghost %{_mandir}/man1/mvnDebug.1.gz
|
||||||
|
%if 0%{?maven_version_suffix:1}
|
||||||
|
%{_bindir}/mvn%{maven_version_suffix}
|
||||||
|
%{_bindir}/mvnDebug%{maven_version_suffix}
|
||||||
|
%{_mandir}/man1/mvn%{maven_version_suffix}.1.gz
|
||||||
|
%{_mandir}/man1/mvnDebug%{maven_version_suffix}.1.gz
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user