Expand conditionals

This commit is contained in:
Mikolaj Izdebski 2018-11-29 12:42:46 +00:00
parent 1d29ee79f6
commit cb227bdb51

View File

@ -1,5 +1,3 @@
%bcond_without ant_tasks
%bcond_without maven_plugin
Name: aqute-bnd Name: aqute-bnd
Version: 3.5.0 Version: 3.5.0
@ -31,10 +29,7 @@ BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core) BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple) BuildRequires: mvn(org.slf4j:slf4j-simple)
%if %{with ant_tasks}
BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache.ant:ant)
%endif
%if %{with maven_plugin}
BuildRequires: mvn(junit:junit) BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.maven:maven-artifact) BuildRequires: mvn(org.apache.maven:maven-artifact)
BuildRequires: mvn(org.apache.maven:maven-compat) BuildRequires: mvn(org.apache.maven:maven-compat)
@ -45,7 +40,6 @@ BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires: mvn(org.eclipse.aether:aether-api) BuildRequires: mvn(org.eclipse.aether:aether-api)
BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) BuildRequires: mvn(org.sonatype.plexus:plexus-build-api)
%endif
# Explicit javapackages-tools requires since bnd script uses # Explicit javapackages-tools requires since bnd script uses
# /usr/share/java-utils/java-functions # /usr/share/java-utils/java-functions
Requires: javapackages-tools Requires: javapackages-tools
@ -69,13 +63,11 @@ Summary: BND library
%description -n aqute-bndlib %description -n aqute-bndlib
%{summary}. %{summary}.
%if %{with maven_plugin}
%package -n bnd-maven-plugin %package -n bnd-maven-plugin
Summary: BND Maven plugin Summary: BND Maven plugin
%description -n bnd-maven-plugin %description -n bnd-maven-plugin
%{summary}. %{summary}.
%endif
%package javadoc %package javadoc
Summary: Javadoc for %{name} Summary: Javadoc for %{name}
@ -97,13 +89,7 @@ rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand}.java
sed 's/@VERSION@/%{version}/' %SOURCE2 > pom.xml sed 's/@VERSION@/%{version}/' %SOURCE2 > pom.xml
sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd.info sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd.info
%if %{without ant_tasks}
rm -rf biz.aQute.bnd/src/aQute/bnd/ant
%endif
%if %{without maven_plugin}
%pom_disable_module maven
%endif
# libg # libg
pushd aQute.libg pushd aQute.libg
@ -140,9 +126,7 @@ cp -p %{SOURCE4} pom.xml
%pom_add_dep biz.aQute.bnd:biz.aQute.bndlib:%{version} %pom_add_dep biz.aQute.bnd:biz.aQute.bndlib:%{version}
%pom_add_dep biz.aQute.bnd:aQute.libg:%{version} %pom_add_dep biz.aQute.bnd:aQute.libg:%{version}
%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version} %pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version}
%if %{with ant_tasks}
%pom_add_dep org.apache.ant:ant %pom_add_dep org.apache.ant:ant
%endif
%pom_add_dep org.osgi:osgi.annotation %pom_add_dep org.osgi:osgi.annotation
%pom_add_dep org.osgi:osgi.core %pom_add_dep org.osgi:osgi.core
%pom_add_dep org.osgi:osgi.cmpn %pom_add_dep org.osgi:osgi.cmpn
@ -188,26 +172,20 @@ popd
%install %install
%mvn_install %mvn_install
%if %{with ant_tasks}
install -d -m 755 %{buildroot}%{_sysconfdir}/ant.d install -d -m 755 %{buildroot}%{_sysconfdir}/ant.d
echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium" >%{buildroot}%{_sysconfdir}/ant.d/%{name} echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium" >%{buildroot}%{_sysconfdir}/ant.d/%{name}
%endif
%jpackage_script aQute.bnd.main.bnd "" "" aqute-bnd:slf4j/slf4j-api:slf4j/slf4j-simple:osgi-annotation:osgi-core:osgi-compendium bnd 1 %jpackage_script aQute.bnd.main.bnd "" "" aqute-bnd:slf4j/slf4j-api:slf4j/slf4j-simple:osgi-annotation:osgi-core:osgi-compendium bnd 1
%files -f .mfiles %files -f .mfiles
%license LICENSE %license LICENSE
%{_bindir}/bnd %{_bindir}/bnd
%if %{with ant_tasks}
%config(noreplace) %{_sysconfdir}/ant.d/* %config(noreplace) %{_sysconfdir}/ant.d/*
%endif
%files -n aqute-bndlib -f .mfiles-bndlib %files -n aqute-bndlib -f .mfiles-bndlib
%license LICENSE %license LICENSE
%if %{with maven_plugin}
%files -n bnd-maven-plugin -f .mfiles-maven %files -n bnd-maven-plugin -f .mfiles-maven
%endif
%files javadoc -f .mfiles-javadoc %files javadoc -f .mfiles-javadoc
%license LICENSE %license LICENSE