1
0
forked from pool/mapserver
mapserver/mapserver.spec

406 lines
14 KiB
RPMSpec
Raw Blame History

Name: mapserver
%define fileversion 6.0.1
Version: 6.0.1
Release: 1
License: BSD
Group: Applications/GIS
Source: %{name}-%{fileversion}.tar.gz
URL: http://mapserver.gis.umn.edu
Summary: Environment for building spatially-enabled internet applications
Packager: Stephan Holl <stephan.holl@intevation.de>
Requires: php
Requires: postgresql
Requires: mysql
Requires: FastCGI
#Requires: libexpat
Requires: python
Requires: apache2
%if 0%{?suse_version} != 1010
BuildRequires: xorg-x11-libXpm-devel
%endif
BuildRequires: rpm, gcc, gcc-c++, pam
BuildRequires: pam-devel
BuildRequires: postgresql-devel
BuildRequires: libexpat-devel
BuildRequires: mysql-devel
BuildRequires: giflib-devel
BuildRequires: libgeos-devel
BuildRequires: libproj-devel
BuildRequires: libgdal-devel
BuildRequires: readline-devel
BuildRequires: freetype2-devel
BuildRequires: gd-devel >= 2.0.16
BuildRequires: FastCGI-devel
BuildRequires: python-devel
%if 0%{?suse_version} >= 1030
BuildRequires: libcurl-devel
BuildRequires: php-devel
%else
BuildRequires: curl-devel
BuildRequires: php5-devel
%endif
%if 0%{?suse_version} >= 1120
BuildRequires: krb5-devel
%endif
BuildRequires: zlib-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: swig
BuildRequires: update-alternatives
BuildRequires: apache2-devel
BuildRequires: java-devel >= 1.5
BuildRequires: java >= 1.5
%if 0%{?sles_version} == 10
%ifarch i586
BuildRequires: java-1_5_0-ibm-alsa
%endif
BuildRequires: krb5-devel
%endif
BuildRequires: libgcj-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Patch0: mapserver-5.4.1_buildchecks.patch
Patch1: patch_3877-r11714.patch
#Patch2: bug3525_verbose_output.patch
%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
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
Requires: apache2
Requires: apache2-mod_php5
%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 -n %{name}-%{fileversion}
%patch0 -p1
%patch1 -p1 -R
#%patch2 -p1
# fix spurious perm bits
chmod -x tests/home.png
chmod -x mappluginlayer.c
chmod -x mapscript/php/mapscript_i.c
chmod -x mapscript/php/Makefile.in
chmod -x mapscript/php/Makefile.vc
chmod -x mapscript/php/php_mapscript.*
chmod -x mapscript/python/examples/*.py
chmod -x mapscript/perl/examples/*.pl
chmod -x mapscript/php/README.WIN32
%build
# fix gdal lookup
%{__sed} -i.libs -e 's|`\$GDAL_CONFIG --dep-libs`||' configure
%configure \
--with-gd \
--with-zlib \
--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` \
--with-httpd=/usr/sbin/httpd2 \
--with-fastcgi=/usr \
--with-agg-svg-symbols=yes \
--with-expat=/usr \
--with-kml=yes \
--without-pdf \
--without-eppl \
--with-threads \
--disable-runpath
## Dirty Hack: Strip out the faulty referenced -lpgport from Makefiles in
## order to make the linking succeed. pg_config progagates it, but it is
## not available on suse-systems.
## TODO: Send a patch to postgresql-packagers!
find . -name Makefile -exec sed -i 's/ -lpgport//' {} \;
## 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}/%{_cgibindir}
mkdir -p %{buildroot}/%{_sysconfdir}/php.d
mkdir -p %{buildroot}%{_libdir}/php5/extensions
mkdir -p %{buildroot}/%{_bindir}
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/php/php_mapscript.so %{buildroot}/%{_libdir}/php5/extensions/
# 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}
mkdir -p %{buildroot}%{python_sitearch}/
mv %{buildroot}/usr/local/%{_lib}/python%py_ver/site-packages/*mapscript* %{buildroot}/usr/%{_lib}/python%py_ver/site-packages/
%if 0%{?suse_version} > 1110 || 0%{?sles_version} > 10
mv %{buildroot}/usr/local/%{_lib}/python%py_ver/site-packages/MapScript* %{buildroot}/usr/%{_lib}/python%py_ver/site-packages/
%endif
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}/php5/conf.d/
cat > %{buildroot}%{_sysconfdir}/php5/conf.d/%{name}.ini <<EOF
; Enable %{name} extension module
extension=php_mapscript.so
EOF
# cleanup junks
for junk in {*.pod,*.bs,.packlist} ; do
find %{buildroot} -name "$junk" -exec rm -rf '{}' \;
done
# remove vera fonts, these are provided system wide
rm -rf %{buildroot}/%{_docdir}/%{name}-%{version}/tests/vera
# fix some exec bits
chmod 755 %{buildroot}/%{perl_vendorarch}/auto/mapscript/mapscript.so
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc README README.CONFIGURE README.WIN32 COMMITERS GD-COPYING HISTORY.TXT
%doc INSTALL MIGRATION_GUIDE.txt
%doc symbols tests
%doc fonts
%{_bindir}/shp2img
%{_bindir}/shptree
%{_bindir}/sortshp
%{_bindir}/tile4ms
%{_cgibindir}/mapserv
%{_cgibindir}/legend
%{_cgibindir}/scalebar
%files -n php-mapserver
%defattr(-,root,root)
%doc mapscript/php/README
%doc mapscript/php/README.WIN32
%doc mapscript/php/examples
%config(noreplace) %{_sysconfdir}/php5/conf.d/%{name}.ini
%{_libdir}/php5/extensions/php_mapscript.so
%files perl
%defattr(-,root,root)
%doc mapscript/perl/examples
%dir %{perl_vendorarch}/auto/mapscript
%{perl_vendorarch}/auto/mapscript/*
%{perl_vendorarch}/mapscript.pm
%files python
%defattr(-,root,root)
%doc mapscript/python/README
%doc mapscript/python/examples
%doc mapscript/python/tests
%{python_sitearch}/*
%files java
%defattr(-,root,root)
%doc mapscript/java/README
%doc mapscript/java/examples
%doc mapscript/java/tests
%{_javadir}/*.jar
%changelog
* Fri Sep 30 2011 Stephan Holl <stephan.holl@intevation.de> 6.0.1
- updated to new upstream version of mapserver 6.0.1 (see
http://trac.osgeo.org/mapserver/browser/tags/rel-6-0-1/mapserver/HISTORY.TXT for a detailed description of the changes.
* Fri May 27 2011 Stephan Holl <stephan.holl@intevation.de> 6.0.0
- included the patch from #3877 to make it build
* Mon May 16 2011 Stephan Holl <stephan.holl@intevation.de> 6.0.0
- updated to new upstream version of mapserver 6.0.0 (see
http://trac.osgeo.org/mapserver/browser/tags/rel-6-0-0/mapserver/HISTORY.TXT for a detailed description of the changes.
* Fri May 06 2011 Stephan Holl <stephan.holl@intevation.de> 6.0.0-rc2
- updated with new upstream release 6.0.0-rc2
* Sat Apr 30 2011 Angelos Tzotsos <tzotsos@opensuse.org> 6.0.0-rc1
- updated with new upstream release 6.0.0-rc1.
* Sun Apr 24 2011 Angelos Tzotsos <tzotsos@opensuse.org> 6.0.0-beta7
- updated with new upstream release 6.0.0-beta7.
* Thu Apr 14 2011 Stephan Holl <stephan.holl@intevation.de> 6.0.0-beta6
- updated with new upstream release 6.0.0-beta6.
* Thu Apr 07 2011 Stephan Holl <stephan.holl@intevation.de> 6.0.0-beta5
- updated with new upstream release 6.0.0-beta5; in the meanwhile
python-support was repaired by someone else (dstoecker, adrianSuSE).
Kudos to them.
* Fri Mar 11 2011 Stephan Holl <stephan.holl@intevation.de> 6.0.0-beta1
- updated with new upstream release 6.0.0-beta1
* Sun Feb 27 2011 Angelos Tzotsos <tzotsos@opensuse.org> 5.6.6
- fixed python package
* Mon Jan 24 2011 Stephan Holl <stephan.holl@intevation.de> 5.6.6
- added bug3525_verbose_output.patch to make EXCEPTIONS-output more
verbose
* Tue Jan 18 2011 Stephan Holl <stephan.holl@intevation.de> 5.6.6
- udated to new upstream version of mapserver 5.6.6(see<65>
http://trac.osgeo.org/mapserver/browser/tags/rel-5-6-6/mapserver/HISTORY.TXT
for a detailed description of the changes.
- removed patch for bug #3525 since this is already included in upstreams
version 5.6.5
* Tue Jan 11 2011 Stephan Holl <stephan.holl@intevation.de> 5.6.5
- added upstream-patch for mapserver bug #3525 to work reliably with WMS
1.3.0 and FCGI-mode
* Mon Dec 06 2010 Stephan Holl <stephan.holl@intevation.de> 5.6.5
- added --with-experimental-png-compile-flag
* Wed Oct 13 2010 Stephan Holl <stephan.holl@intevation.de> 5.6.5
- added a patch to hide layers from GetCapabilitites-Output. Use
Metadataentry 'OWS_HIDDEN_LAYER' 'true' inside your layer
- added Fastcgi-Support
* Tue Aug 10 2010 Stephan Holl <stephan.holl@intevation.de> 5.6.5
- updated to new upstream version of mapserver 5.6.5(see
http://trac.osgeo.org/mapserver/browser/tags/rel-5-6-5/mapserver/HISTORY.TXT
for a detailed description of the changes.
* Fri Mar 08 2010 Stephan Holl <stephan.holl@intevation.de> 5.6.3
- updated to new upstream version of mapserver 5.6.3(see
http://trac.osgeo.org/mapserver/browser/tags/rel-5-6-3/mapserver/HISTORY.TXT
for a detailed description of the changes.
* Mon Jan 11 2010 Stephan Holl <stephan.holl@intevation.de> 5.6.1
- updated to new upstream version of mapserver 5.6.1(see
http://trac.osgeo.org/mapserver/browser/tags/rel-5-6-1/mapserver/HISTORY.TXT
for a detailed description of the changes.
* Wed Dec 16 2009 Stephan Holl <stephan.holl@intevation.de> 5.6.0
- updated to new upstream version of mapserver 5.6.0 (see http://trac.osgeo.org/mapserver/browser/tags/rel-5-6-0/mapserver/HISTORY.TXT for a detailed description of the changes.
* Wed May 06 2009 Stephan Holl <stephan.holl@intevation.de> 5.4.0
- updated to new upstream version of mapserver 5.4.0 (see http://trac.osgeo.org/mapserver/browser/tags/rel-5-4-0/mapserver/HISTORY.TXT for a detailed description of the changes.
- This release fixes several security vulnerabilities:
http://trac.osgeo.org/mapserver/ticket/2939
http://trac.osgeo.org/mapserver/ticket/2941
http://trac.osgeo.org/mapserver/ticket/2942
http://trac.osgeo.org/mapserver/ticket/2943
http://trac.osgeo.org/mapserver/ticket/2944
- tweaked the specfile for the new relase a little
- make java using version 1.5 also for OpenSuSE 11.0
* Wed Dec 04 2008 Stephan Holl <stephan.holl@intevation.de> 5.2.1
- updated to new upstream release of mapserver 5.2.1 (see http://trac.osgeo.org/mapserver/browser/tags/rel-5-2-1/mapserver/HISTORY.TXT for a detailed description of the changes
* Wed Oct 22 2008 Stephan Holl <stephan.holl@intevation.de> 5.2.0
- removed --with-tiff-option based on a hint from Andreas Hirner. See http://n2.nabble.com/Re:-unable-to-read-TIF-with-mapserver-5.3dev-td738238.html for more information
* Tue Aug 28 2008 Stephan Holl <stephan.holl@intevation.de> 5.2.0
- changed path of mapscript-module
- added dependency of apache2_mod-php5 to php-mapserver
* Tue Aug 26 2008 Stephan Holl <stephan.holl@intevation.de> 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
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 5.0.2-2
- Autorebuild for GCC 4.3
* Sat Feb 9 2008 Devrim GUNDUZ <devrim@commandprompt.com> - 5.0.2-1
- Update to 5.0.2
* Sat Jan 5 2008 Devrim GUNDUZ <devrim@commandprompt.com> - 5.0.0-2
- Update BR for java-devel, per Patrice Dumas
* Fri Jan 4 2008 Devrim GUNDUZ <devrim@commandprompt.com> - 5.0.0-1
- Update to 5.0.0
- Removed patch0, since it is already in upstream.
- Updated BRs
* Thu Dec 06 2007 Release Engineering <rel-eng at fedoraproject dot org> - 4.10.3-3
- Rebuild for deps
* Thu Aug 30 2007 Oliver Falk <oliver@linux-kernel.at> 4.10.3-2
- Add fix to include libmapserver (in some places), instead of
libmap, that doesn't exist (anymore)
* Thu Aug 30 2007 Oliver Falk <oliver@linux-kernel.at> 4.10.3-1
- Update to fix bz#256561, CVE-2007-4542
* Fri May 11 2007 Balint Cristian <cbalint@redhat.com> 4.10.2-4
- update require list properly.
* Thu May 10 2007 Balint Cristian <cbalint@redhat.com> 4.10.2-3
- use macros if possible in spec
* Thu May 10 2007 Balint Cristian <cbalint@redhat.com> 4.10.2-2
- further fixups for inclusion
* Thu May 10 2007 Balint Cristian <cbalint@redhat.com> 4.10.2-1
- new upsream tarball (bugfix)
- further fixups for inclusion
* Tue Apr 24 2007 Balint Cristian <cbalint@redhat.com> 4.10.1-3
- further fixups for inclusion
- enable java
* Fri Mar 16 2007 Balint Cristian <cbalint@redhat.com> 4.10.1-2
- add docs
* Fri Mar 16 2007 Balint Cristian <cbalint@redhat.com> 4.10.1-1
- first package