]> git.pld-linux.org Git - packages/geos.git/blobdiff - geos.spec
- rel. 2
[packages/geos.git] / geos.spec
index 74ee19ae4faf220713b81225d29e0e49bafe880b..be5d3d3e6b0c52e4742d74ef747c9dd10b72e875 100644 (file)
--- a/geos.spec
+++ b/geos.spec
@@ -1,16 +1,22 @@
 Summary:       Geometry Engine - Open Source
-Summary(pl):   GEOS - silnik geometryczny z otwartymi ¼ród³ami
+Summary(pl.UTF-8):     GEOS - silnik geometryczny z otwartymi źródłami
 Name:          geos
-Version:       2.1.2
-Release:       1
+Version:       2.2.3
+Release:       2
 License:       LGPL
 Group:         Libraries
 Source0:       http://geos.refractions.net/%{name}-%{version}.tar.bz2
-# Source0-md5: 076f1bfb17e13d4075b0345f5ca525ca
-Patch0:                %{name}-config.patch
+# Source0-md5: 440be2b11fd3d711e950a47ea6f1b424
+Patch0:                %{name}-swig.patch
 URL:           http://geos.refractions.net/
 BuildRequires: automake
 BuildRequires: libstdc++-devel
+BuildRequires: python >= 1:2.5
+BuildRequires: python-devel >= 1:2.5
+BuildRequires: rpm-pythonprov
+BuildRequires: ruby-devel
+BuildRequires: swig-python >= 1.3.29
+BuildRequires: swig-ruby >= 1.3.29
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -20,17 +26,17 @@ 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 topology functions such as IsValid().
 
-%description -l pl
+%description -l pl.UTF-8
 GEOS (Geometry Engine - Open Source, czyli silnik geometryczny z
-otwartymi ¼ród³ami) to port C++ biblioteki Java Topology Suite (JTS).
-Celem biblioteki jako takiej jest implementacja pe³nej funkcjonalno¶ci
-JTS w C++. Obejmuje to wszystkie funkcje predykatów przestrzennych
+otwartymi źródłami) to port C++ biblioteki Java Topology Suite (JTS).
+Celem biblioteki jako takiej jest implementacja pełnej funkcjonalności
+JTS w C++. Obejmuje to wszystkie funkcje predykatów przestrzennych
 wg "Simple Features for SQL" OpenGIS oraz operatory przestrzenne, a
-tak¿e specyficzne dla JTS funkcje topologiczne takie jak IsValid().
+także specyficzne dla JTS funkcje topologiczne takie jak IsValid().
 
 %package devel
 Summary:       Header files for GEOS library
-Summary(pl):   Pliki nag³ówkowe biblioteki GEOS
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki GEOS
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      libstdc++-devel
@@ -38,21 +44,45 @@ Requires:   libstdc++-devel
 %description devel
 Header files for GEOS library.
 
-%description devel -l pl
-Pliki nag³ówkowe biblioteki GEOS.
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki GEOS.
 
 %package static
 Summary:       Static GEOS library
-Summary(pl):   Statyczna biblioteka GEOS
+Summary(pl.UTF-8):     Statyczna biblioteka GEOS
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static GEOS library.
 
-%description static -l pl
+%description static -l pl.UTF-8
 Statyczna biblioteka GEOS.
 
+%package -n python-geos
+Summary:       Python bindings for Geometry Engine - Open Source
+Summary(pl.UTF-8):     Wiązania Pythona do biblioteki GEOS
+Group:         Development/Languages/Python
+Requires:      %{name} = %{version}-%{release}
+
+%description -n python-geos
+Python bindings for Geometry Engine - Open Source.
+
+%description -n python-geos -l pl.UTF-8
+Wiązania Pythona do biblioteki GEOS.
+
+%package -n ruby-geos
+Summary:       Ruby bindings for Geometry Engine - Open Source
+Summary(pl.UTF-8):     Wiązania języka Ruby do biblioteki GEOS
+Group:         Development/Languages/Python
+Requires:      %{name} = %{version}-%{release}
+
+%description -n ruby-geos
+Ruby bindings for Geometry Engine - Open Source.
+
+%description -n ruby-geos -l pl.UTF-8
+Wiązania języka Ruby do biblioteki GEOS.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -63,6 +93,15 @@ cp -f /usr/share/automake/config.* .
 %{__make} \
        pkglibdir=%{_libdir}
 
+cd swig/python
+swig -c++ -python -modern -o geos_wrap.cxx ../geos.i
+python setup.py build
+
+cd ../ruby
+swig -c++ -ruby -autorename -o geos_wrap.cxx ../geos.i
+%{__cxx} %{rpmcxxflags} -I../../source/headers -I%{ruby_archdir} -c geos_wrap.cxx
+%{__cxx} -shared -o geos.so geos_wrap.o -lruby -L../../source/geom/.libs -lgeos
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
@@ -70,6 +109,16 @@ rm -rf $RPM_BUILD_ROOT
        DESTDIR=$RPM_BUILD_ROOT \
        pkglibdir=%{_libdir}
 
+cd swig
+install -D ruby/geos.so $RPM_BUILD_ROOT%{ruby_archdir}/geos.so
+
+cd python
+python setup.py install \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+
+%py_postclean
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -78,17 +127,32 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS TODO
-%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
+%doc AUTHORS ChangeLog NEWS README TODO
+%attr(755,root,root) %{_libdir}/libgeos.so.*.*.*
+%attr(755,root,root) %{_libdir}/libgeos_c.so.*.*.*
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/geos-config
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
+%attr(755,root,root) %{_libdir}/libgeos.so
+%attr(755,root,root) %{_libdir}/libgeos_c.so
+%{_libdir}/libgeos.la
+%{_libdir}/libgeos_c.la
 %{_includedir}/geos
 %{_includedir}/geos.h
+%{_includedir}/geos_c.h
 
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libgeos.a
+%{_libdir}/libgeos_c.a
+
+%files -n python-geos
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/_geos.so
+%{py_sitedir}/geos.py[co]
+%{py_sitedir}/PyGEOS-*.egg-info
+
+%files -n ruby-geos
+%defattr(644,root,root,755)
+%attr(755,root,root) %{ruby_archdir}/geos.so
This page took 0.092679 seconds and 4 git commands to generate.