Allow conditionally building without the reflections library for tests

This commit is contained in:
Mat Booth 2019-03-07 18:27:35 +00:00
parent 65fff278a0
commit 53cd350fc6

View File

@ -1,6 +1,9 @@
# Allow conditionally building without the reflections library
%bcond_without reflections
Name: jna
Version: 4.5.1
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Pure Java access to native libraries
# Most of code is dual-licensed under either LGPL 2.1 only or Apache
# License 2.0. WeakIdentityHashMap.java was taken from Apache CXF,
@ -40,7 +43,9 @@ BuildRequires: ant-junit
BuildRequires: junit
BuildRequires: libX11-devel
BuildRequires: libXt-devel
%if %{with reflections}
BuildRequires: reflections
%endif
%description
JNA provides Java programs easy access to native shared libraries
@ -85,8 +90,15 @@ sed -i 's/\r//' LICENSE
chmod -c 0644 LICENSE OTHERS CHANGES.md
%if %{with reflections}
sed s,'<include name="junit.jar"/>,&<include name="reflections.jar"/>,' -i build.xml
build-jar-repository -s -p lib junit reflections ant
%else
build-jar-repository -s -p lib junit ant
rm test/com/sun/jna/StructureFieldOrderInspector.java
rm test/com/sun/jna/StructureFieldOrderInspectorTest.java
rm contrib/platform/test/com/sun/jna/platform/StructureFieldOrderTest.java
%endif
cp lib/native/aix-ppc64.jar lib/clover.jar
@ -129,6 +141,9 @@ install -m 755 build/native*/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
%changelog
* Thu Mar 07 2019 Mat Booth <mat.booth@redhat.com> - 4.5.1-6
- Allow conditionally building without the reflections library for tests
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild