auto-import gdal-1.4.0-10 on branch devel from gdal-1.4.0-10.src.rpm

This commit is contained in:
Balint Cristian 2007-03-13 09:15:39 +00:00
parent 710616c4a1
commit 86f8705fed
4 changed files with 691 additions and 0 deletions

View File

@ -0,0 +1 @@
gdal-1.4.0-fedora.tar.gz

386
gdal-buildfix.patch Normal file
View File

@ -0,0 +1,386 @@
diff -Nru gdal-1.4.0-fedora/configure gdal-1.4.0-fedora.work/configure
--- gdal-1.4.0-fedora/configure 2006-12-29 20:17:00.000000000 +0100
+++ gdal-1.4.0-fedora.work/configure 2007-02-27 23:12:00.000000000 +0100
@@ -23371,6 +23371,12 @@
echo "using internal GeoTIFF code."
+elif test "$with_geotiff" = "disabled" ; then
+
+ GEOTIFF_SETTING=disabled
+
+ echo "disabled GeoTIFF code."
+
else
GEOTIFF_SETTING=external
diff -Nru gdal-1.4.0-fedora/configure.in gdal-1.4.0-fedora.work/configure.in
--- gdal-1.4.0-fedora/configure.in 2006-12-29 20:17:00.000000000 +0100
+++ gdal-1.4.0-fedora.work/configure.in 2007-02-27 23:12:00.000000000 +0100
@@ -612,6 +612,12 @@
echo "using internal GeoTIFF code."
+elif test "$with_geotiff" = "disabled" ; then
+
+ GEOTIFF_SETTING=disabled
+
+ echo "disabled GeoTIFF code."
+
else
GEOTIFF_SETTING=external
diff -Nru gdal-1.4.0-fedora/frmts/formats_list.html gdal-1.4.0-fedora.work/frmts/formats_list.html
--- gdal-1.4.0-fedora/frmts/formats_list.html 2006-11-02 03:40:47.000000000 +0100
+++ gdal-1.4.0-fedora.work/frmts/formats_list.html 2007-02-27 23:20:18.000000000 +0100
@@ -157,13 +157,6 @@
</td><td> --
</td></tr>
-<tr><td> <a href="frmt_gtiff.html">TIFF / GeoTIFF (.tif)</a>
-</td><td> GTiff
-</td><td> Yes
-</td><td> Yes
-</td><td> 4GiB
-</td></tr>
-
<tr><td> <a href="frmt_hdf4.html">Hierarchical Data Format Release 4 (HDF4)</a>
</td><td> HDF4
</td><td> Yes
@@ -178,13 +171,6 @@
</td><td> 2GiB
</td></tr>
-<tr><td> <a href="frmt_hfa.html">Erdas Imagine (.img)</a>
-</td><td> HFA
-</td><td> Yes
-</td><td> Yes
-</td><td> No limits<sup><a href="#footnote2">2</a></sup>
-</td></tr>
-
<tr><td> <a href="frmt_mff2.html">Vexcel MFF2</a>
</td><td> HKV
</td><td> Yes
@@ -440,12 +426,6 @@
</p>
<p>
-<a name="#footnote2"><sup>2</sup>ERDAS Imagine has different file format for
- large files, where 32-bit pointers cannot be used. Look for details
- <a href="frmt_hfa.html">here</a>.
-</p>
-
-<p>
$Id: formats_list.html,v 1.36 2006/11/02 02:40:47 fwarmerdam Exp $
</p>
diff -Nru gdal-1.4.0-fedora/frmts/gdalallregister.cpp gdal-1.4.0-fedora.work/frmts/gdalallregister.cpp
--- gdal-1.4.0-fedora/frmts/gdalallregister.cpp 2006-11-13 19:39:46.000000000 +0100
+++ gdal-1.4.0-fedora.work/frmts/gdalallregister.cpp 2007-02-27 23:19:51.000000000 +0100
@@ -177,10 +177,6 @@
GDALRegister_NITF();
#endif
-#ifdef FRMT_hfa
- GDALRegister_HFA();
-#endif
-
#ifdef FRMT_ceos2
GDALRegister_SAR_CEOS();
#endif
diff -Nru gdal-1.4.0-fedora/frmts/makefile.vc gdal-1.4.0-fedora.work/frmts/makefile.vc
--- gdal-1.4.0-fedora/frmts/makefile.vc 2006-11-02 04:12:45.000000000 +0100
+++ gdal-1.4.0-fedora.work/frmts/makefile.vc 2007-02-27 23:19:46.000000000 +0100
@@ -1,7 +1,7 @@
GDAL_ROOT = ..
-EXTRAFLAGS = -DFRMT_ceos -DFRMT_aigrid -DFRMT_elas -DFRMT_hfa -DFRMT_gtiff\
+EXTRAFLAGS = -DFRMT_ceos -DFRMT_aigrid -DFRMT_elas \
-DFRMT_sdts -DFRMT_raw -DFRMT_gxf -DFRMT_ceos2 -DFRMT_png \
-DFRMT_dted -DFRMT_mem -DFRMT_jdem -DFRMT_gif \
-DFRMT_envisat -DFRMT_aaigrid -DFRMT_usgsdem -DFRMT_l1b \
diff -Nru gdal-1.4.0-fedora/frmts/mrsid/makefile.vc gdal-1.4.0-fedora.work/frmts/mrsid/makefile.vc
--- gdal-1.4.0-fedora/frmts/mrsid/makefile.vc 2006-09-19 20:30:38.000000000 +0200
+++ gdal-1.4.0-fedora.work/frmts/mrsid/makefile.vc 2007-02-27 23:12:00.000000000 +0100
@@ -1,7 +1,7 @@
OBJ = mrsiddataset.obj
-EXTRAFLAGS = $(MRSID_INCLUDE) -I..\gtiff\libgeotiff $(MRSID_FLAGS)
+EXTRAFLAGS = $(MRSID_INCLUDE) $(MRSID_FLAGS)
GDAL_ROOT = ..\..
diff -Nru gdal-1.4.0-fedora/gcore/gdaldefaultoverviews.cpp gdal-1.4.0-fedora.work/gcore/gdaldefaultoverviews.cpp
--- gdal-1.4.0-fedora/gcore/gdaldefaultoverviews.cpp 2006-11-28 13:57:51.000000000 +0100
+++ gdal-1.4.0-fedora.work/gcore/gdaldefaultoverviews.cpp 2007-02-27 23:56:09.000000000 +0100
@@ -388,31 +388,6 @@
/* produce the imagery. */
/* -------------------------------------------------------------------- */
-#ifndef WIN32CE
-
- if( bOvrIsAux )
- {
- eErr = HFAAuxBuildOverviews( osOvrFilename, poDS, &poODS,
- nBands, panBandList,
- nNewOverviews, panNewOverviewList,
- pszResampling,
- pfnProgress, pProgressData );
-
- int j;
-
- for( j = 0; j < nOverviews; j++ )
- {
- if( panOverviewList[j] > 0 )
- panOverviewList[j] *= -1;
- }
- }
-
-/* -------------------------------------------------------------------- */
-/* Build new overviews - TIFF. Close TIFF files while we */
-/* operate on it. */
-/* -------------------------------------------------------------------- */
- else
-#endif /* WIN32CE */
{
if( poODS != NULL )
{
@@ -420,10 +395,6 @@
poODS = NULL;
}
- eErr = GTIFFBuildOverviews( osOvrFilename, nBands, pahBands,
- nNewOverviews, panNewOverviewList,
- pszResampling, pfnProgress, pProgressData );
-
if( eErr == CE_None )
{
poODS = (GDALDataset *) GDALOpen( osOvrFilename, GA_Update );
diff -Nru gdal-1.4.0-fedora/gcore/gdal_frmts.h gdal-1.4.0-fedora.work/gcore/gdal_frmts.h
--- gdal-1.4.0-fedora/gcore/gdal_frmts.h 2006-11-12 20:59:30.000000000 +0100
+++ gdal-1.4.0-fedora.work/gcore/gdal_frmts.h 2007-02-27 23:23:45.000000000 +0100
@@ -108,10 +108,8 @@
CPL_C_START
void CPL_DLL GDALRegister_GDB(void);
-void CPL_DLL GDALRegister_GTiff(void);
void CPL_DLL GDALRegister_GXF(void);
void CPL_DLL GDALRegister_OGDI(void);
-void CPL_DLL GDALRegister_HFA(void);
void CPL_DLL GDALRegister_AAIGrid(void);
void CPL_DLL GDALRegister_AIGrid(void);
void CPL_DLL GDALRegister_AIGrid2(void);
diff -Nru gdal-1.4.0-fedora/gcore/gdaljp2metadata.cpp gdal-1.4.0-fedora.work/gcore/gdaljp2metadata.cpp
--- gdal-1.4.0-fedora/gcore/gdaljp2metadata.cpp 2006-07-21 17:23:01.000000000 +0200
+++ gdal-1.4.0-fedora.work/gcore/gdaljp2metadata.cpp 2007-02-27 23:12:00.000000000 +0100
@@ -85,13 +85,13 @@
0xA7,0xAE,0xD6,0x8E,0x34,0x45,0x18,0x09 };
CPL_C_START
-CPLErr CPL_DLL GTIFMemBufFromWkt( const char *pszWKT,
+/*CPLErr CPL_DLL GTIFMemBufFromWkt( const char *pszWKT,
const double *padfGeoTransform,
int nGCPCount, const GDAL_GCP *pasGCPList,
int *pnSize, unsigned char **ppabyBuffer );
CPLErr CPL_DLL GTIFWktFromMemBuf( int nSize, unsigned char *pabyBuffer,
char **ppszWKT, double *padfGeoTransform,
- int *pnGCPCount, GDAL_GCP **ppasGCPList );
+ int *pnGCPCount, GDAL_GCP **ppasGCPList );*/
CPL_C_END
/************************************************************************/
@@ -336,13 +336,13 @@
/* -------------------------------------------------------------------- */
int bSuccess = TRUE;
- if( GTIFWktFromMemBuf( nGeoTIFFSize, pabyGeoTIFFData,
+/* if( GTIFWktFromMemBuf( nGeoTIFFSize, pabyGeoTIFFData,
&pszProjection, adfGeoTransform,
&nGCPCount, &pasGCPList ) != CE_None )
{
bSuccess = FALSE;
}
-
+*/
if( pszProjection == NULL || strlen(pszProjection) == 0 )
bSuccess = FALSE;
@@ -764,9 +764,10 @@
int nGTBufSize = 0;
unsigned char *pabyGTBuf = NULL;
- if( GTIFMemBufFromWkt( pszProjection, adfGeoTransform,
+/* if( GTIFMemBufFromWkt( pszProjection, adfGeoTransform,
nGCPCount, pasGCPList,
&nGTBufSize, &pabyGTBuf ) != CE_None )
+*/
return NULL;
if( nGTBufSize == 0 )
diff -Nru gdal-1.4.0-fedora/gcore/gdal_priv.h gdal-1.4.0-fedora.work/gcore/gdal_priv.h
--- gdal-1.4.0-fedora/gcore/gdal_priv.h 2006-11-28 13:56:53.000000000 +0100
+++ gdal-1.4.0-fedora.work/gcore/gdal_priv.h 2007-02-27 23:55:04.000000000 +0100
@@ -700,26 +700,6 @@
CPL_C_START
-#ifndef WIN32CE
-
-CPLErr CPL_DLL
-HFAAuxBuildOverviews( const char *pszOvrFilename, GDALDataset *poParentDS,
- GDALDataset **ppoDS,
- int nBands, int *panBandList,
- int nNewOverviews, int *panNewOverviewList,
- const char *pszResampling,
- GDALProgressFunc pfnProgress,
- void *pProgressData );
-
-#endif /* WIN32CE */
-
-CPLErr CPL_DLL
-GTIFFBuildOverviews( const char * pszFilename,
- int nBands, GDALRasterBand **papoBandList,
- int nOverviews, int * panOverviewList,
- const char * pszResampling,
- GDALProgressFunc pfnProgress, void * pProgressData );
-
CPLErr CPL_DLL
GDALDefaultBuildOverviews( GDALDataset *hSrcDS, const char * pszBasename,
const char * pszResampling,
diff -Nru gdal-1.4.0-fedora/GDALmake.opt.in gdal-1.4.0-fedora.work/GDALmake.opt.in
--- gdal-1.4.0-fedora/GDALmake.opt.in 2006-12-05 03:18:11.000000000 +0100
+++ gdal-1.4.0-fedora.work/GDALmake.opt.in 2007-02-27 23:19:12.000000000 +0100
@@ -311,7 +311,7 @@
# and their uppercase form should be the format portion of the
# format registration entry point. eg. gdb -> GDALRegister_GDB().
#
-GDAL_FORMATS = gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm \
+GDAL_FORMATS = gxf aigrid aaigrid ceos ceos2 iso8211 xpm \
sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b \
nitf bmp pcidsk airsar rs2 ilwis rmf rik leveller sgi \
idrisi \
diff -Nru gdal-1.4.0-fedora/ogr/Makefile gdal-1.4.0-fedora.work/ogr/Makefile
--- gdal-1.4.0-fedora/ogr/Makefile 2006-11-18 21:37:43.000000000 +0100
+++ gdal-1.4.0-fedora.work/ogr/Makefile 2007-02-27 23:12:00.000000000 +0100
@@ -2,7 +2,7 @@
LINKFLAGS = /Zi /MTd
EXTRAFLAGS = -I$(MSDASDK)\inc \
-I"$(VCDIR)\ATL\Include" -DWIN32 \
- -I. -Iogrsf_frmts -I..\frmts\gtiff\libgeotiff \
+ -I. -Iogrsf_frmts \
$(PROJ_FLAGS) $(PROJ_INCLUDE) $(GEOS_CFLAGS)
GDAL_ROOT = ..
diff -Nru gdal-1.4.0-fedora/ogr/ogrsf_frmts/generic/ogrregisterall.cpp gdal-1.4.0-fedora.work/ogr/ogrsf_frmts/generic/ogrregisterall.cpp
--- gdal-1.4.0-fedora/ogr/ogrsf_frmts/generic/ogrregisterall.cpp 2006-11-28 16:34:41.000000000 +0100
+++ gdal-1.4.0-fedora.work/ogr/ogrsf_frmts/generic/ogrregisterall.cpp 2007-02-27 23:54:17.000000000 +0100
@@ -160,9 +160,6 @@
#ifdef S57_ENABLED
RegisterOGRS57();
#endif
-#ifdef DGN_ENABLED
- RegisterOGRDGN();
-#endif
#ifdef VRT_ENABLED
RegisterOGRVRT();
#endif
@@ -184,10 +181,6 @@
#ifdef KML_ENABLED
RegisterOGRKML();
#endif
-#ifdef ILI_ENABLED
- RegisterOGRILI1();
- RegisterOGRILI2();
-#endif
#ifdef SQLITE_ENABLED
RegisterOGRSQLite();
#endif
diff -Nru gdal-1.4.0-fedora/ogr/ogrsf_frmts/GNUmakefile gdal-1.4.0-fedora.work/ogr/ogrsf_frmts/GNUmakefile
--- gdal-1.4.0-fedora/ogr/ogrsf_frmts/GNUmakefile 2006-11-28 16:34:41.000000000 +0100
+++ gdal-1.4.0-fedora.work/ogr/ogrsf_frmts/GNUmakefile 2007-02-27 23:46:34.000000000 +0100
@@ -1,7 +1,7 @@
include ../../GDALmake.opt
-SUBDIRS-yes := generic shape ntf sdts tiger s57 mitab dgn \
+SUBDIRS-yes := generic shape ntf sdts tiger s57 mitab \
gml kml avc rec mem vrt csv
SUBDIRS-$(HAVE_OGDI) += ogdi
SUBDIRS-$(HAVE_OCI) += oci
@@ -12,7 +12,6 @@
SUBDIRS-$(ODBC_SETTING) += odbc pgeo
SUBDIRS-$(HAVE_SQLITE) += sqlite
SUBDIRS-$(HAVE_GRASS) += grass
-SUBDIRS-$(HAVE_XERCES) += ili
SUBDIRS-$(HAVE_DWGDIRECT) += dxfdwg
SUBDIRS-$(HAVE_SDE) += sde
SUBDIRS-$(HAVE_IDB) += idb
diff -Nru gdal-1.4.0-fedora/ogr/ogrsf_frmts/Makefile gdal-1.4.0-fedora.work/ogr/ogrsf_frmts/Makefile
--- gdal-1.4.0-fedora/ogr/ogrsf_frmts/Makefile 2006-11-28 17:19:47.000000000 +0100
+++ gdal-1.4.0-fedora.work/ogr/ogrsf_frmts/Makefile 2007-02-27 23:46:48.000000000 +0100
@@ -1,6 +1,6 @@
GDAL_ROOT = ..\..
-DIRLIST = generic shape ntf sdts tiger s57 dgn mitab gml kml avc \
+DIRLIST = generic shape ntf sdts tiger s57 mitab gml kml avc \
rec mem vrt csv \
$(OGDIDIR) $(FMEDIR) $(OCIDIR) $(PG_DIR) $(DWGDIR) \
$(ODBCDIR) $(SQLITE_DIR) $(MYSQL_DIR) $(ILI_DIR) \
@@ -53,11 +53,6 @@
MYSQL_OBJ = mysql\*.obj
!ENDIF
-!IFDEF ILI_ENABLED
-ILI_DIR = ili
-ILI_OBJ = ili\*.obj ili\iom\*.obj
-!ENDIF
-
!IFDEF INFORMIXDIR
IDB_DIR = idb
IDB_OBJ = idb\*.obj
@@ -71,7 +66,7 @@
lib /out:ogrsf_frmts.lib generic\*.obj shape\*.obj ntf\*.obj \
sdts\*.obj s57\*.obj tiger\*.obj gml\*.obj \
- mitab\*.obj dgn\*.obj avc\*.obj mem\*.obj \
+ mitab\*.obj avc\*.obj mem\*.obj \
vrt\*.obj csv\*.obj rec\*.obj kml\*.obj \
$(OGDIOBJ) $(ODBCOBJ) $(SQLITE_OBJ) \
$(FMEOBJ) $(OCIOBJ) $(PG_OBJ) $(MYSQL_OBJ) \
diff -Nru gdal-1.4.0-fedora/ogr/ogrsf_frmts/ogr_formats.html gdal-1.4.0-fedora.work/ogr/ogrsf_frmts/ogr_formats.html
--- gdal-1.4.0-fedora/ogr/ogrsf_frmts/ogr_formats.html 2006-12-19 04:40:52.000000000 +0100
+++ gdal-1.4.0-fedora.work/ogr/ogrsf_frmts/ogr_formats.html 2007-02-27 23:37:55.000000000 +0100
@@ -85,11 +85,6 @@
</td><td> Yes
</td></tr>
-<tr><td> <a href="drv_dgn.html">Microstation DGN</a>
-</td><td> Yes
-</td><td> No
-</td></tr>
-
<tr><td> <a href="drv_mysql.html">MySQL</a>
</td><td> No
</td><td> No
diff -Nru gdal-1.4.0-fedora/ogr/ogrsf_frmts/ogrsf_frmts.h gdal-1.4.0-fedora.work/ogr/ogrsf_frmts/ogrsf_frmts.h
--- gdal-1.4.0-fedora/ogr/ogrsf_frmts/ogrsf_frmts.h 2006-12-13 19:24:45.000000000 +0100
+++ gdal-1.4.0-fedora.work/ogr/ogrsf_frmts/ogrsf_frmts.h 2007-02-27 23:54:11.000000000 +0100
@@ -374,7 +374,6 @@
void CPL_DLL RegisterOGRPG();
void CPL_DLL RegisterOGRMySQL();
void CPL_DLL RegisterOGROCI();
-void CPL_DLL RegisterOGRDGN();
void CPL_DLL RegisterOGRGML();
void CPL_DLL RegisterOGRKML();
void CPL_DLL RegisterOGRAVCBin();
@@ -385,8 +384,6 @@
void CPL_DLL RegisterOGRDODS();
void CPL_DLL RegisterOGRSQLite();
void CPL_DLL RegisterOGRCSV();
-void CPL_DLL RegisterOGRILI1();
-void CPL_DLL RegisterOGRILI2();
void CPL_DLL RegisterOGRGRASS();
void CPL_DLL RegisterOGRPGeo();
void CPL_DLL RegisterOGRDXFDWG();

303
gdal.spec Normal file
View File

@ -0,0 +1,303 @@
Name: gdal
Version: 1.4.0
Release: 10%{?dist}
Summary: GIS file format library
Group: System Environment/Libraries
License: MIT
URL: http://gdal.maptools.org
Source: %{name}-%{version}-fedora.tar.gz
Patch0: %{name}-buildfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libtool swig
BuildRequires: doxygen tetex-latex ghostscript
BuildRequires: libpng-devel libungif-devel libjpeg-devel libtiff-devel
BuildRequires: unixODBC-devel mysql-devel sqlite-devel postgresql-devel zlib-devel
BuildRequires: proj-devel geos-devel netcdf-devel hdf5-devel ogdi-devel
BuildRequires: jasper-devel cfitsio-devel hdf-devel libdap-devel librx-devel
BuildRequires: python-devel >= 2.4 perl-devel >= 5.8 xerces-c-devel
%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
%description
The GDAL library provides support to handle multiple GIS file formats.
%package devel
Summary: Development Libraries for the GDAL file format library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The GDAL library provides support to handle multiple GIS file formats.
%package python
Summary: Python modules for the GDAL file format library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%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} = %{version}-%{release}
%description perl
The GDAL perl modules provides support to handle multiple GIS file formats.
%prep
%setup -q -n %{name}-%{version}-fedora
%patch0 -p1 -b .buildfix
# fix wrongly encoded files from tarball
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
done
set -x
# remove junks
find . -name ".cvsignore" -exec rm -rf '{}' \;
# fix some exec bits
chmod -x alg/gdal_tps.cpp
chmod -x frmts/jpeg/gdalexif.h
chmod -x ogr/ogrsf_frmts/ogdi/ogrogdi.h
chmod -x ogr/ogrsf_frmts/ogdi/ogrogdilayer.cpp
chmod -x ogr/ogrsf_frmts/ogdi/ogrogdidatasource.cpp
chmod -x ogr/ogrsf_frmts/ogdi/ogrogdidriver.cpp
%build
# fix hardcoded issues with cfitso and ogdi
sed -i 's|-I\$with_cfitsio|-I\$with_cfitsio\/include\/cfitsio|g' configure
sed -i 's|-logdi31|-logdi|g' configure
# append some path for few libs
export CPPFLAGS="`pkg-config ogdi --cflags`"
export CPPFLAGS=$CPPFLAGS' -I%{_includedir}/netcdf-3'
export CPPFLAGS="$CPPFLAGS -I%{_includedir}/hdf"
export CPPFLAGS="$CPPFLAGS `dap-config --cflags`"
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS='-L%{_libdir}/netcdf-3 -L%{_libdir}/hdf'
%configure \
--prefix=%{_prefix} \
--includedir=%{_includedir}/%{name}/ \
--with-threads \
--with-dods-root=%{_libdir} \
--with-ogdi=`ogdi-config --libdir` \
--with-cfitsio=%{_prefix} \
--with-geotiff=disabled \
--with-tiff=external \
--with-libtiff=external \
--with-libz \
--with-netcdf \
--with-hdf4 \
--with-hdf5 \
--with-geos \
--with-jasper \
--with-png \
--with-gif \
--with-jpeg \
--with-odbc \
--with-sqlite \
--with-mysql \
--with-curl \
--with-python \
--with-perl \
--with-xerces \
--with-xerces-lib='-lxerces-c -L%{_libdir} -L%{_libdir}/hdf -L%{_libdir}/netcdf-3' \
--with-xerces-inc=%{_includedir} \
--without-pcraster \
--without-grass \
--without-libgrass \
--enable-shared \
--disable-static
# fixup hardcoded wrong compile flags.
cp GDALmake.opt GDALmake.opt.orig
sed -e "s/^CFLAGS.*$/CFLAGS=$CFLAGS/" \
-e "s/^CXXFLAGS.*$/CXXFLAGS=$CXXFLAGS/" \
-e "s/^FFLAGS.*$/FFLAGS=$FFLAGS/" \
-e "s/ cfitsio / /" \
-e "s/-ldap++/-ldap -ldapclient -ldapserver \
-L\/usr\/lib\/netcdf-3 -L\/usr\/lib\/hdf \
-L\/usr\/lib64\/netcdf-3 -L\/usr\/lib64\/hdf/" \
GDALmake.opt.orig > GDALmake.opt
rm GDALmake.opt.orig
# fixup non-existent lookup dir
mkdir -p external/lib
mkdir -p external/include
# WARNING !!!
# dont use {?_smp_mflags} it break compile
# use external libtool to avoid hardcoded rpath in libs
make LIBTOOL=/usr/bin/libtool
make docs
# make perl modules, disable makefile generate
pushd swig/perl;
perl Makefile.PL; make;
echo > Makefile.PL;
popd
%install
rm -rf $RPM_BUILD_ROOT
# fix some perl instalation issue
sed -i 's|>> $(DESTINSTALLARCHLIB)\/perllocal.pod|> \/dev\/null|g' swig/perl/Makefile_*
make \
INST_PREFIX=%{buildroot} \
INST_BIN=%{buildroot}%{_bindir} \
INST_LIB=%{buildroot}%{_libdir} \
INST_INCLUDE=%{buildroot}%{_includedir}/%{name} \
INST_DATA=%{buildroot}%{_datadir}/%{name} \
INST_MAN=%{buildroot}%{_mandir} \
INST_PYMOD=%{buildroot}%{python_sitearch} \
PERL_INSTALL_ROOT=%{buildroot} \
install
# move perl modules in the right path
mkdir -p %{buildroot}%{perl_vendorarch}
mv %{buildroot}%{_libdir}/Geo %{buildroot}%{perl_vendorarch}/
rm -rf %{buildroot}%{perl_vendorarch}/Geo/GDAL
mv %{buildroot}%{perl_sitearch}/auto/Geo/* %{buildroot}%{perl_vendorarch}/Geo/
rm -rf %{buildroot}%{_libdir}/perl5/site_perl %{buildroot}/auto %{buildroot}%{perl_sitelib}
# fix some exec bits
find %{buildroot}%{perl_vendorarch} -name "*.so" -exec chmod 755 '{}' \;
chmod -x pymod/samples/*
# build and include more docs
mkdir -p doc/frmts; find frmts -name "*.html" -exec install -m 644 '{}' doc/frmts/ \;
mkdir -p doc/ogrsf_frmts; find ogr/ogrsf_frmts -name "*.html" -exec install -m 644 '{}' doc/ogrsf_frmts \;
pushd doc; doxygen index.dox; popd
pushd rfc; doxygen *.dox; popd
pushd rfc/latex; make refman.pdf; popd
pushd ogr/ogrsf_frmts; doxygen *.dox; popd
pushd ogr/ogrsf_frmts/latex; make refman.pdf; popd
pushd swig/perl; doxygen; popd
pushd swig/perl/latex; make refman.pdf; popd
# cleanup junks
for junk in {*.a,*.la,*.bs,.exists,.packlist,.cvsignore} ; do
find ${RPM_BUILD_ROOT} -name "$junk" -exec rm -rf '{}' \;
done
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc NEWS PROVENANCE.TXT-mainstream PROVENANCE.TXT-fedora COMMITERS
%doc doc/frmts doc/ogrsf_frmts doc/html
%{_bindir}/gdal_contour
%{_bindir}/gdal_rasterize
%{_bindir}/gdal_translate
%{_bindir}/gdaladdo
%{_bindir}/gdalinfo
%{_bindir}/gdaltindex
%{_bindir}/gdalwarp
%{_bindir}/ogr*
%{_libdir}/*.so.*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_mandir}/man1/gdaladdo.1.gz
%{_mandir}/man1/gdalinfo.1.gz
%{_mandir}/man1/gdaltindex.1.gz
%{_mandir}/man1/gdalwarp.1.gz
%{_mandir}/man1/gdal_contour.1.gz
%{_mandir}/man1/gdal_rasterize.1.gz
%{_mandir}/man1/gdal_translate.1.gz
%{_mandir}/man1/gdal_utilities.1.gz
%{_mandir}/man1/ogr*.1.gz
%files devel
%defattr(-,root,root,-)
%doc html ogr/html rfc/html rfc/latex/refman.pdf
%doc ogr/wcts/html ogr/ogrsf_frmts/html
%doc ogr/ogrsf_frmts/latex/refman.pdf
%{_bindir}/%{name}-config
%{_includedir}/%{name}/*.h
%{_libdir}/*.so
%{_mandir}/man1/%{name}-config*
%files python
%defattr(-,root,root,-)
%doc pymod/samples
%exclude %{_bindir}/*.py?
%attr(0755,root,root) %{_bindir}/*.py
%exclude %{python_sitearch}/*.la
%{python_sitearch}/*
%{_mandir}/man1/pct2rgb.1.gz
%{_mandir}/man1/rgb2pct.1.gz
%{_mandir}/man1/gdal_merge.1.gz
%files perl
%defattr(-,root,root,-)
%doc swig/perl/html swig/perl/latex/refman.pdf swig/perl/README
%{perl_vendorarch}/*
%changelog
* Thu Mar 1 2007 Balint Cristian <cbalint@redhat.com> 1.4.0-10
- fix mock build
- require perl-devel
* Tue Feb 27 2007 Balint Cristian <cbalint@redhat.com> 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
- drop nogeotiff patch, in -fedora tarball geotiff is removed
- man page triage over subpackages
- exclude python byte compiled objects
- fix some source C file exec bits
* Sat Feb 24 2007 Balint Cristian <cbalint@redhat.com> 1.4.0-8
- fix more things in spec
- include more docs
* Wed Feb 21 2007 Balint Cristian <cbalint@redhat.com> 1.4.0-7
- libtool in requirement list for build
* Wed Feb 21 2007 Balint Cristian <cbalint@redhat.com> 1.4.0-6
- use external libtool to avoid rpath usage
- include more docs
* Mon Feb 12 2007 Balint Cristian <cbalint@redhat.com> 1.4.0-5
- use rm -rf for removal of dirs.
- fix require lists
* Mon Feb 12 2007 Balint Cristian <cbalint@redhat.com> 1.4.0-4
- fix doxygen buildreq
- make sure r-path is fine.
* Sat Feb 10 2007 Balint Cristian <cbalint@redhat.com> 1.4.0-3
- disable now ogdi (pending ogdi submission).
* Sat Feb 10 2007 Balint Cristian <cbalint@redhat.com> 1.4.0-2
- more fixups for lib paths
* Fri Feb 09 2007 Balint Cristian <cbalint@redhat.com> 1.4.0-1
- first pack for fedora extras
- disable geotiff (untill license sorted out)
- enable all options aviable from extras
- pack perl and python modules
- kill r-path from libs
- pack all docs posible

View File

@ -0,0 +1 @@
757ea87048931beb4d1b068e2835732c gdal-1.4.0-fedora.tar.gz