Avoid %add_maven_depmap

This commit is contained in:
Michael Simacek 2017-03-22 14:20:58 +01:00
parent 28f0ca738b
commit 67aa7b54a8

View File

@ -1,15 +1,14 @@
%bcond_without avalon
%global base_name logging
%global short_name commons-%{base_name}
%global short_name commons-logging
Name: apache-%{short_name}
Version: 1.2
Release: 9%{?dist}
Release: 10%{?dist}
Summary: Apache Commons Logging
License: ASL 2.0
URL: http://commons.apache.org/%{base_name}
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
URL: http://commons.apache.org/logging
Source0: http://www.apache.org/dist/commons/logging/source/%{short_name}-%{version}-src.tar.gz
Source2: http://mirrors.ibiblio.org/pub/mirrors/maven2/%{short_name}/%{short_name}-api/1.1/%{short_name}-api-1.1.pom
Patch0: 0001-Generate-different-Bundle-SymbolicName-for-different.patch
@ -87,37 +86,28 @@ rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12
%build
%mvn_build
# The build produces more artifacts from one pom
%mvn_artifact %{SOURCE2} target/%{short_name}-%{version}-api.jar
%mvn_artifact commons-logging:commons-logging-adapters:%{version} target/%{short_name}-%{version}-adapters.jar
# -----------------------------------------------------------------------------
%install
%mvn_install
install -p -m 644 target/%{short_name}-%{version}-api.jar %{buildroot}/%{_javadir}/%{name}-api.jar
install -p -m 644 target/%{short_name}-%{version}-adapters.jar %{buildroot}/%{_javadir}/%{name}-adapters.jar
pushd %{buildroot}/%{_javadir}
for jar in %{name}-*; do
ln -sf ${jar} `echo ${jar}| sed "s|apache-||g"`
done
popd
install -pm 644 %{SOURCE2} %{buildroot}/%{_mavenpomdir}/JPP-%{short_name}-api.pom
%add_maven_depmap JPP-%{short_name}-api.pom %{short_name}-api.jar -a "org.apache.commons:commons-logging-api"
%files -f .mfiles
%doc LICENSE.txt NOTICE.txt
%license LICENSE.txt NOTICE.txt
%doc PROPOSAL.html RELEASE-NOTES.txt
%{_javadir}/*%{short_name}-api.jar
%{_javadir}/*%{short_name}-adapters.jar
%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt NOTICE.txt
%license LICENSE.txt NOTICE.txt
# -----------------------------------------------------------------------------
%changelog
* Wed Mar 22 2017 Michael Simacek <msimacek@redhat.com> - 1.2-10
- Avoid %%add_maven_depmap
* Mon Feb 13 2017 Michael Simacek <msimacek@redhat.com> - 1.2-9
- Fix conditional