From 089d5fcb156edd7f0feb85cd7dc281d9453ab589 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 22 Sep 2017 22:28:22 +0200 Subject: [PATCH] Conditionally build without jna --- bcel.spec | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/bcel.spec b/bcel.spec index fa4bcb5..13f6fb4 100644 --- a/bcel.spec +++ b/bcel.spec @@ -1,6 +1,8 @@ +%bcond_without jna + Name: bcel Version: 6.1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 0 Summary: Byte Code Engineering Library License: ASL 2.0 @@ -10,12 +12,14 @@ Source0: http://archive.apache.org/dist/commons/bcel/source/bcel-%{versio BuildArch: noarch BuildRequires: maven-local +BuildRequires: mvn(org.apache.commons:commons-parent:pom:) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +%if %{with jna} BuildRequires: mvn(junit:junit) BuildRequires: mvn(net.java.dev.jna:jna) BuildRequires: mvn(net.java.dev.jna:jna-platform) BuildRequires: mvn(org.apache.commons:commons-lang3) -BuildRequires: mvn(org.apache.commons:commons-parent:pom:) -BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +%endif %description The Byte Code Engineering Library (formerly known as JavaClass) is @@ -63,7 +67,11 @@ sed -i '\|lib/dt\.jar|s|javaHome|javaHome.substring(0, javaHome.length() - 4)|' src/test/java/org/apache/bcel/PerformanceTest.java %build +%if %{without jna} +%mvn_build -f +%else %mvn_build +%endif %install %mvn_install @@ -76,6 +84,9 @@ sed -i '\|lib/dt\.jar|s|javaHome|javaHome.substring(0, javaHome.length() - 4)|' %license LICENSE.txt NOTICE.txt %changelog +* Fri Sep 22 2017 Mikolaj Izdebski - 0:6.1-2 +- Conditionally build without jna + * Tue Sep 19 2017 Michael Simacek - 0:6.1-1 - Update to upstream version 6.1