From ead243f9ecde40099e45cec1ec16d3382e675217 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 23 May 2014 10:10:52 +0300 Subject: [PATCH] build with php55 --- gdal.spec | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/gdal.spec b/gdal.spec index 7c85d4d..a9ae74d 100644 --- a/gdal.spec +++ b/gdal.spec @@ -43,11 +43,12 @@ %if %{with podofo} %undefine with_poppler %endif +%define php_name php55 Summary: Geospatial Data Abstraction Library Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi Name: gdal Version: 1.11.0 -Release: 2 +Release: 3 License: BSD-like Group: Libraries Source0: http://download.osgeo.org/gdal/%{version}/%{name}-%{version}.tar.xz @@ -61,6 +62,7 @@ Patch5: %{name}-grass.patch Patch6: %{name}-sse.patch Patch7: %{name}-link.patch URL: http://www.gdal.org/ +%{?with_php:BuildRequires: %{php_name}-devel} %{?with_opencl:BuildRequires: OpenCL-devel >= 1.0} %{?with_armadillo:BuildRequires: armadillo-devel} BuildRequires: autoconf >= 2.52 @@ -103,7 +105,6 @@ BuildRequires: ogdi-devel >= 3.1 %{?with_oci:BuildRequires: oracle-instantclient-devel >= 10.0.1} #BuildRequires: pcidsk-devel > 0.3 BuildRequires: perl-devel -%{?with_php:BuildRequires: php-devel} %{?with_podofo:BuildRequires: podofo-devel} %{?with_poppler:BuildRequires: poppler-devel >= 0.24} # ensure it's compiled with PQescapeStringConn support @@ -227,17 +228,17 @@ Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules. %description -n perl-gdal -l pl.UTF-8 Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR. -%package -n php-gdal +%package -n %{php_name}-gdal Summary: PHP bindings for GDAL library Summary(pl.UTF-8): Wiązania PHP do biblioteki GDAL Group: Development/Languages/PHP Requires: %{name} = %{version}-%{release} %{?requires_php_extension} -%description -n php-gdal +%description -n %{php_name}-gdal PHP bindings for GDAL library -%description -n php-gdal -l pl.UTF-8 +%description -n %{php_name}-gdal -l pl.UTF-8 Wiązania PHP do biblioteki GDAL. %package -n python-gdal @@ -364,13 +365,14 @@ cp -a ogr/html _html/ogr %if %{with php} # missing in make install -install -D swig/php/php_gdal.so $RPM_BUILD_ROOT%{php_extensiondir}/gdal.so -install -D swig/php/php_gdalconst.so $RPM_BUILD_ROOT%{php_extensiondir}/gdalconst.so -install -D swig/php/php_ogr.so $RPM_BUILD_ROOT%{php_extensiondir}/ogr.so -install -D swig/php/php_osr.so $RPM_BUILD_ROOT%{php_extensiondir}/osr.so +install -d $RPM_BUILD_ROOT%{php_extensiondir} +install -p swig/php/php_gdal.so $RPM_BUILD_ROOT%{php_extensiondir}/gdal.so +install -p swig/php/php_gdalconst.so $RPM_BUILD_ROOT%{php_extensiondir}/gdalconst.so +install -p swig/php/php_ogr.so $RPM_BUILD_ROOT%{php_extensiondir}/ogr.so +install -p swig/php/php_osr.so $RPM_BUILD_ROOT%{php_extensiondir}/osr.so install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d cat <<'EOF' >$RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/gdal.ini -; Enable gdal extension module +; Enable gdal extension modules extension=gdal.so extension=gdalconst.so extension=ogr.so @@ -530,7 +532,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so %if %{with php} -%files -n php-gdal +%files -n %{php_name}-gdal %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/gdal.ini %attr(755,root,root) %{php_extensiondir}/gdal.so -- 2.43.0