2019-03-22 10:48:32 +01:00
|
|
|
#
|
|
|
|
# spec file for package xmvn
|
|
|
|
#
|
2024-01-30 10:26:34 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2019-03-22 10:48:32 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: xmvn
|
2023-05-01 19:43:17 +02:00
|
|
|
Version: 4.2.0
|
2019-03-22 10:48:32 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Local Extensions for Apache Maven
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Tools/Building
|
|
|
|
URL: https://fedora-java.github.io/xmvn/
|
|
|
|
BuildRequires: %{name}-api = %{version}
|
2022-05-09 19:01:34 +02:00
|
|
|
BuildRequires: %{name}-connector = %{version}
|
2019-03-22 10:48:32 +01:00
|
|
|
BuildRequires: %{name}-core = %{version}
|
2019-03-23 08:57:37 +01:00
|
|
|
BuildRequires: %{name}-subst
|
|
|
|
BuildRequires: javapackages-tools
|
|
|
|
BuildRequires: maven
|
|
|
|
BuildRequires: maven-lib
|
2019-03-22 10:48:32 +01:00
|
|
|
Requires: %{name}-minimal = %{version}-%{release}
|
|
|
|
|
|
|
|
%description
|
|
|
|
This package provides extensions for Apache Maven that can be used to
|
|
|
|
manage system artifact repository and use it to resolve Maven
|
|
|
|
artifacts in offline mode, as well as Maven plugins to help with
|
|
|
|
creating RPM packages containing Maven artifacts.
|
|
|
|
|
|
|
|
%package minimal
|
|
|
|
Summary: Dependency-reduced version of XMvn
|
|
|
|
Group: Development/Tools/Building
|
|
|
|
Requires: %{name}-api = %{version}
|
2022-05-09 19:01:34 +02:00
|
|
|
Requires: %{name}-connector = %{version}
|
2019-03-22 10:48:32 +01:00
|
|
|
Requires: %{name}-core = %{version}
|
2021-05-13 12:08:03 +02:00
|
|
|
%requires_eq maven-lib
|
2019-03-22 10:48:32 +01:00
|
|
|
|
|
|
|
%description minimal
|
|
|
|
This package provides minimal version of XMvn, incapable of using
|
|
|
|
remote repositories.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
2021-10-22 11:16:47 +02:00
|
|
|
# Please, keep in sync with maven package, since the use
|
|
|
|
# of libalternatives in some distro versions makes it
|
|
|
|
# more tedious to detect automatically
|
|
|
|
maven_home=%{_datadir}/maven
|
2019-03-22 10:48:32 +01:00
|
|
|
|
|
|
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
2019-03-23 08:54:22 +01:00
|
|
|
cp -aL ${maven_home}/* %{buildroot}%{_datadir}/%{name}/
|
2019-03-22 10:48:32 +01:00
|
|
|
|
2022-05-09 19:01:34 +02:00
|
|
|
for i in api core connector; do
|
2019-03-23 08:54:22 +01:00
|
|
|
ln -s $(build-classpath %{name}/%{name}-${i}) %{buildroot}%{_datadir}/%{name}/lib/ext/
|
|
|
|
done
|
2019-03-22 10:48:32 +01:00
|
|
|
|
|
|
|
# Irrelevant Maven launcher scripts
|
|
|
|
rm -f %{buildroot}%{_datadir}/%{name}/bin/*
|
|
|
|
|
|
|
|
for cmd in mvn mvnDebug; do
|
|
|
|
cat <<EOF >%{buildroot}%{_datadir}/%{name}/bin/$cmd
|
|
|
|
#!/bin/sh -e
|
|
|
|
export _FEDORA_MAVEN_HOME="%{_datadir}/%{name}"
|
|
|
|
exec ${maven_home}/bin/$cmd "\${@}"
|
|
|
|
EOF
|
|
|
|
chmod 755 %{buildroot}%{_datadir}/%{name}/bin/$cmd
|
|
|
|
done
|
|
|
|
|
|
|
|
# possibly recreate symlinks that can be automated with xmvn-subst
|
|
|
|
%{name}-subst -s -R %{buildroot} %{buildroot}%{_datadir}/%{name}/
|
|
|
|
|
|
|
|
# /usr/bin/xmvn
|
|
|
|
install -dm 0755 %{buildroot}%{_bindir}
|
|
|
|
ln -sf %{_datadir}/%{name}/bin/mvn %{buildroot}%{_bindir}/%{name}
|
|
|
|
|
|
|
|
# mvn-local symlink
|
|
|
|
ln -s %{name} %{buildroot}%{_bindir}/mvn-local
|
|
|
|
|
|
|
|
# make sure our conf is identical to maven so yum won't freak out
|
|
|
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}/conf/
|
|
|
|
cp -P ${maven_home}/conf/settings.xml %{buildroot}%{_datadir}/%{name}/conf/
|
|
|
|
cp -P ${maven_home}/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
|
|
|
|
|
2020-05-11 10:03:12 +02:00
|
|
|
%pre minimal
|
2019-03-23 09:08:25 +01:00
|
|
|
if [ -L %{_datadir}/%{name}/conf/logging ]; then
|
|
|
|
rm -f %{_datadir}/%{name}/conf/logging
|
|
|
|
fi
|
|
|
|
|
2019-03-22 10:48:32 +01:00
|
|
|
%files
|
|
|
|
%{_bindir}/mvn-local
|
|
|
|
|
|
|
|
%files minimal
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
%dir %{_datadir}/%{name}/bin
|
|
|
|
%dir %{_datadir}/%{name}/lib
|
|
|
|
%{_datadir}/%{name}/lib/*.jar
|
|
|
|
%{_datadir}/%{name}/lib/ext
|
|
|
|
%{_datadir}/%{name}/lib/jansi-native
|
|
|
|
%{_datadir}/%{name}/bin/m2.conf
|
|
|
|
%{_datadir}/%{name}/bin/mvn
|
|
|
|
%{_datadir}/%{name}/bin/mvnDebug
|
|
|
|
%{_datadir}/%{name}/boot
|
|
|
|
%{_datadir}/%{name}/conf
|
|
|
|
|
|
|
|
%changelog
|