X-Git-Url: http://git.pld-linux.org/?p=packages%2Fgeos.git;a=blobdiff_plain;f=geos.spec;h=70cf67de0befc2e1764ab92d0c77cf4330d82bbb;hp=14e8293b92066ef9d30f224a636a419559de0e37;hb=2abb994f12ee7e11b6f4515e4b2592310c197e4d;hpb=11971862f620051665e495d8c488d30083bbe4af diff --git a/geos.spec b/geos.spec index 14e8293..70cf67d 100644 --- a/geos.spec +++ b/geos.spec @@ -1,25 +1,31 @@ -# Conditional build: -%bcond_without ruby # build without ruby # +# Conditional build: +%bcond_without php # PHP binding +%bcond_without ruby # ruby binding + Summary: Geometry Engine - Open Source Summary(pl.UTF-8): GEOS - silnik geometryczny z otwartymi źródłami Name: geos -Version: 3.0.0 -%define _rc rc4 -Release: 0.%{_rc}.1 -License: LGPL +Version: 3.4.2 +Release: 5 +License: LGPL v2.1 Group: Libraries -Source0: http://geos.refractions.net/%{name}-%{version}%{_rc}.tar.bz2 -# Source0-md5: 90d4dba51dd75f8f1f12378e0f910d76 -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: python >= 1:2.5 -BuildRequires: python-devel >= 1:2.5 +%{?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.29} +%{?with_ruby:BuildRequires: swig-ruby >= 1.3.40-3} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -62,6 +68,19 @@ Static GEOS library. %description static -l pl.UTF-8 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 Summary(pl.UTF-8): Wiązania Pythona do biblioteki GEOS @@ -87,11 +106,17 @@ Ruby bindings for Geometry Engine - Open Source. Wiązania języka Ruby do biblioteki GEOS. %prep -%setup -q -n %{name}-%{version}%{_rc} +%setup -q +%patch0 -p1 +%patch1 -p1 %build -cp -f /usr/share/automake/config.* . +%{__aclocal} -I macros +%{__autoconf} +%{__autoheader} +%{__automake} %configure \ + %{?with_php:--enable-php} \ --enable-python \ %{?with_ruby:--enable-ruby} @@ -103,8 +128,18 @@ cp -f /usr/share/automake/config.* . 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} %py_postclean @@ -117,10 +152,9 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc AUTHORS ChangeLog NEWS README TODO -# fixme?: -%attr(755,root,root) %{_libdir}/libgeos-3.0*.so -#%attr(755,root,root) %{_libdir}/libgeos.so.*.*.* +%attr(755,root,root) %{_libdir}/libgeos-*.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) @@ -138,14 +172,23 @@ rm -rf $RPM_BUILD_ROOT %{_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) %dir %{py_sitedir}/geos %attr(755,root,root) %{py_sitedir}/geos/_geos.so -%{py_sitescriptdir}/geos* +%{py_sitescriptdir}/geos +%{py_sitescriptdir}/geos.pth %if %{with ruby} %files -n ruby-geos %defattr(644,root,root,755) -%attr(755,root,root) %{ruby_archdir}/geos.so +%attr(755,root,root) %{ruby_vendorarchdir}/geos.so %endif