|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
Name: libkml
|
|
|
|
|
Version: 1.3.0
|
|
|
|
|
Release: 7%{?dist}
|
|
|
|
|
Release: 8%{?dist}
|
|
|
|
|
Summary: Reference implementation of OGC KML 2.2
|
|
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
@ -14,6 +14,8 @@ Patch2: 0003-Fix-python-tests.patch
|
|
|
|
|
Patch3: 0004-Correctly-build-and-run-java-test.patch
|
|
|
|
|
# Fix a fragile test failing on i686
|
|
|
|
|
Patch4: fragile_test.patch
|
|
|
|
|
# Don't bytecompile python sources as part of build process, leave it to rpmbuild
|
|
|
|
|
Patch5: libkml_dont-bytecompile.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: curl-devel
|
|
|
|
@ -25,6 +27,7 @@ BuildRequires: junit
|
|
|
|
|
BuildRequires: minizip-devel
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
%else
|
|
|
|
|
BuildRequires: python-devel
|
|
|
|
|
%endif
|
|
|
|
@ -43,12 +46,21 @@ Earth, as well as several utility libraries for working with other formats.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python2-%{name}
|
|
|
|
|
Summary: Python bindings for %{name}
|
|
|
|
|
Summary: Python 2 bindings for %{name}
|
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
%{?python_provide:%python_provide python2-%{name}}
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{name}
|
|
|
|
|
The python2-%{name} package contains Python bindings for %{name}.
|
|
|
|
|
The python2-%{name} package contains Python 2 bindings for %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-%{name}
|
|
|
|
|
Summary: Python 3 bindings for %{name}
|
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
%{?python_provide:%python_provide python3-%{name}}
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{name}
|
|
|
|
|
The python3-%{name} package contains Python 3 bindings for %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package java
|
|
|
|
@ -71,30 +83,57 @@ developing applications that use %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
%patch3 -p1
|
|
|
|
|
%patch4 -p1
|
|
|
|
|
%autosetup -p1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
mkdir build_py2
|
|
|
|
|
pushd build_py2
|
|
|
|
|
%ifarch armv7hl
|
|
|
|
|
%define awtlib -DJAVA_AWT_LIBRARY=`find /usr/lib/jvm/ -name libjawt.so | grep jre/lib/arm \`
|
|
|
|
|
%endif
|
|
|
|
|
%cmake -DWITH_SWIG=ON -DWITH_PYTHON=ON -DWITH_JAVA=ON \
|
|
|
|
|
-DJNI_INSTALL_DIR=%{_libdir}/%{name} \
|
|
|
|
|
-DCMAKE_INSTALL_DIR=%{_libdir}/cmake/%{name} \
|
|
|
|
|
-DINCLUDE_INSTALL_DIR=%{_includedir}/kml \
|
|
|
|
|
-DPYTHON_LIBRARY=%{_libdir}/libpython%{python2_version}.so \
|
|
|
|
|
-DPYTHON_INCLUDE_DIR=%{_includedir}/python%{python2_version}/ \
|
|
|
|
|
-DPYTHON_INSTALL_DIR=%{python2_sitearch} \
|
|
|
|
|
%{?awtlib} \
|
|
|
|
|
-DBUILD_TESTING=ON \
|
|
|
|
|
-DBUILD_EXAMPLES=ON \
|
|
|
|
|
..
|
|
|
|
|
%make_build
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
mkdir build_py3
|
|
|
|
|
pushd build_py3
|
|
|
|
|
%cmake -DWITH_SWIG=ON -DWITH_PYTHON=ON -DWITH_JAVA=OFF \
|
|
|
|
|
-DJNI_INSTALL_DIR=%{_libdir}/%{name} \
|
|
|
|
|
-DCMAKE_INSTALL_DIR=%{_libdir}/cmake/%{name} \
|
|
|
|
|
-DINCLUDE_INSTALL_DIR=%{_includedir}/kml \
|
|
|
|
|
-DPYTHON_LIBRARY=%{_libdir}/libpython%{python3_version}m.so \
|
|
|
|
|
-DPYTHON_INCLUDE_DIR=%{_includedir}/python%{python3_version}m/ \
|
|
|
|
|
-DPYTHON_INSTALL_DIR=%{python3_sitearch} \
|
|
|
|
|
-DBUILD_TESTING=ON \
|
|
|
|
|
-DBUILD_EXAMPLES=ON
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
-DBUILD_EXAMPLES=OFF \
|
|
|
|
|
..
|
|
|
|
|
%make_build
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install
|
|
|
|
|
%make_install -C build_py2
|
|
|
|
|
%make_install -C build_py3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd build_py2
|
|
|
|
|
ctest -V
|
|
|
|
|
popd
|
|
|
|
|
pushd build_py3
|
|
|
|
|
ctest -V
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
@ -111,6 +150,11 @@ ctest -V
|
|
|
|
|
%{python2_sitearch}/*.so
|
|
|
|
|
%{python2_sitearch}/*.py*
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{name}
|
|
|
|
|
%{python3_sitearch}/*.so
|
|
|
|
|
%{python3_sitearch}/*.py
|
|
|
|
|
%{python3_sitearch}/__pycache__/*.pyc
|
|
|
|
|
|
|
|
|
|
%files java
|
|
|
|
|
%{_javadir}/LibKML.jar
|
|
|
|
|
%{_libdir}/%{name}/
|
|
|
|
@ -123,6 +167,10 @@ ctest -V
|
|
|
|
|
%{_libdir}/cmake/%{name}/
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Aug 07 2017 Sandro Mani <manisandro@gmail.com> - 1.3.0-8
|
|
|
|
|
- Workaround armv7hl FTBFS
|
|
|
|
|
- Add python3 bindings
|
|
|
|
|
|
|
|
|
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|