geos/geos.spec
2020-11-12 09:19:52 +08:00

89 lines
2.5 KiB
RPMSpec

Name: geos
Version: 3.6.1
Release: 13
Summary: GEOS is a C++ port of the Java Topology Suite
License: LGPLv2
URL: http://trac.osgeo.org/geos/
Source0: http://download.osgeo.org/%{name}/%{name}-%{version}.tar.bz2
#To add stdlib.h
Patch0000: geos-gcc43.patch
BuildRequires: gcc gcc-c++ doxygen libtool
%description
GEOS (Geometry Engine - Open Source) is a C++ port of the JTS Topology Suite (JTS).
It aims to contain the complete functionality of JTS in C++. This includes all the
OpenGIS Simple Features for SQL spatial predicate functions and spatial operators,
as well as specific JTS enhanced functions. GEOS provides spatial functionality to
many other projects and products.
%package devel
Summary: Development files for GEOS
Requires: %{name} = %{version}-%{release}
%description devel
GEOS (Geometry Engine - Open Source) is a C++ port of the JTS Topology Suite (JTS).
It aims to contain the complete functionality of JTS in C++. This includes all the
OpenGIS Simple Features for SQL spatial predicate functions and spatial operators,
as well as specific JTS enhanced functions. GEOS provides spatial functionality to
many other projects and products.
This package contains the development files to build applications that
use GEOS.
%prep
%autosetup -p1
%build
sed -i -e 's|\/lib\/python|$libdir\/python|g' configure
sed -i -e 's|.get_python_lib(0|.get_python_lib(1|g' configure
sed -i -e 's|find \$i -name libpython|find \$i\/lib*\/ -name libpython|g' configure
sed -i -e 's|= isnan(|= std::isnan(|g' configure
sed -i -e 's|(isnan(|(std::isnan(|g' include/geos/platform.h.in
for makefile in `find . -type f -name 'Makefile.in'`; do
sed -i 's|@LIBTOOL@|%{_bindir}/libtool|g' $makefile
done
%configure --disable-static --disable-dependency-tracking --disable-python
touch swig/python/geos_wrap.cxx
%make_build
cd doc
make doxygen-html
%install
%make_install
%check
make check || exit 0
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc AUTHORS COPYING NEWS README TODO
%{_libdir}/libgeos-%{version}.so
%{_libdir}/libgeos_c.so.1*
%exclude %{_libdir}/*.a
%files devel
%doc doc/doxygen_docs
%{_bindir}/geos-config
%{_includedir}/*
%{_libdir}/libgeos.so
%{_libdir}/libgeos_c.so
%exclude %{_libdir}/*.la
%exclude %{_libdir}/*.a
%changelog
* Wed Nov 11 2020 leiju<leiju4@huawei.com> - 3.6.1-13
- Remove python2 subpackage
* Mon Mar 09 2020 yangjian<yangjian79@huawei.com> - 3.6.1-12
- Fix patch problem
* Wed Mar 04 2020 yangjian<yangjian79@huawei.com> - 3.6.1-11
- Package init