]> git.pld-linux.org Git - packages/geos.git/blobdiff - geos.spec
- ruby 2.0 rebuld
[packages/geos.git] / geos.spec
index cb20793d2a5f1d5d0f9f78f778b46933fd454c1a..70cf67de0befc2e1764ab92d0c77cf4330d82bbb 100644 (file)
--- a/geos.spec
+++ b/geos.spec
@@ -1,18 +1,31 @@
+#
+# Conditional build:
+%bcond_without php     # PHP binding
+%bcond_without ruby    # ruby binding
+
 Summary:       Geometry Engine - Open Source
 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
 Name:          geos
-Version:       2.2.1
-Release:       1
-License:       LGPL
+Version:       3.4.2
+Release:       5
+License:       LGPL v2.1
 Group:         Libraries
 Group:         Libraries
-Source0:       http://geos.refractions.net/%{name}-%{version}.tar.bz2
-# Source0-md5: 272132bfb64422915d0f748f5e26932b
-Patch0:                %{name}-config.patch
-Patch1:                %{name}-gcc4.patch
-Patch2:                %{name}-swig.patch
-URL:           http://geos.refractions.net/
+Source0:       http://download.osgeo.org/geos/%{name}-%{version}.tar.bz2
+# Source0-md5: fc5df2d926eb7e67f988a43a92683bae
+Patch0:                %{name}-ruby1.9.patch
+Patch1:                rubydir.patch
+URL:           http://trac.osgeo.org/geos/
+BuildRequires: autoconf >= 2.52
 BuildRequires: automake
 BuildRequires: libstdc++-devel
 BuildRequires: automake
 BuildRequires: libstdc++-devel
+%{?with_php:BuildRequires:     %{php_name}-devel}
+BuildRequires: python
+BuildRequires: python-devel
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.519
+%{?with_ruby:BuildRequires:    ruby-devel}
+BuildRequires: swig-python >= 1.3.29
+%{?with_ruby:BuildRequires:    swig-ruby >= 1.3.40-3}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -22,17 +35,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().
 
 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
 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
 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
 
 %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
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      libstdc++-devel
@@ -40,58 +53,95 @@ Requires:   libstdc++-devel
 %description devel
 Header files for GEOS library.
 
 %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
 
 %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.
 
 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.
 
 Statyczna biblioteka GEOS.
 
+%package -n %{php_name}-geos
+Summary:       PHP bindings for Geometry Engine - Open Source
+Summary(pl.UTF-8):     Wiązania PHP do biblioteki GEOS
+Group:         Development/Languages/PHP
+Requires:      %{name} = %{version}-%{release}
+%{?requires_php_extension}
+
+%description -n %{php_name}-geos
+PHP bindings for Geometry Engine - Open Source.
+
+%description -n %{php_name}-geos -l pl.UTF-8
+Wiązania PHP do biblioteki GEOS.
+
 %package -n python-geos
 Summary:       Python bindings for Geometry Engine - Open Source
 %package -n python-geos
 Summary:       Python bindings for Geometry Engine - Open Source
-Summary(pl):   Wi±zania Pythona do biblioteki GEOS
+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.
 
 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
-Wi±zania Pythona do biblioteki GEOS.
+%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
 %patch1 -p1
 
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 %build
 
 %build
-cp -f /usr/share/automake/config.* .
-%configure
+%{__aclocal} -I macros
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+       %{?with_php:--enable-php} \
+       --enable-python \
+       %{?with_ruby:--enable-ruby}
+
 %{__make} \
        pkglibdir=%{_libdir}
 
 %{__make} \
        pkglibdir=%{_libdir}
 
-cd swig/python
-swig -c++ -python -modern -o geos_wrap.cxx ../geos.i
-python setup.py build
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT \
-       pkglibdir=%{_libdir}
+       DESTDIR=$RPM_BUILD_ROOT
+
+%if %{with php}
+install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/geos.ini
+; Enable geos extension module
+extension=geos.so
+EOF
+%endif
+
+%{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/*.{la,a}}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/geos/*.{la,a}
 
 
-cd swig/python
-python setup.py install --root=$RPM_BUILD_ROOT
+%py_postclean
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -101,9 +151,10 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS TODO
-%attr(755,root,root) %{_libdir}/libgeos.so.*.*.*
+%doc AUTHORS ChangeLog NEWS README TODO
+%attr(755,root,root) %{_libdir}/libgeos-*.so
 %attr(755,root,root) %{_libdir}/libgeos_c.so.*.*.*
 %attr(755,root,root) %{_libdir}/libgeos_c.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgeos_c.so.1
 
 %files devel
 %defattr(644,root,root,755)
 
 %files devel
 %defattr(644,root,root,755)
@@ -121,7 +172,23 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libgeos.a
 %{_libdir}/libgeos_c.a
 
 %{_libdir}/libgeos.a
 %{_libdir}/libgeos_c.a
 
+%if %{with php}
+%files -n %{php_name}-geos
+%defattr(644,root,root,755)
+%doc php/{README,TODO}
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/geos.ini
+%attr(755,root,root) %{php_extensiondir}/geos.so
+%endif
+
 %files -n python-geos
 %defattr(644,root,root,755)
 %files -n python-geos
 %defattr(644,root,root,755)
-%{py_sitedir}/geos.pyc
-%attr(755,root,root) %{py_sitedir}/_geos.so
+%dir %{py_sitedir}/geos
+%attr(755,root,root) %{py_sitedir}/geos/_geos.so
+%{py_sitescriptdir}/geos
+%{py_sitescriptdir}/geos.pth
+
+%if %{with ruby}
+%files -n ruby-geos
+%defattr(644,root,root,755)
+%attr(755,root,root) %{ruby_vendorarchdir}/geos.so
+%endif
This page took 0.102538 seconds and 4 git commands to generate.