From 4e1804b6df06d910cdbda3ed930e86a95339e4040fb63aceb59691489b7dcb0d Mon Sep 17 00:00:00 2001 From: Otto Dassau Date: Tue, 26 Aug 2008 13:12:25 +0000 Subject: [PATCH] updates by Stephan Holl for SLES10 build OBS-URL: https://build.opensuse.org/package/show/Application:Geo/mapserver?expand=0&rev=13 --- mapserver.spec | 65 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/mapserver.spec b/mapserver.spec index 1238456..2ae798e 100644 --- a/mapserver.spec +++ b/mapserver.spec @@ -6,13 +6,15 @@ Group: Applications/GIS Source: %{name}-%{version}.tar.bz2 URL: http://mapserver.gis.umn.edu Summary: Environment for building spatially-enabled internet applications -Packager: Otto Dassau +Packager: Stephan Holl Requires: php Requires: postgresql Requires: mysql #Requires: python -#Requires: httpd +Requires: apache2 +%if 0%{?suse_version} != 1010 BuildRequires: xorg-x11-libXpm-devel +%endif BuildRequires: rpm, gcc, gcc-c++ BuildRequires: postgresql-devel BuildRequires: mysql-devel @@ -37,12 +39,17 @@ BuildRequires: libtiff-devel BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: swig BuildRequires: java-devel >= 1.5 -#BuildRequires: httpd-devel +BuildRequires: update-alternatives +BuildRequires: apache2-devel BuildRequires: java +%if 0%{?sles_version} == 10 +BuildRequires: java-1_5_0-ibm-alsa +%endif BuildRequires: libgcj-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) #%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") +%define _cgibindir /srv/www/cgi-bin %description Mapserver is an internet mapping program that converts GIS data to @@ -54,11 +61,10 @@ custom GIS data. Summary: PHP/Mapscript map making extensions to PHP Group: Development/Languages Requires: php-gd -#Requires: httpd +Requires: apache2 %description -n php-mapserver -The PHP/Mapscript extension provides full map customization capabilities within -the PHP scripting language. +The PHP/Mapscript extension provides full map customization capabilities within the PHP scripting language. %package perl Summary: Perl/Mapscript map making extensions to Perl @@ -69,12 +75,11 @@ Requires: %{name} = %{version}-%{release} The Perl/Mapscript extension provides full map customization capabilities within the Perl programming language. -## FIXME: path to python site-packages is not correct, see files python #%package python #Summary: Python/Mapscript map making extensions to Python #Group: Development/Languages #Requires: %{name} = %{version}-%{release} - +# #%description python #The Python/Mapscript extension provides full map customization capabilities #within the Python programming language. @@ -126,23 +131,23 @@ chmod -x mapscript/php3/README --with-curl-config=%{_bindir}/curl-config \ --with-xml2-config=%{_bindir}/xml2-config \ --with-php=`php-config --include-dir` \ + --with-httpd=/usr/sbin/httpd2 \ --without-pdf \ --without-eppl \ --with-threads \ - --enable-debug \ --disable-runpath -# WARNING !!! +## WARNING !!! # using %{?_smp_mflags} may break build make -# build perl +## build perl cd mapscript/perl perl Makefile.PL make -# build python +## build python #cd ../python #python setup.py build @@ -155,25 +160,36 @@ make rm -rf %{buildroot} mkdir -p %{buildroot}/%{_sbindir} +mkdir -p %{buildroot}/%{_cgibindir} mkdir -p %{buildroot}/%{_sysconfdir}/php.d -mkdir -p %{buildroot}%{_libdir}/php/modules +mkdir -p %{buildroot}%{_libdir}/php5/extensions mkdir -p %{buildroot}/%{_bindir} -install -p -m 755 mapserv %{buildroot}/%{_sbindir} +install -p -m 755 mapserv %{buildroot}/%{_cgibindir} +install -p -m 755 legend %{buildroot}/%{_cgibindir} +install -p -m 755 scalebar %{buildroot}/%{_cgibindir} install -p -m 755 shp2img %{buildroot}/%{_bindir} install -p -m 755 shptree %{buildroot}/%{_bindir} install -p -m 755 sortshp %{buildroot}/%{_bindir} install -p -m 755 tile4ms %{buildroot}/%{_bindir} -install -p -m 755 mapscript/php3/php_mapscript.so %{buildroot}/%{_libdir}/php/modules/ +install -p -m 755 mapscript/php3/php_mapscript.so %{buildroot}/%{_libdir}/php5/extensions/ # install perl module pushd mapscript/perl make DESTDIR=%{buildroot} pure_vendor_install popd -# install python module +## install python module #pushd mapscript/python #python setup.py install --root %{buildroot} +## WORKARROUND: only for python 2.4 +#mkdir -p %{buildroot}%{python_sitearch}/ +#cp build/lib.linux-i686-2.4/mapscript.py %{buildroot}%{python_sitearch}/ +#cp build/lib.linux-i686-2.4/_mapscript.so %{buildroot}%{python_sitearch}/ +## clean up after installing +#rm -f %{buildroot}/usr/local/python2.4/site-packages/mapscript.py +#rm -f %{buildroot}/usr/local/python2.4/site-packages/mapscript.pyc +#rm -f %{buildroot}/usr/local/python2.4/site-packages/_mapscript.so #popd # install java @@ -210,14 +226,16 @@ rm -rf %{buildroot} %{_bindir}/shptree %{_bindir}/sortshp %{_bindir}/tile4ms -%{_sbindir}/mapserv +%{_cgibindir}/mapserv +%{_cgibindir}/legend +%{_cgibindir}/scalebar %files -n php-mapserver %defattr(-,root,root) %doc mapscript/php3/README %doc mapscript/php3/examples %config(noreplace) %{_sysconfdir}/php.d/%{name}.ini -%{_libdir}/php/modules/php_mapscript.so +%{_libdir}/php5/extensions/php_mapscript.so %files perl %defattr(-,root,root) @@ -233,8 +251,8 @@ rm -rf %{buildroot} #%doc mapscript/python/tests ## FIXME ## packages are built here but should go to python_sitearch -#/usr/local/lib64/python2.5/site-packages/* -##%{python_sitearch}/* +##/usr/local/lib64/python2.5/site-packages/* +#%{python_sitearch}/* %files java %defattr(-,root,root) @@ -244,8 +262,11 @@ rm -rf %{buildroot} %{_javadir}/*.jar %changelog -* Sun Aug 22 2008 Otto Dassau 5.2.0 -- version update +* Tue Aug 26 2008 Stephan Holl 5.2.0 +- updated to build on SLE_10 x32-plattforms +- updated path to php_mapscript.so +- updated path to mapserv +- added legend, scalebar * Sun Mar 16 2008 Otto Dassau 5.0.2 - adapted to compile on openSUSE build service - java and python is not build included