diff --git a/.gitignore b/.gitignore index 5093136..dcbe50d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ gdal-1.7.2-fedora.tar.gz gdalautotest-1.7.0.tar.gz /gdal-1.7.3-fedora.tar.gz /gdalautotest-1.7.3.tar.gz +/gdal-1.9.0-fedora.tar.gz +/gdalautotest-1.9.0.tar.gz diff --git a/gdal-1.7.3-png15.patch b/gdal-1.7.3-png15.patch deleted file mode 100644 index 92c8533..0000000 --- a/gdal-1.7.3-png15.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -Nur gdal-1.7.3-fedora/frmts/png/pngdataset.cpp gdal-1.7.3-fedora-png15/frmts/png/pngdataset.cpp ---- gdal-1.7.3-fedora/frmts/png/pngdataset.cpp 2010-11-07 23:58:47.000000000 +0530 -+++ gdal-1.7.3-fedora-png15/frmts/png/pngdataset.cpp 2012-01-10 14:50:25.384124887 +0530 -@@ -1296,7 +1296,7 @@ - * instead of an int, which is what fread() actually returns. - */ - check = (png_size_t)VSIFReadL(data, (png_size_t)1, length, -- (png_FILE_p)png_ptr->io_ptr); -+ (png_FILE_p)png_get_io_ptr(png_ptr)); - - if (check != length) - png_error(png_ptr, "Read Error"); -@@ -1311,7 +1311,7 @@ - { - png_uint_32 check; - -- check = VSIFWriteL(data, 1, length, (png_FILE_p)(png_ptr->io_ptr)); -+ check = VSIFWriteL(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr)); - - if (check != length) - png_error(png_ptr, "Write Error"); -@@ -1322,7 +1322,7 @@ - /************************************************************************/ - static void png_vsi_flush(png_structp png_ptr) - { -- VSIFFlushL( (png_FILE_p)(png_ptr->io_ptr) ); -+ VSIFFlushL( (png_FILE_p)png_get_io_ptr(png_ptr) ); - } - - /************************************************************************/ -@@ -1338,7 +1338,7 @@ - // libpng is generally not built as C++ and so won't honour unwind - // semantics. Ugg. - -- jmp_buf* psSetJmpContext = (jmp_buf*) png_ptr->error_ptr; -+ jmp_buf* psSetJmpContext = (jmp_buf*) png_get_error_ptr(png_ptr); - if (psSetJmpContext) - { - longjmp( *psSetJmpContext, 1 ); diff --git a/gdal-1.7.3-xcompiler.patch b/gdal-1.7.3-xcompiler.patch deleted file mode 100644 index e430fd4..0000000 --- a/gdal-1.7.3-xcompiler.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up gdal-1.7.3-fedora/ltmain.sh.xcompiler gdal-1.7.3-fedora/ltmain.sh -diff -up gdal-1.7.3-fedora/swig/ruby/RubyMakefile.mk.xcompiler gdal-1.7.3-fedora/swig/ruby/RubyMakefile.mk ---- gdal-1.7.3-fedora/swig/ruby/RubyMakefile.mk.xcompiler 2011-03-15 23:55:58.000000000 +0100 -+++ gdal-1.7.3-fedora/swig/ruby/RubyMakefile.mk 2011-03-15 23:56:11.000000000 +0100 -@@ -25,7 +25,7 @@ RUBY_EXTENSIONS_DIR := $(shell ruby -rrb - INSTALL_DIR := $(RUBY_EXTENSIONS_DIR)/gdal - - RUBY_INCLUDE = -I$(RUBY_INCLUDE_DIR) --LDFLAGS += -Xcompiler -shared -L$(RUBY_LIB_DIR) -+LDFLAGS += -shared -L$(RUBY_LIB_DIR) - RUBY_LIB := -l$(RUBY_SO_NAME) - - build: $(RUBY_MODULES) diff --git a/gdal-1.8.0-mitab.patch b/gdal-1.8.0-mitab.patch deleted file mode 100644 index 6ee1e4a..0000000 --- a/gdal-1.8.0-mitab.patch +++ /dev/null @@ -1,81 +0,0 @@ -Index: /trunk/gdal/ogr/ogrsf_frmts/mitab/mitab_middatafile.cpp -=================================================================== ---- /trunk/gdal/ogr/ogrsf_frmts/mitab/mitab_middatafile.cpp (revision 20796) -+++ /trunk/gdal/ogr/ogrsf_frmts/mitab/mitab_middatafile.cpp (revision 20818) -@@ -212,4 +212,8 @@ - else - { -+ // skip leading spaces -+ while(pszLine && (*pszLine == ' ' || *pszLine == '\t') ) -+ pszLine++; -+ - strncpy(m_szLastRead,pszLine,MIDMAXCHAR); - } -Index: /trunk/gdal/ogr/ogrsf_frmts/mitab/mitab_miffile.cpp -=================================================================== ---- /trunk/gdal/ogr/ogrsf_frmts/mitab/mitab_miffile.cpp (revision 20797) -+++ /trunk/gdal/ogr/ogrsf_frmts/mitab/mitab_miffile.cpp (revision 20818) -@@ -471,5 +471,5 @@ - int MIFFile::ParseMIFHeader() - { -- GBool bColumns = FALSE, bDataFound = FALSE; -+ GBool bColumns = FALSE, bAllColumnsRead = FALSE; - int nColumns = 0; - GBool bCoordSys = FALSE; -@@ -498,15 +498,7 @@ - * Parse header until we find the "Data" line - *----------------------------------------------------------------*/ -- while (((pszLine = m_poMIFFile->GetLine()) != NULL)) -- { -- while(pszLine && (*pszLine == ' ' || *pszLine == '\t') ) -- pszLine++; // skip leading spaces -- -- if( EQUALN(pszLine,"Data",4) && !bColumns ) -- { -- bDataFound = TRUE; -- break; -- } -- -+ while (((pszLine = m_poMIFFile->GetLine()) != NULL) && -+ ((bAllColumnsRead == FALSE) || !EQUALN(pszLine,"Data",4))) -+ { - if (bColumns == TRUE && nColumns >0) - { -@@ -514,6 +506,9 @@ - { - nColumns--; -- if (nColumns == 0) -+ if (nColumns == 0) -+ { -+ bAllColumnsRead = TRUE; - bColumns = FALSE; -+ } - } - else -@@ -618,4 +613,10 @@ - nColumns = atoi(papszToken[1]); - m_nAttribut = nColumns; -+ if (nColumns == 0) -+ { -+ // Permit to 0 columns -+ bAllColumnsRead = TRUE; -+ bColumns = FALSE; -+ } - } - else -@@ -638,5 +639,14 @@ - } - -- if ( !bDataFound ) -+ if (!bAllColumnsRead) -+ { -+ CPLError(CE_Failure, CPLE_NotSupported, -+ "COLUMNS keyword not found or invalid number of columns read in %s. File may be corrupt.", -+ m_pszFname); -+ return -1; -+ } -+ -+ if ((pszLine = m_poMIFFile->GetLastLine()) == NULL || -+ EQUALN(m_poMIFFile->GetLastLine(),"DATA",4) == FALSE) - { - CPLError(CE_Failure, CPLE_NotSupported, diff --git a/gdal-1.9.0-java.patch b/gdal-1.9.0-java.patch new file mode 100644 index 0000000..bc57be8 --- /dev/null +++ b/gdal-1.9.0-java.patch @@ -0,0 +1,11 @@ +diff -Nur gdal-1.9.0-fedora/swig/java/java.opt gdal-1.9.0-fedora-java/swig/java/java.opt +--- gdal-1.9.0-fedora/swig/java/java.opt 2012-01-04 08:03:40.000000000 +0100 ++++ gdal-1.9.0-fedora-java/swig/java/java.opt 2012-02-03 08:44:55.837978697 +0100 +@@ -5,6 +5,6 @@ + JAVAC=$(JAVA_HOME)/bin/javac + JAVA=$(JAVA_HOME)/bin/java + JAR=$(JAVA_HOME)/bin/jar +-JAVA_INCLUDE=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux ++JAVA_INCLUDE=-I/usr/lib/jvm/java/include/ -I/usr/lib/jvm/java/include/linux + + diff --git a/gdal-1.9.0-man.patch b/gdal-1.9.0-man.patch new file mode 100644 index 0000000..2e1671e --- /dev/null +++ b/gdal-1.9.0-man.patch @@ -0,0 +1,11 @@ +diff -Nur gdal-1.9.0-fedora/GNUmakefile gdal-1.9.0-fedora-man/GNUmakefile +--- gdal-1.9.0-fedora/GNUmakefile 2012-01-04 08:03:42.000000000 +0100 ++++ gdal-1.9.0-fedora-man/GNUmakefile 2012-02-22 17:29:07.565112215 +0100 +@@ -129,6 +129,7 @@ + cp frmts/wms/frmt_wms_*.xml html + cp frmts/wms/frmt_twms_*.xml html + ++.PHONY: man + man: + # Generate man pages + (cat Doxyfile ; echo "ENABLED_SECTIONS=man"; echo "INPUT=apps swig/python/scripts"; echo "FILE_PATTERNS=*.cpp *.dox"; echo "GENERATE_HTML=NO"; echo "GENERATE_MAN=YES") | doxygen - diff --git a/gdal-AIS.patch b/gdal-AIS.patch deleted file mode 100644 index ca5e023..0000000 --- a/gdal-AIS.patch +++ /dev/null @@ -1,120 +0,0 @@ -diff -up gdal-1.7.3-fedora/frmts/dods/dodsdataset2.cpp.AIS gdal-1.7.3-fedora/frmts/dods/dodsdataset2.cpp ---- gdal-1.7.3-fedora/frmts/dods/dodsdataset2.cpp.AIS 2010-04-23 17:21:55.000000000 -0600 -+++ gdal-1.7.3-fedora/frmts/dods/dodsdataset2.cpp 2010-07-15 11:32:41.144005186 -0600 -@@ -50,7 +50,7 @@ - #include - #include - --#include -+#include - #include - #include - #include -@@ -203,7 +203,7 @@ static int GetDimension( string oCE, con - class DODSDataset : public GDALDataset - { - private: -- AISConnect *poConnect; //< Virtual connection to the data source -+ Connect *poConnect; //< Virtual connection to the data source - - string oURL; //< data source URL - double adfGeoTransform[6]; -@@ -214,7 +214,7 @@ private: - DDS *poDDS; - BaseTypeFactory *poBaseTypeFactory; - -- AISConnect *connect_to_server() throw(Error); -+ Connect *connect_to_server() throw(Error); - - static string SubConstraint( string raw_constraint, - string x_constraint, -@@ -242,7 +242,7 @@ public: - static GDALDataset *Open(GDALOpenInfo *); - - /// Return the connection object -- AISConnect *GetConnect() { return poConnect; } -+ Connect *GetConnect() { return poConnect; } - - /// Return the data source URL - string GetUrl() { return oURL; } -@@ -339,7 +339,7 @@ DODSDataset::~DODSDataset() - /* connect_to_server() */ - /************************************************************************/ - --AISConnect * -+Connect * - DODSDataset::connect_to_server() throw(Error) - { - // does the string start with 'http?' -@@ -375,7 +375,7 @@ DODSDataset::connect_to_server() throw(E - /* -------------------------------------------------------------------- */ - /* Connect, and fetch version information. */ - /* -------------------------------------------------------------------- */ -- AISConnect *poConnection = new AISConnect(oURL); -+ Connect *poConnection = new Connect(oURL); - string version = poConnection->request_version(); - /* if (version.empty() || version.find("/3.") == string::npos) - { -@@ -997,7 +997,7 @@ DODSDataset::Open(GDALOpenInfo *poOpenIn - } - - /* -------------------------------------------------------------------- */ --/* Get the AISConnect instance and the DAS and DDS for this */ -+/* Get the Connect instance and the DAS and DDS for this */ - /* server. */ - /* -------------------------------------------------------------------- */ - poDS->poConnect = poDS->connect_to_server(); -diff -up gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogrdodsdatasource.cpp.AIS gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogrdodsdatasource.cpp ---- gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogrdodsdatasource.cpp.AIS 2010-04-23 17:21:25.000000000 -0600 -+++ gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogrdodsdatasource.cpp 2010-07-15 11:31:33.814943203 -0600 -@@ -150,7 +150,7 @@ int OGRDODSDataSource::Open( const char - - try - { -- poConnection = new AISConnect( oBaseURL ); -+ poConnection = new Connect( oBaseURL ); - version = poConnection->request_version(); - } - catch (Error &e) -diff -up gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogr_dods.h.AIS gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogr_dods.h ---- gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogr_dods.h.AIS 2010-04-23 17:21:25.000000000 -0600 -+++ gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogr_dods.h 2010-07-15 11:31:52.649942228 -0600 -@@ -61,7 +61,7 @@ - #include - #include - --#include -+#include - #include - #include - #include -@@ -122,7 +122,7 @@ class OGRDODSLayer : public OGRLayer - virtual int ProvideDataDDS(); - int bDataLoaded; - -- AISConnect *poConnection; -+ Connect *poConnection; - DataDDS *poDataDDS; - - BaseType *poTargetVar; -@@ -300,7 +300,7 @@ class OGRDODSDataSource : public OGRData - void AddLayer( OGRDODSLayer * ); - - public: // Just intended for read access by layer classes. -- AISConnect *poConnection; -+ Connect *poConnection; - - DAS oDAS; - DDS *poDDS; -diff -up gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogrdodslayer.cpp.AIS gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogrdodslayer.cpp ---- gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogrdodslayer.cpp.AIS 2010-04-23 17:21:25.000000000 -0600 -+++ gdal-1.7.3-fedora/ogr/ogrsf_frmts/dods/ogrdodslayer.cpp 2010-07-15 11:32:06.467945352 -0600 -@@ -213,7 +213,7 @@ int OGRDODSLayer::ProvideDataDDS() - bDataLoaded = TRUE; - try - { -- poConnection = new AISConnect( poDS->oBaseURL ); -+ poConnection = new Connect( poDS->oBaseURL ); - CPLDebug( "DODS", "request_data(%s,%s)", - poDS->oBaseURL.c_str(), - (poDS->oProjection + poDS->oConstraints).c_str() ); diff --git a/gdal-bindir.patch b/gdal-bindir.patch deleted file mode 100644 index b742db1..0000000 --- a/gdal-bindir.patch +++ /dev/null @@ -1,15 +0,0 @@ -Create /usr/bin before attempting to compy anything there. - -Lubomir Rintel - -diff -up gdal-1.7.3-fedora/swig/python/GNUmakefile.bindir gdal-1.7.3-fedora/swig/python/GNUmakefile ---- gdal-1.7.3-fedora/swig/python/GNUmakefile.bindir 2009-03-22 23:25:47.582438890 +0100 -+++ gdal-1.7.3-fedora/swig/python/GNUmakefile 2009-03-22 23:26:10.465436318 +0100 -@@ -60,6 +60,7 @@ else - $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix) - endif - -+ $(INSTALL_DIR) $(DESTDIR)$(INST_BIN) - for f in $(SCRIPTS) ; do $(INSTALL) ./scripts/$$f $(DESTDIR)$(INST_BIN) ; done - - docs: diff --git a/gdal-mysql.patch b/gdal-mysql.patch deleted file mode 100644 index 23158d7..0000000 --- a/gdal-mysql.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ogr/ogrsf_frmts/mysql/ogr_mysql.h.orig 2008-10-23 03:04:33.000000000 +0300 -+++ ogr/ogrsf_frmts/mysql/ogr_mysql.h 2009-02-02 22:47:05.000000000 +0200 -@@ -31,6 +31,8 @@ - #ifndef _OGR_MYSQL_H_INCLUDED - #define _OGR_MYSQL_H_INCLUDED - -+#include "ogrsf_frmts.h" -+ - #include - #include - -@@ -38,8 +40,6 @@ - #undef bool - #endif - --#include "ogrsf_frmts.h" -- - /************************************************************************/ - /* OGRMySQLLayer */ - /************************************************************************/ diff --git a/gdal-1.7.3.pom b/gdal.pom similarity index 92% rename from gdal-1.7.3.pom rename to gdal.pom index a0a604e..95bf86f 100644 --- a/gdal-1.7.3.pom +++ b/gdal.pom @@ -2,5 +2,5 @@ 4.0.0 org.gdal gdal-java-bindings - 1.7.3 + diff --git a/gdal.spec b/gdal.spec index 643e6af..befd856 100644 --- a/gdal.spec +++ b/gdal.spec @@ -1,57 +1,128 @@ -#TODO: Un-bundle g2clib and grib -#TODO: Python 3 bindings possible since 1.7.0 +#TODO: g2clib and grib (said to be modified) +#TODO: Python 3 modules should be possible since 1.7 +#TODO: Create script to make clean tarball +#TODO: msg needs to have PublicDecompWT.zip from EUMETSAT, which is not free; +# Building without msg therefore +#TODO: e00compr bundled? +#TODO: There are tests for bindings -- at least for Perl +#TODO: Java has a directory with test data and a build target called test +# It uses %{JAVA_RUN}; make test seems to work in the build directory +#TODO: e00compr source is the same in the package and bundled in GDAL +#TODO: Consider doxy patch from Suse, setting EXTRACT_LOCAL_CLASSES = NO + +# Conditionals and structures for EL 5 are there +# to make life easier for downstream ELGIS. +# Sadly noarch doesn't work in EL 5, see +# http://fedoraproject.org/wiki/EPEL/GuidelinesAndPolicies + + +# Tests can be of a different version +%global testversion 1.9.0 + +# https://bugzilla.redhat.com/show_bug.cgi?id=663938 +%ifnarch ppc +%global spatialite "--with-spatialite" +%endif + Name: gdal -Version: 1.7.3 -Release: 13%{?dist} +Version: 1.9.0 +Release: 1%{?dist} Summary: GIS file format library Group: System Environment/Libraries License: MIT -URL: http://www.gdal.org/ +URL: http://www.gdal.org # Source0: http://download.osgeo.org/gdal/gdal-%%{version}.tar.gz -# see PROVENANCE.TXT-fedora for details +# See PROVENANCE.TXT-fedora for details! + Source0: %{name}-%{version}-fedora.tar.gz -Source1: http://download.osgeo.org/gdal/gdalautotest-1.7.3.tar.gz -# create versionless symlink -Source2: gdal-1.7.3.pom -Patch1: %{name}-mysql.patch -Patch2: %{name}-bindir.patch -Patch3: %{name}-AIS.patch -Patch4: %{name}-%{version}-xcompiler.patch +Source1: http://download.osgeo.org/%{name}/%{name}autotest-%{testversion}.tar.gz +Source2: %{name}.pom -# https://bugzilla.redhat.com/show_bug.cgi?id=693952 -# http://trac.osgeo.org/gdal/ticket/3694 -- Still present in 1.8 tarball -Patch5: %{name}-1.8.0-mitab.patch +# Fedora uses Alternatives for Java +Patch8: %{name}-1.9.0-java.patch -# Allow to use libpng 1.5 -# http://trac.osgeo.org/gdal/changeset/21526 -# Not necessary for 1.8 and later -Patch6: %{name}-1.7.3-png15.patch +# Make man a phony buildtarget; the directory otherwise blocks it +Patch9: %{name}-1.9.0-man.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: libtool pkgconfig -BuildRequires: python-devel numpy xerces-c-devel -BuildRequires: libpng-devel libungif-devel libjpeg-devel libtiff-devel -BuildRequires: doxygen tetex-latex ghostscript ruby-devel jpackage-utils -BuildRequires: jasper-devel cfitsio-devel libdap-devel librx-devel -BuildRequires: hdf-static hdf-devel -BuildRequires: unixODBC-devel mysql-devel sqlite-devel postgresql-devel zlib-devel -BuildRequires: proj-devel geos-devel netcdf-devel hdf5-devel ogdi-devel libgeotiff-devel -BuildRequires: curl-devel -BuildRequires: perl(ExtUtils::MakeMaker) + +BuildRequires: ant +# No armadillo in EL5 +BuildRequires: armadillo-devel +BuildRequires: cfitsio-devel +# No CharLS in EL5 +BuildRequires: CharLS-devel BuildRequires: chrpath -BuildRequires: ant swig ruby java-devel-gcj +BuildRequires: curl-devel +BuildRequires: doxygen +BuildRequires: expat-devel +BuildRequires: fontconfig-devel +# No freexl in EL5 +BuildRequires: freexl-devel +BuildRequires: geos-devel +BuildRequires: ghostscript +BuildRequires: hdf-devel +BuildRequires: hdf-static +BuildRequires: hdf5-devel +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: jasper-devel +BuildRequires: jpackage-utils +BuildRequires: libgcj +BuildRequires: libgeotiff-devel +# No libgta in EL5 +BuildRequires: libgta-devel -#TODO: Grass support will be available as a plug-in - -# Enable/disable refman generation -%global build_refman 1 - -# we have multilib triage -%if "%{_lib}" == "lib" -%global cpuarch 32 +%if (0%{?fedora}) +BuildRequires: libjpeg-turbo-devel %else -%global cpuarch 64 +BuildRequires: libjpeg-devel +%endif + +BuildRequires: libpng-devel + +%ifnarch ppc64 +BuildRequires: libspatialite-devel +%endif + +BuildRequires: libtiff-devel +BuildRequires: libtool +BuildRequires: giflib-devel +BuildRequires: netcdf-devel +BuildRequires: libdap-devel +BuildRequires: librx-devel +BuildRequires: mysql-devel +BuildRequires: numpy +BuildRequires: ogdi-devel +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: pkgconfig +BuildRequires: poppler-devel +BuildRequires: postgresql-devel +BuildRequires: proj-devel +BuildRequires: python-devel +BuildRequires: ruby +BuildRequires: ruby-devel +BuildRequires: sqlite-devel +BuildRequires: swig +BuildRequires: tetex-latex +BuildRequires: unixODBC-devel +BuildRequires: xerces-c-devel +BuildRequires: xz-devel +BuildRequires: zlib-devel + +# Run time dependency for gpsbabel driver +Requires: gpsbabel + +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +# Enable/disable generating refmans +%global build_refman 1 + +# We have multilib triage +%if "%{_lib}" == "lib" + %global cpuarch 32 +%else + %global cpuarch 64 %endif %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) @@ -59,87 +130,135 @@ BuildRequires: ant swig ruby java-devel-gcj %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif -#TODO: What if you have Ruby 1.9 as well? +# http://fedoraproject.org/w/index.php?title=The_Road_to_Ruby_1.9 %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')} -# Avoid providing private Python and Perl extension libs +# Don't provide private Python and Perl extension libs %{?filter_setup: %filter_provides_in %{python_sitearch}/.*\.so %{_libdir}/perl5/.*\.so$ %filter_setup } +#TODO: Description on the lib? %description -The GDAL library provides support to handle multiple GIS file formats. +Geospatial Data Abstraction Library (GDAL/OGR) is a cross platform +C++ translator library for raster and vector geospatial data formats. +As a library, it presents a single abstract data model to the calling +application for all supported formats. It also comes with a variety of +useful commandline utilities for data translation and processing. + +It provides the primary data access engine for many applications. +GDAL/OGR is the most widely used geospatial data access library. + %package devel -Summary: Development Libraries for the GDAL file format library +Summary: Development files for the GDAL file format library Group: Development/Libraries + +# Old rpm didn't figure out +%if 0%{?rhel} < 6 Requires: pkgconfig -Requires: libgeotiff-devel -Requires: %{name}%{?_isa} = %{version}-%{release} +%endif + +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-static < 1.9.0-1 %description devel -The GDAL library provides support to handle multiple GIS file formats. +This package contains development files for GDAL. -%package static -Summary: Static Development Libraries for the GDAL file format library -Group: Development/Libraries -%description static -The GDAL library provides support to handle multiple GIS file formats. +%package libs +Summary: GDAL file format library +Group: System Environment/Libraries -%package python -Summary: Python modules for the GDAL file format library -Group: Development/Libraries -Requires: numpy -Requires: %{name}%{?_isa} = %{version}-%{release} +%description libs +This package contains the GDAL file format library. -%description python -The GDAL python modules provides support to handle multiple GIS file formats. - -%package perl -Summary: Perl modules for the GDAL file format library -Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) - -%description perl -The GDAL perl modules provides support to handle multiple GIS file formats. %package ruby Summary: Ruby modules for the GDAL file format library Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%if (0%{?fedora} < 17 || 0%{?rhel}) +Requires: ruby(abi) = 1.8 +%else +Requires: ruby(abi) = 1.9 +%endif %description ruby The GDAL Ruby modules provide support to handle multiple GIS file formats. + %package java Summary: Java modules for the GDAL file format library Group: Development/Libraries -Requires: java -# require maven2 for the poms and depmap frag parent dirs -# these are provided by many JPP packages but that is wrong +Requires: java >= 1:1.6.0 + +# Require maven2 for the poms and depmap frag parent dirs +# Fedora 15 has Maven3 and the package is called maven +# Notice, maven2 is seemingly not a package in EL, but +# directories are provided by ant +%if (0%{?fedora}) +Requires: maven +%else Requires: maven2 +%endif + Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description java -The GDAL java modules provides support to handle multiple GIS file formats. +The GDAL Java modules provide support to handle multiple GIS file formats. + + +%package javadoc +Summary: Javadocs for %{name} +Group: Documentation +Requires: jpackage-utils +BuildArch: noarch + +%description javadoc +This package contains the API documentation for %{name}. + + +%package perl +Summary: Perl modules for the GDAL file format library +Group: Development/Libraries +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description perl +The GDAL Perl modules provide support to handle multiple GIS file formats. + + +%package python +Summary: Python modules for the GDAL file format library +Group: Development/Libraries +Requires: numpy +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description python +The GDAL Python modules provide support to handle multiple GIS file formats. +The package also includes a couple of useful utilities in Python. + %package doc Summary: Documentation for GDAL -Group: Documentation -Requires: %{name} = %{version}-%{release} +Group: Documentation +BuildArch: noarch %description doc -This package contains html and pdf documentation for GDAL. +This package contains HTML and PDF documentation for GDAL. %prep %setup -q -n %{name}-%{version}-fedora +# Unpack tests to the same directory +%setup -q -D -a 1 -n %{name}-%{version}-fedora + # Delete bundled libraries rm -rf frmts/zlib rm -rf frmts/png/libpng @@ -149,195 +268,192 @@ rm -rf frmts/jpeg/libjpeg \ rm -rf frmts/gtiff/libgeotiff \ frmts/gtiff/libtiff -%patch1 -p0 -b .mysql~ -%patch2 -p1 -b .bindir~ -%patch3 -p1 -b .AIS~ -%patch4 -p1 -b .xcompiler~ -%patch5 -p3 -b .mitab~ - -# Only F17 has libpng 1.5 -%if ! (0%{?fedora} < 17 || 0%{?rhel}) -%patch6 -p1 -b .png15~ -%endif - -# Unpack test cases -tar -xzf %{SOURCE1} +%patch8 -p1 -b .java~ +%patch9 -p1 -b .man~ +# Sanitize linebreaks and encoding set +x for f in `find . -type f` ; do - if file $f | grep -q ISO-8859 ; then - set -x - iconv -f ISO-8859-1 -t UTF-8 $f > ${f}.tmp && \ - mv -f ${f}.tmp $f - set +x - fi - if file $f | grep -q CRLF ; then - set -x - sed -i -e 's|\r||g' $f - set +x - fi + if file $f | grep -q ISO-8859 ; then + set -x + iconv -f ISO-8859-1 -t UTF-8 $f > ${f}.tmp && \ + mv -f ${f}.tmp $f + set +x + fi + if file $f | grep -q CRLF ; then + set -x + sed -i -e 's|\r||g' $f + set +x + fi done set -x -# remove junks -find . -name ".cvsignore" -exec rm -rf '{}' \; +for f in ogr/ogrsf_frmts/gpsbabel ogr/ogrsf_frmts/pgdump port apps; do +pushd $f + chmod 644 *.cpp *.h +popd +done -# fix some exec bits -find swig/python/samples -name "*.py" -exec chmod -x '{}' \; +# Build with fPIC to allow Ruby bindings +# Xcompiler should normally achieve that -- http://trac.osgeo.org/gdal/ticket/3978 +# http://trac.osgeo.org/gdal/ticket/1994 +sed -i -e "s/\$(CFLAGS)/$(CFLAGS) -fPIC/g" swig/ruby/RubyMakefile.mk + +# Replace hard-coded library- and include paths +sed -i 's|@LIBTOOL@|%{_bindir}/libtool|g' GDALmake.opt.in +sed -i 's|-L\$with_cfitsio -L\$with_cfitsio/lib -lcfitsio|-lcfitsio|g' configure +sed -i 's|-I\$with_cfitsio -I\$with_cfitsio/include|-I\$with_cfitsio/include/cfitsio|g' configure +sed -i 's|-L\$with_netcdf -L\$with_netcdf/lib -lnetcdf|-lnetcdf|g' configure +sed -i 's|-L\$DODS_LIB -ldap++|-ldap++|g' configure +sed -i 's|-L\$with_ogdi -L\$with_ogdi/lib -logdi|-logdi|g' configure +sed -i 's|-L\$with_jpeg -L\$with_jpeg/lib -ljpeg|-ljpeg|g' configure +sed -i 's|-L\$with_libtiff\/lib -ltiff|-ltiff|g' configure +sed -i 's|-lgeotiff -L$with_geotiff $LIBS|-lgeotiff $LIBS|g' configure +sed -i 's|-L\$with_geotiff\/lib -lgeotiff $LIBS|-lgeotiff $LIBS|g' configure + +# libproj is dlopened; upstream sources point to .so, which is usually not present +# http://trac.osgeo.org/gdal/ticket/3602 +sed -i 's|libproj.so|libproj.so.0|g' ogr/ogrct.cpp + +# Fix Python installation path +sed -i 's|setup.py install|setup.py install --root=%{buildroot}|' swig/python/GNUmakefile + +# Must be corrected for 64 bit architectures other than Intel +#TODO: Query Python? Ticket +sed -i 's|test \"$ARCH\" = \"x86_64\"|test \"$libdir\" = \"/usr/lib64\"|g' configure + +# Install Ruby bindings into the proper place +#TODO: Ticket +sed -i -e 's|^$(INSTALL_DIR):|$(DESTDIR)$(INSTALL_DIR):|' swig/ruby/RubyMakefile.mk +sed -i -e 's|^install: $(INSTALL_DIR)|install: $(DESTDIR)$(INSTALL_DIR)|' swig/ruby/RubyMakefile.mk + +# Adjust check for LibDAP version +#TODO: Ticket +%if %cpuarch == 64 + sed -i 's|with_dods_root/lib|with_dods_root/lib64|' configure +%endif + +# Activate support for JPEGLS +sed -i 's|^#HAVE_CHARLS|HAVE_CHARLS|' GDALmake.opt.in +sed -i 's|#CHARLS_INC = -I/path/to/charls_include|CHARLS_INC = -I%{_includedir}/CharLS|' GDALmake.opt.in +sed -i 's|#CHARLS_LIB = -L/path/to/charls_lib -lCharLS|CHARLS_LIB = -lCharLS|' GDALmake.opt.in + +# Replace default plug-in dir +# http://trac.osgeo.org/gdal/ticket/4444 +%if %cpuarch == 64 + sed -i 's|GDAL_PREFIX "/lib/gdalplugins"|GDAL_PREFIX "/lib64/gdalplugins"|' \ + gcore/gdaldrivermanager.cpp \ + ogr/ogrsf_frmts/generic/ogrsfdriverregistrar.cpp +%endif # Remove man dir, as it blocks a build target. # It obviously slipped into the tarball and is not in Trunk (April 17th, 2011) -rm -rf man - -# Repair check for dap and also Curl (although not obvious here!) -#TODO: Better use dap-config --libs -sed -i 's|-ldap++|-ldap -ldapclient -ldapserver|' configure configure.in - -# fix doxygen for multilib docs -sed -i -e 's|^HTML_FOOTER|HTML_FOOTER = ../../doc/gdal_footer.html\n#HTML_FOOTER = |' swig/perl/Doxyfile -sed -i -e 's|^HTML_FOOTER|HTML_FOOTER = ../../doc/gdal_footer.html\n#HTML_FOOTER = |' frmts/gxf/Doxyfile -sed -i -e 's|^HTML_FOOTER|HTML_FOOTER = ../../doc/gdal_footer.html\n#HTML_FOOTER = |' frmts/sdts/Doxyfile -sed -i -e 's|^HTML_FOOTER|HTML_FOOTER = ../../doc/gdal_footer.html\n#HTML_FOOTER = |' frmts/pcraster/doxygen.cfg -sed -i -e 's|^HTML_FOOTER|HTML_FOOTER = ../../doc/gdal_footer.html\n#HTML_FOOTER = |' frmts/iso8211/Doxyfile - +#rm -rf man %build - -# fix hardcoded issues -sed -i 's|@LIBTOOL@|%{_bindir}/libtool|g' GDALmake.opt.in -sed -i 's|-L\$with_cfitsio -L\$with_cfitsio\/lib -lcfitsio|-lcfitsio|g' configure -sed -i 's|-I\$with_cfitsio|-I\$with_cfitsio\/include\/cfitsio|g' configure -sed -i 's|-L\$with_netcdf -L\$with_netcdf\/lib -lnetcdf|-lnetcdf|g' configure -sed -i 's|-L\$DODS_LIB -ldap++|-ldap++|g' configure -sed -i 's|-L\$with_ogdi -L\$with_ogdi\/lib -logdi|-logdi|g' configure -sed -i 's|-L\$with_jpeg -L\$with_jpeg\/lib -ljpeg|-ljpeg|g' configure -sed -i 's|-L\$with_libtiff\/lib -ltiff|-ltiff|g' configure -sed -i 's|-L\$with_grass\/lib||g' configure -sed -i 's|-lgeotiff -L$with_geotiff $LIBS|-lgeotiff $LIBS|g' configure -sed -i 's|-L\$with_geotiff\/lib -lgeotiff $LIBS|-lgeotiff $LIBS|g' configure -sed -i 's|-lmfhdf -ldf|-L$libdir/hdf -lmfhdf -ldf|g' configure -sed -i 's|-logdi31|-logdi|g' configure -sed -i 's|libproj.so|libproj.so.0|g' ogr/ogrct.cpp - -# Fix python path for ppc64 -#TODO: Überprüfen ob es wirkt -sed -i 's|test \"$ARCH\" = \"x86_64\"|test \"$libdir\" = \"$libdir"|g' configure - -# Install Ruby bindings into the proper place -#TODO: Upstream, as this is useful and does no harm -sed -i -e 's|^$(INSTALL_DIR):|$(DESTDIR)$(INSTALL_DIR):|' swig/ruby/RubyMakefile.mk -sed -i -e 's|^install: $(INSTALL_DIR)|install: $(DESTDIR)$(INSTALL_DIR)|' swig/ruby/RubyMakefile.mk -sed -i -e 's|^INSTALL_DIR := $(RUBY_EXTENSIONS_DIR)/gdal|INSTALL_DIR = $(RUBY_EXTENSIONS_DIR)|' swig/ruby/RubyMakefile.mk - -# Append paths for some libs -export CPPFLAGS="`pkg-config ogdi --cflags`" -export CPPFLAGS="$CPPFLAGS -I%{_includedir}/netcdf-3" -export CPPFLAGS="$CPPFLAGS -I%{_includedir}/netcdf" -export CPPFLAGS="$CPPFLAGS -I%{_includedir}/hdf" +#TODO: Couldn't I have modified that in the prep section? export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libgeotiff" -export CPPFLAGS="$CPPFLAGS `dap-config --cflags`" -export CPPFLAGS="$CPPFLAGS -DH5_USE_16_API" -# code may contain sensible buffer overflows triggered by gcc ssp flag (mustfixupstream). -export CXXFLAGS=`echo %{optflags}|sed -e 's/\-Wp\,-D_FORTIFY_SOURCE\=2 / -fPIC -DPIC /g'` -export CFLAGS=`echo %{optflags}|sed -e 's/\-Wp\,\-D_FORTIFY_SOURCE\=2 / -fPIC -DPIC /g'` +# For future reference: +# epsilon: Stalled review -- https://bugzilla.redhat.com/show_bug.cgi?id=660024 +# webp: Stalled review, some movement lately -- https://bugzilla.redhat.com/show_bug.cgi?id=707389 +# libgta https://bugzilla.redhat.com/show_bug.cgi?id=783778 +# openjpeg 2.0 necessary, 1.4 is in Fedora +# Building without pgeo driver, because it drags in Java -# BSB has legal claims, see PROVENANCE.TXT-fedora -#TODO: msg needs to have PublicDecompWT.zip from EUMETSAT, which is not free %configure \ - --prefix=%{_prefix} \ - --includedir=%{_includedir}/%{name}/ \ + --with-autoload=%{_libdir}/%{name}plugins \ --datadir=%{_datadir}/%{name}/ \ - --with-threads \ - --without-bsb \ - --with-dods-root=%{_libdir} \ - --with-ogdi \ + --includedir=%{_includedir}/%{name}/ \ + --prefix=%{_prefix} \ + --without-bsb \ + --with-armadillo \ + --with-curl \ --with-cfitsio=%{_prefix} \ + --with-dods-root=%{_prefix} \ + --with-expat \ + --with-freexl \ + --with-geos \ --with-geotiff=external \ - --with-libtiff=external \ - --with-libz \ - --with-netcdf \ + --with-gif \ + --with-gta \ --with-hdf4 \ --with-hdf5 \ - --with-geos \ --with-jasper \ - --with-png \ - --with-gif \ - --with-jpeg \ - --with-odbc \ - --with-sqlite3 \ - --with-mysql \ - --with-curl \ - --with-python \ - --with-perl \ - --with-pcraster \ - --with-ruby \ --with-java \ + --with-jpeg \ + --without-jpeg12 \ + --with-liblzma \ + --with-libtiff=external \ + --with-libz \ + --without-mdb \ + --with-mysql \ + --with-netcdf \ + --with-odbc \ + --with-ogdi \ + --without-msg \ + --without-openjpeg \ + --with-pcraster \ + --with-pg \ + --with-png \ + --with-poppler \ + %{spatialite} \ + --with-sqlite3 \ + --with-threads \ --with-xerces \ - --with-xerces-lib='-lxerces-c' \ - --with-xerces-inc=%{_includedir} \ - --with-jpeg12=no \ --enable-shared \ - --with-gdal-ver=%{version}-fedora + --with-ruby \ + --with-perl \ + --with-python -# fixup hardcoded wrong compile flags. -cp GDALmake.opt GDALmake.opt.orig -sed -e 's/ cfitsio / /' \ --e 's/-ldap++/-ldap -ldapclient -ldapserver/' \ --e 's/-L\$(INST_LIB) -lgdal/-lgdal/' \ -GDALmake.opt.orig > GDALmake.opt -rm GDALmake.opt.orig + #--with-rasdaman # 8.3 rasdaman has no -lcompression; doesn't work -# Build with fPIC to allow Ruby bindings -#TODO: Ticket -sed -i -e "s/\$(LD)/g++ -L..\/..\/.libs\/ $RPM_OPT_FLAGS/g" swig/ruby/RubyMakefile.mk -sed -i -e "s/\$(CFLAGS)/$(CFLAGS) -fPIC/g" swig/ruby/RubyMakefile.mk - - -# WARNING !!! -# dont use {?_smp_mflags} it break compile -make +# {?_smp_mflags} doesn't work; Or it does -- who knows! +make %{?_smp_mflags} make man +make docs -# make perl modules, disable makefile generate +# Make Perl modules pushd swig/perl perl Makefile.PL; make; echo > Makefile.PL; popd - # make java modules - pushd swig/java - # fix makefile - sed -i -e 's|include java.opt|\#include java.opt|' GNUmakefile - sed -i -e 's|\$(LD) -shared \$(LDFLAGS) \$(CONFIG_LIBS)|g++ -shared -lgdal -L..\/..\/.libs|g' GNUmakefile - # build java module - make - popd -# remake documentation for multilib issues -# also include many pdf documentation +# Install the Perl modules in the right place +sed -i 's|INSTALLDIRS = site|INSTALLDIRS = vendor|' swig/perl/Makefile_* -for docdir in ./ doc doc/ru doc/br ogr frmts/gxf frmts/pcidsk/sdk frmts/sdts frmts/iso8211 frmts/vrt swig/perl swig/python apps; do - cp -p doc/gdal_footer.html $docdir/footer_local.html +# Don't append installation info to pod +#TODO: What about the pod? +sed -i 's|>> $(DESTINSTALLARCHLIB)\/perllocal.pod|> \/dev\/null|g' swig/perl/Makefile_* + +# Make Java module and documentation +pushd swig/java + make + ./make_doc.sh +popd + +# --------- Documentation ---------- + +# No useful documentation in swig +%global docdirs apps doc doc/br doc/ru ogr ogr/ogrsf_frmts frmts/gxf frmts/iso8211 frmts/pcidsk frmts/sdts frmts/vrt ogr/ogrsf_frmts/dgn/ +for docdir in %{docdirs}; do + # CreateHTML and PDF documentation, if specified pushd $docdir if [ ! -f Doxyfile ]; then doxygen -g else doxygen -u fi - #if [ $docdir == "doc" ]; then - #TODO: Get that working - #sed -i -e 's|^IMAGE_PATH|IMAGE_PATH = doc\n#IMAGE_PATH|' Doxyfile - #fi - sed -i -e 's|^HTML_FOOTER|HTML_FOOTER = footer_local.html\n#HTML_FOOTER |' Doxyfile sed -i -e 's|^GENERATE_LATEX|GENERATE_LATEX = YES\n#GENERATE_LATEX |' Doxyfile sed -i -e 's|^USE_PDFLATEX|USE_PDFLATEX = YES\n#USE_PDFLATEX |' Doxyfile + if [ $docdir == "doc/ru" ]; then sed -i -e 's|^OUTPUT_LANGUAGE|OUTPUT_LANGUAGE = Russian\n#OUTPUT_LANGUAGE |' Doxyfile fi rm -rf latex html doxygen - rm -rf footer_local.html + %if %{build_refman} pushd latex sed -i -e '/rfoot\[/d' -e '/lfoot\[/d' doxygen.sty @@ -353,102 +469,79 @@ done %install rm -rf %{buildroot} -# Fix Python installation path -sed -i 's|setup.py install|setup.py install --root=%{buildroot}|' swig/python/GNUmakefile - -# fix some perl installation issue -sed -i 's|>> $(DESTINSTALLARCHLIB)\/perllocal.pod|> \/dev\/null|g' swig/perl/Makefile_* - - make DESTDIR=%{buildroot} \ - install + install \ + install-man -make DESTDIR=%{buildroot} \ - INST_MAN=%{_mandir} \ - install-man +# Directory for auto-loading plugins +mkdir -p %{buildroot}%{_libdir}/%{name}plugins -# move perl modules in the right path -mkdir -p %{buildroot}%{perl_vendorarch} -mv %{buildroot}%{perl_sitearch}/* %{buildroot}%{perl_vendorarch}/ +#TODO: Don't do that? find %{buildroot}%{perl_vendorarch} -name "*.dox" -exec rm -rf '{}' \; -# fix some exec bits +# Correct permissions +#TODO and potential ticket: Why are the permissions not correct? find %{buildroot}%{perl_vendorarch} -name "*.so" -exec chmod 755 '{}' \; +find %{buildroot}%{perl_vendorarch} -name "*.pm" -exec chmod 644 '{}' \; -# install multilib java modules in the right path +#TODO: JAR files that require JNI shared objects MUST be installed in %{_libdir}/%{name}. The JNI shared objects themselves must also be installed in %{_libdir}/%{name}. +#Java programs that wish to make calls into native libraries do so via the Java Native Interface (JNI). A Java package uses JNI if it contains a .so +#If the JNI-using code calls System.loadLibrary you'll have to patch it to use System.load, passing it the full path to the dynamic shared object. If the package installs a wrapper script you'll need to manually add %{_libdir}/%{name}/ to CLASSPATH. If you are depending on a JNI-using JAR file, you'll need to add it manually -- build-classpath will not find it. touch -r NEWS swig/java/gdal.jar mkdir -p %{buildroot}%{_javadir} cp -p swig/java/gdal.jar \ - %{buildroot}%{_javadir}/%{name}-%{version}.jar + %{buildroot}%{_javadir}/%{name}.jar -# create versionless symlink -ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar - -# Install Maven pom -mkdir -p %{buildroot}%{_mavenpomdir} -install -pm 644 %{SOURCE2} \ - %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom +# Install Maven pom and update version number +install -dm 755 %{buildroot}%{_mavenpomdir} +install -pm 644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom +sed -i 's||%{version}|' %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom # Create depmap fragment %add_to_maven_depmap org.gdal gdal-java-bindings %{version} JPP %{name} +# 775 on the .so? # copy JNI libraries and links, non versioned link needed by JNI -cp -pvl swig/java/.libs/*.so* \ - %{buildroot}%{_libdir} +# What is linked here? +cp -pl swig/java/.libs/*.so* \ + %{buildroot}%{_libdir} chrpath --delete %{buildroot}%{_libdir}/*jni.so* -# install and include all docs -# due TeX-related issues some refman.pdf are not created -rm -rf docs doc/docs-perl +# Install Java API documentation in the designated place +mkdir -p %{buildroot}%{_javadocdir}/%{name} +cp -pr swig/java/java/org %{buildroot}%{_javadocdir}/%{name} -mkdir -p doc/gdal_frmts; find frmts -name "*.html" -exec install -p -m 644 '{}' doc/gdal_frmts/ \; -mkdir -p doc/ogrsf_frmts; find ogr -name "*.html" -exec install -p -m 644 '{}' doc/ogrsf_frmts/ \; -%if %{build_refman} - mkdir -p docs/docs-%{cpuarch}/pdf - pushd docs/docs-%{cpuarch}/pdf; mkdir -p apps br ru en ogr frmts/gxf frmts/sdts frmts/iso8211 frmts/vrt frmts/pcidsk; popd - install -p -m 644 doc/latex/refman.pdf docs/docs-%{cpuarch}/pdf/en - install -p -m 644 frmts/pcidsk/sdk/latex/refman.pdf docs/docs-%{cpuarch}/pdf/frmts/pcidsk - install -p -m 644 frmts/vrt/latex/refman.pdf docs/docs-%{cpuarch}/pdf/frmts/vrt - install -p -m 644 apps/latex/refman.pdf docs/docs-%{cpuarch}/pdf/apps - install -p -m 644 doc/br/latex/refman.pdf docs/docs-%{cpuarch}/pdf/br/ - install -p -m 644 latex/refman.pdf docs/docs-%{cpuarch}/ - install -p -m 644 latex/class*.pdf docs/docs-%{cpuarch}/ - install -p -m 644 doc/ru/latex/refman.pdf docs/docs-%{cpuarch}/pdf/ru/ - install -p -m 644 ogr/latex/refman.pdf docs/docs-%{cpuarch}/pdf/ogr/ - install -p -m 644 ogr/latex/class*.pdf docs/docs-%{cpuarch}/pdf/ogr/ - # Doesn't work at all. Complaints about different nesting level in \pdfendlink - #%ifnarch ppc ppc64 - #install -p -m 644 ogr/ogrsf_frmts/dgn/latex/refman.pdf docs/docs-%{cpuarch}/pdf/ogrsf_frmts/dgn/ - #%endif - install -p -m 644 frmts/gxf/latex/refman.pdf docs/docs-%{cpuarch}/pdf/frmts/gxf/ - install -p -m 644 frmts/sdts/latex/class*.pdf docs/docs-%{cpuarch}/pdf/frmts/sdts/ - # Doesn't work at all. Complaints about different nesting level in \pdfendlink - # Working in GDAL 1.8.0, funny enough! - #%ifnarch ppc ppc64 - #install -p -m 644 frmts/sdts/latex/refman.pdf docs/docs-%{cpuarch}/pdf/frmts/sdts/ - #%endif - install -p -m 644 frmts/iso8211/latex/refman.pdf docs/docs-%{cpuarch}/pdf/frmts/iso8211/ - mkdir -p doc/docs-perl/docs-%{cpuarch}/pdf - install -p -m 644 swig/perl/latex/refman.pdf doc/docs-perl/docs-%{cpuarch}/pdf -%endif -mkdir -p docs/docs-%{cpuarch} -mkdir -p doc/docs-perl/docs-%{cpuarch} -pushd docs/docs-%{cpuarch}/; mkdir -p en/html gdal_frmts ogrsf_frmts br ru; popd -cp -pr html/* docs/docs-%{cpuarch}/ -cp -pr doc/html/* docs/docs-%{cpuarch}/en/html -cp -pr doc/gdal_frmts/* docs/docs-%{cpuarch}/gdal_frmts -cp -pr doc/ogrsf_frmts/* docs/docs-%{cpuarch}/ogrsf_frmts -cp -pr doc/br/html/* docs/docs-%{cpuarch}/br -cp -pr doc/ru/html/* docs/docs-%{cpuarch}/ru -cp -pr swig/perl/html/* doc/docs-perl/docs-%{cpuarch}/ +# Install refmans +for docdir in %{docdirs}; do + pushd $docdir + path=%{_builddir}/%{name}-%{version}-fedora/refman + mkdir -p $path/html/$docdir + cp -r html $path/html/$docdir + + # Install all Refmans + %if %{build_refman} + if [ -f latex/refman.pdf ]; then + mkdir -p $path/pdf/$docdir + cp latex/refman.pdf $path/pdf/$docdir + fi + %endif + popd +done -# Remove installation shell script -rm -rf docs/docs-%{cpuarch}/ru/installdox -rm -rf docs/docs-%{cpuarch}/en/html/installdox +# Install formats documentation +for dir in gdal_frmts ogrsf_frmts; do + mkdir -p $dir + find frmts -name "*.html" -exec install -p -m 644 '{}' $dir \; +done -# install multilib cpl_config.h bz#430894 +#TODO: Header date lost during installation +# Install multilib cpl_config.h bz#430894 install -p -D -m 644 port/cpl_config.h %{buildroot}%{_includedir}/%{name}/cpl_config-%{cpuarch}.h -# create universal multilib cpl_config.h bz#341231 +# Create universal multilib cpl_config.h bz#341231 +# The problem is still there in 1.9. +#TODO: Ticket? + +#>>>>>>>>>>>>> cat > %{buildroot}%{_includedir}/%{name}/cpl_config.h < @@ -462,9 +555,13 @@ cat > %{buildroot}%{_includedir}/%{name}/cpl_config.h <>>>>>>>>>>>> cat > %{name}.pc <>>>>>>>>>>>> cat > %{buildroot}%{_bindir}/%{name}-config < - 1.9.0-1 +- Completely re-work the original spec-file + The major changes are: +- Add a libs sub-package +- Move Python scripts to python sub-package +- Install the documentation in a better way and with less slack +- jar's filename is versionless +- Update the version in the Maven pom automatically +- Add a plugins directory +- Add javadoc package and make the man sub-package noarch +- Support many additional formats +- Drop static sub-package as no other package uses it as BR +- Delete included libs before building +- Drop all patches, switch to a patch for the manpages, patch for JAVA path +- Harmonize the use of buildroot and RPM_BUILD_ROOT +- Introduce testversion macro + +* Thu Feb 19 2012 Volker Fröhlich - 1.7.3-14 +- Require Ruby abi +- Add patch for Ruby 1.9 include dir, back-ported from GDAL 1.9 +- Change version string for gdal-config from -fedora to + +- Revert installation path for Ruby modules, as it proofed wrong +- Use libjpeg-turbo + * Thu Feb 9 2012 Volker Fröhlich - 1.7.3-13 - Rebuild for Ruby 1.9 http://lists.fedoraproject.org/pipermail/ruby-sig/2012-January/000805.html @@ -620,13 +794,13 @@ rm -rf $RPM_BUILD_ROOT - Versioned MODULE_COMPAT_ Requires for Perl (BZ 768265) - Add isa macro to base package Requires - Remove conditional for xerces_c in EL6, as EL6 has xerces_c - even for ppc64 via EPEL + even for ppc64 via EPEL - Remove EL4 conditionals - Replace the python_lib macro definition and install Python bindings to sitearch directory, where they belong - Use correct dap library names for linking - Correct Ruby installation path in the Makefile instead of moving it later -- Use libdir variable in ppc64 Python path +- Use libdir variable in ppc64 Python path - Delete obsolete chmod for Python libraries - Move correction for Doxygen footer to prep section - Delete bundled libraries before building @@ -637,7 +811,7 @@ rm -rf $RPM_BUILD_ROOT - Remove unnecessary defattr - Correct version number in POM - Allow for libpng 1.5 - + * Tue Dec 06 2011 Adam Jackson - 1.7.3-11 - Rebuild for new libpng @@ -652,7 +826,7 @@ rm -rf $RPM_BUILD_ROOT - Use python_lib and ruby_sitearch instead of generating lists - Added man-pages for binaries - Replaced mkdir and install macros -- Removed Python files from main package files section, that +- Removed Python files from main package files section, that effectively already belonged to the Python sub-package * Thu Apr 11 2011 Volker Fröhlich - 1.7.3-8 @@ -675,7 +849,7 @@ rm -rf $RPM_BUILD_ROOT - Added -p to post and postun - Remove private-shared-object-provides for Python and Perl - Remove installdox scripts -- gcc 4.6 doesn't accept -Xcompiler +- gcc 4.6 doesn't accept -Xcompiler * Thu Mar 10 2011 Kalev Lember - 1.7.3-4 - Rebuilt with xerces-c 3.1 @@ -707,7 +881,7 @@ rm -rf $RPM_BUILD_ROOT - Add Java JNI libraries * Sat Aug 14 2010 Mathieu Baudier - 1.7.2-5_0 -- Rebuild for EL GIS, based on work contributed by Nikolaos Hatzopoulos and Peter Hopfgartner +- Rebuild for EL GIS, based on work contributed by Nikolaos Hatzopoulos and Peter Hopfgartner - Use vanilla sources * Wed Jul 21 2010 David Malcolm - 1.7.2-5 @@ -986,7 +1160,7 @@ rm -rf $RPM_BUILD_ROOT * Tue Feb 27 2007 Balint Cristian 1.4.0-9 - repack tarball for fedora, explain changes in PROVENANCE-fedora, license should be clean now according to PROVENANCE-* files -- require ogdi since is aviable now +- require ogdi since is available now - drop nogeotiff patch, in -fedora tarball geotiff is removed - man page triage over subpackages - exclude python byte compiled objects diff --git a/sources b/sources index 9d17123..be415a5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -c2bf1c67ff6db27e2238c6c3d5feac29 gdal-1.7.3-fedora.tar.gz -0b12bd95c7fb78a6f33a922c24d1b40d gdalautotest-1.7.3.tar.gz +dd3e2da0d7a2915ded972cbdd76f0b10 gdal-1.9.0-fedora.tar.gz +0d1e425b45465f64f6d1f32790d8bea0 gdalautotest-1.9.0.tar.gz