Allow conditional builds without Maven plugin

This commit is contained in:
Mikolaj Izdebski 2016-10-10 17:25:40 +02:00
parent 7ae6a709fd
commit 5df2a65c7c

View File

@ -1,6 +1,10 @@
%if 0%{?fedora}
%bcond_without maven_plugin
%endif
Name: aqute-bnd
Version: 3.3.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: BND Tool
License: ASL 2.0
URL: http://bnd.bndtools.org/
@ -23,6 +27,12 @@ Patch1: 0002-Disable-removed-commands.patch
BuildRequires: maven-local
BuildRequires: mvn(ant:ant)
BuildRequires: mvn(org.osgi:osgi.annotation)
BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple)
%if %{with maven_plugin}
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.maven:maven-artifact)
BuildRequires: mvn(org.apache.maven:maven-compat)
@ -32,13 +42,8 @@ BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires: mvn(org.eclipse.aether:aether-api)
BuildRequires: mvn(org.osgi:osgi.annotation)
BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple)
BuildRequires: mvn(org.sonatype.plexus:plexus-build-api)
%endif
%description
The bnd tool helps you create and diagnose OSGi bundles.
@ -59,11 +64,13 @@ Summary: BND library
%description -n aqute-bndlib
%{summary}.
%if %{with maven_plugin}
%package -n bnd-maven-plugin
Summary: BND Maven plugin
%description -n bnd-maven-plugin
%{summary}.
%endif
%package javadoc
Summary: Javadoc for %{name}
@ -85,6 +92,10 @@ rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand}.java
sed 's/@VERSION@/%{version}/' %SOURCE2 > pom.xml
sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd.info
%if %{without maven_plugin}
%pom_disable_module maven
%endif
# libg
pushd aQute.libg
cp -p %{SOURCE3} pom.xml
@ -169,12 +180,17 @@ echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium
%files -n aqute-bndlib -f .mfiles-bndlib
%license LICENSE
%if %{with maven_plugin}
%files -n bnd-maven-plugin -f .mfiles-maven
%endif
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
* Mon Oct 10 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.3.0-3
- Allow conditional builds without Maven plugin
* Thu Oct 06 2016 Michael Simacek <msimacek@redhat.com> - 3.3.0-2
- Fix ant.d classpath