From 33c88d6765a472dd07d71681f03eaab8aa83f66e Mon Sep 17 00:00:00 2001 From: Balint Cristian Date: Fri, 11 May 2007 09:50:50 +0000 Subject: [PATCH] initial import. --- Makefile | 21 +++++ mapserver.spec | 239 +++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 261 insertions(+) create mode 100644 Makefile create mode 100644 mapserver.spec create mode 100644 sources diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..39a6833 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: mapserver +# $Id$ +NAME := mapserver +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/mapserver.spec b/mapserver.spec new file mode 100644 index 0000000..0fb2756 --- /dev/null +++ b/mapserver.spec @@ -0,0 +1,239 @@ +Name: mapserver +Version: 4.10.2 +Release: 3%{?dist} +Summary: Environment for building spatially-enabled internet applications +Group: Development/Tools +License: BSD +URL: http://mapserver.gis.umn.edu +Source: http://download.osgeo.org/mapserver/mapserver-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: httpd php +Requires: java-gcj-compat +BuildRequires: libXpm-devel +BuildRequires: httpd-devel php-devel +BuildRequires: postgresql-devel mysql-devel +BuildRequires: geos-devel proj-devel gdal-devel +BuildRequires: php-devel freetype-devel gd-devel >= 2.0.16 +BuildRequires: python-devel curl-devel zlib-devel libxml2-devel +BuildRequires: libjpeg-devel libpng-devel libtiff-devel +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: java-gcj-compat-devel swig > 1.3.24 + + +%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") + +%description +Mapserver is an internet mapping program that converts GIS data to +map images in real time. With appropriate interface pages, +Mapserver can provide an interactive internet map based on +custom GIS data. + +%package -n php-mapserver +Summary: PHP/Mapscript map making extensions to PHP +Group: Development/Languages +Requires: php-gd + +%description -n php-mapserver +The PHP/Mapscript extension provides full map customization capabilities within +the PHP scripting language. + + +%package perl +Summary: Perl/Mapscript map making extensions to Perl +Group: Development/Languages +Requires: %{name} = %{version}-%{release} + +%description perl +The Perl/Mapscript extension provides full map customization capabilities +within the Perl programming language. + +%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. + +%package java +Summary: Java/Mapscript map making extensions to Java +Group: Development/Languages +Requires: %{name} = %{version}-%{release} + +%description java +The Java/Mapscript extension provides full map customization capabilities +within the Java programming language. + +%prep +%setup -q +# fix spurious perm bits +chmod -x tests/home.png +chmod -x rfc/ms-rfc-8.txt +chmod -x mapscript/php3/php_mapscript.c +chmod -x mappluginlayer.c +chmod -x mapscript/php3/mapscript_i.c +chmod -x mapscript/php3/examples/test_writeshape.phtml +chmod -x mapscript/python/examples/*.py +chmod -x mapscript/perl/examples/*.pl +chmod -x mapscript/php3/README + +%build + +# fix gdal lookup +%{__sed} -i.libs -e 's|`\$GDAL_CONFIG --dep-libs`||' configure + +%configure \ + --with-gd \ + --with-zlib \ + --with-tiff \ + --with-freetype=%{_bindir}/freetype-config \ + --with-gdal=%{_bindir}/gdal-config \ + --with-ogr=%{_bindir}/gdal-config \ + --with-geos=%{_bindir}/geos-config \ + --with-proj \ + --with-sos \ + --with-wfs \ + --with-wcs \ + --with-wmsclient \ + --with-wfsclient \ + --with-xpm \ + --with-postgis=%{_bindir}/pg_config \ + --with-mygis=%{_bindir}/mysql_config \ + --with-curl-config=%{_bindir}/curl-config \ + --with-xml2-config=%{_bindir}/xml2-config \ + --with-php=`php-config --include-dir` \ + --without-pdf \ + --without-eppl \ + --with-threads \ + --enable-debug \ + --disable-runpath + +# WARNING !!! +# using %{?_smp_mflags} may break build + +make + +# build perl +cd mapscript/perl +perl Makefile.PL +make + +# build python +cd ../python +python setup.py build + +# build java +cd ../java +make interface +make + +%install +rm -rf %{buildroot} + +mkdir -p %{buildroot}/%{_sbindir} +mkdir -p %{buildroot}/%{_sysconfdir}/php.d +mkdir -p %{buildroot}%{_libdir}/php/modules +mkdir -p %{buildroot}/%{_bindir} +install -p -m 755 mapserv %{buildroot}/%{_sbindir} +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 perl module +pushd mapscript/perl +make DESTDIR=%{buildroot} pure_vendor_install +popd + +# install python module +pushd mapscript/python +python setup.py install --root %{buildroot} +popd + +# install java +mkdir -p %{buildroot}%{_javadir} +install -p -m 644 mapscript/java/mapscript.jar %{buildroot}%{_javadir}/ + +# install php config file +mkdir -p %{buildroot}%{_sysconfdir}/php.d/ +cat > %{buildroot}%{_sysconfdir}/php.d/%{name}.ini < 4.10.2-3 +- use macros if possible in spec + +* Thu May 10 2007 Balint Cristian 4.10.2-2 +- further fixups for inclusion + +* Thu May 10 2007 Balint Cristian 4.10.2-1 +- new upsream tarball (bugfix) +- further fixups for inclusion + +* Tue Apr 24 2007 Balint Cristian 4.10.1-3 +- further fixups for inclusion +- enable java + +* Fri Mar 16 2007 Balint Cristian 4.10.1-2 +- add docs + +* Fri Mar 16 2007 Balint Cristian 4.10.1-1 +- first package diff --git a/sources b/sources new file mode 100644 index 0000000..bcff41d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +5e36e2d788599505590501c981eb44a7 mapserver-4.10.2.tar.gz