Expand conditionals
This commit is contained in:
parent
7a38eb6d86
commit
662adb73b8
@ -1,5 +1,3 @@
|
|||||||
%bcond_without junit5
|
|
||||||
%bcond_without osgi
|
|
||||||
|
|
||||||
Name: objectweb-asm
|
Name: objectweb-asm
|
||||||
Version: 6.2
|
Version: 6.2
|
||||||
@ -29,20 +27,11 @@ BuildRequires: maven-local
|
|||||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||||
BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin)
|
BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin)
|
||||||
BuildRequires: mvn(org.ow2:ow2:pom:)
|
BuildRequires: mvn(org.ow2:ow2:pom:)
|
||||||
%if %{with junit5}
|
|
||||||
BuildRequires: mvn(org.codehaus.janino:janino)
|
|
||||||
BuildRequires: mvn(org.junit.jupiter:junit-jupiter-api)
|
|
||||||
BuildRequires: mvn(org.junit.jupiter:junit-jupiter-engine)
|
|
||||||
BuildRequires: mvn(org.junit.jupiter:junit-jupiter-params)
|
|
||||||
BuildRequires: mvn(org.junit.platform:junit-platform-surefire-provider)
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with osgi}
|
|
||||||
# asm-all needs to be in pluginpath for BND. If this self-dependency
|
# asm-all needs to be in pluginpath for BND. If this self-dependency
|
||||||
# becomes a problem then ASM core will have to be build from source
|
# becomes a problem then ASM core will have to be build from source
|
||||||
# with javac before main maven build, just like bnd-module-plugin
|
# with javac before main maven build, just like bnd-module-plugin
|
||||||
BuildRequires: objectweb-asm >= 6
|
BuildRequires: objectweb-asm >= 6
|
||||||
%endif
|
|
||||||
|
|
||||||
# Explicit javapackages-tools requires since asm-processor script uses
|
# Explicit javapackages-tools requires since asm-processor script uses
|
||||||
# /usr/share/java-utils/java-functions
|
# /usr/share/java-utils/java-functions
|
||||||
@ -67,26 +56,12 @@ This package provides %{summary}.
|
|||||||
# A custom parent pom to aggregate the build
|
# A custom parent pom to aggregate the build
|
||||||
cp -p %{SOURCE1} pom.xml
|
cp -p %{SOURCE1} pom.xml
|
||||||
|
|
||||||
%if %{without junit5}
|
|
||||||
%pom_disable_module asm-test
|
%pom_disable_module asm-test
|
||||||
%endif
|
|
||||||
|
|
||||||
# Insert poms into modules
|
# Insert poms into modules
|
||||||
for pom in asm asm-analysis asm-commons asm-test asm-tree asm-util asm-xml; do
|
for pom in asm asm-analysis asm-commons asm-test asm-tree asm-util asm-xml; do
|
||||||
cp -p $RPM_SOURCE_DIR/${pom}-%{version}.pom $pom/pom.xml
|
cp -p $RPM_SOURCE_DIR/${pom}-%{version}.pom $pom/pom.xml
|
||||||
# Fix junit5 configuration
|
# Fix junit5 configuration
|
||||||
%if %{with junit5}
|
|
||||||
%pom_add_dep org.junit.jupiter:junit-jupiter-engine:5.1.0:test $pom
|
|
||||||
%pom_add_plugin org.apache.maven.plugins:maven-surefire-plugin:2.21.0 $pom \
|
|
||||||
" <dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.junit.platform</groupId>
|
|
||||||
<artifactId>junit-platform-surefire-provider</artifactId>
|
|
||||||
<version>1.2.0-RC1</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>"
|
|
||||||
%endif
|
|
||||||
%if %{with osgi}
|
|
||||||
if [ "$pom" != "asm-test" ] ; then
|
if [ "$pom" != "asm-test" ] ; then
|
||||||
# Make into OSGi bundles
|
# Make into OSGi bundles
|
||||||
bsn="org.objectweb.${pom//-/.}"
|
bsn="org.objectweb.${pom//-/.}"
|
||||||
@ -103,7 +78,6 @@ for pom in asm asm-analysis asm-commons asm-test asm-tree asm-util asm-xml; do
|
|||||||
</instructions>
|
</instructions>
|
||||||
</configuration>"
|
</configuration>"
|
||||||
fi
|
fi
|
||||||
%endif
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Insert asm-all pom
|
# Insert asm-all pom
|
||||||
@ -128,11 +102,7 @@ javac -sourcepath ../../asm/src/main/java/ -cp $(build-classpath aqute-bnd) $(fi
|
|||||||
jar cf bnd-module-plugin.jar -C src/main/java org
|
jar cf bnd-module-plugin.jar -C src/main/java org
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if %{with junit5}
|
|
||||||
%mvn_build -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
|
|
||||||
%else
|
|
||||||
%mvn_build -f -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
|
%mvn_build -f -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%mvn_install
|
%mvn_install
|
||||||
|
Loading…
Reference in New Issue
Block a user