| 1 |
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
|---|
| 2 |
|
|---|
| 3 |
Summary: A translator library for raster geospatial data formats |
|---|
| 4 |
Name: gdal |
|---|
| 5 |
Version: 1.3.0 |
|---|
| 6 |
Release: 2 |
|---|
| 7 |
URL: http://gdal.maptools.org/ |
|---|
| 8 |
Source: gdal-%{version}.tar.gz |
|---|
| 9 |
Patch0: gdal-install.patch |
|---|
| 10 |
Patch1: gdal-ldflags.patch |
|---|
| 11 |
License: MIT |
|---|
| 12 |
Group: System Environment/Libraries |
|---|
| 13 |
|
|---|
| 14 |
BuildRequires: proj-devel, python-devel, libjpeg-devel |
|---|
| 15 |
BuildRequires: shapelib-devel, libungif-devel, zlib-devel, libpng-devel |
|---|
| 16 |
BuildRequires: postgresql-devel |
|---|
| 17 |
BuildRequires: netcdf-devel |
|---|
| 18 |
BuildRequires: hdf5-devel, hdf-devel |
|---|
| 19 |
# This can be included later when geos is available |
|---|
| 20 |
#BuildRequires: geos-devel |
|---|
| 21 |
# FC2 bug: unixODBC-devel requires libtool-libs |
|---|
| 22 |
BuildRequires: unixODBC-devel libtool-libs |
|---|
| 23 |
BuildRequires: sqlite-devel >= 3.0.0 |
|---|
| 24 |
BuildRequires: mysql-devel |
|---|
| 25 |
BuildRequires: doxygen |
|---|
| 26 |
|
|---|
| 27 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
|---|
| 28 |
|
|---|
| 29 |
%package devel |
|---|
| 30 |
Summary: Development files for gdal and ogr |
|---|
| 31 |
Group: Development/Libraries |
|---|
| 32 |
Requires: %{name} = %{version}-%{release} |
|---|
| 33 |
|
|---|
| 34 |
%package bin |
|---|
| 35 |
Summary: Utility programs for gdal and ogr |
|---|
| 36 |
Group: Applications/Productivity |
|---|
| 37 |
Requires: %{name} = %{version}-%{release} |
|---|
| 38 |
|
|---|
| 39 |
%package python |
|---|
| 40 |
Summary: Python bindings for gdal and ogr |
|---|
| 41 |
Group: System Environment/Libraries |
|---|
| 42 |
Requires: %{name} = %{version}-%{release} |
|---|
| 43 |
Requires: python-abi = %(%{__python} -c "import sys; print sys.version[:3]") |
|---|
| 44 |
|
|---|
| 45 |
%description |
|---|
| 46 |
GDAL is a translator library for raster geospatial data formats. As a library, |
|---|
| 47 |
it presents a single abstract data model to the calling application for all |
|---|
| 48 |
supported formats. The related OGR library (which lives within the GDAL source |
|---|
| 49 |
tree) provides a similar capability for simple features vector data. |
|---|
| 50 |
|
|---|
| 51 |
GDAL supports 40+ popular data formats, including commonly used ones (GeoTIFF, |
|---|
| 52 |
JPEG, PNG and more) as well as the ones used in GIS and remote sensing software |
|---|
| 53 |
packages (ERDAS Imagine, ESRI Arc/Info, ENVI, PCI Geomatics). Also supported |
|---|
| 54 |
many remote sensing and scientific data distribution formats such as HDF, EOS |
|---|
| 55 |
FAST, NOAA L1B, NetCDF, FITS. |
|---|
| 56 |
|
|---|
| 57 |
OGR library supports popular vector formats like ESRI Shapefile, TIGER data, |
|---|
| 58 |
S57, MapInfo File, DGN, GML and more. |
|---|
| 59 |
|
|---|
| 60 |
%description devel |
|---|
| 61 |
This package contains libgdal and the appropriate header files. |
|---|
| 62 |
|
|---|
| 63 |
%description bin |
|---|
| 64 |
This package contains utility programs, based on GDAL/OGR library, namely |
|---|
| 65 |
gdal_translate, gdalinfo, gdaladdo, gdalwarp, ogr2ogr, ogrinfo, ogrtindex. |
|---|
| 66 |
|
|---|
| 67 |
%description python |
|---|
| 68 |
This package contains Python bindings for GDAL/OGR library. |
|---|
| 69 |
|
|---|
| 70 |
%prep |
|---|
| 71 |
%setup -q |
|---|
| 72 |
%patch0 -p0 |
|---|
| 73 |
%patch1 -p1 -b .ldflags |
|---|
| 74 |
|
|---|
| 75 |
(cd %{_builddir}/%{name}-%{version}; chmod -x frmts/jpeg/gdalexif.h alg/gdal_tps.cpp) |
|---|
| 76 |
|
|---|
| 77 |
%build |
|---|
| 78 |
|
|---|
| 79 |
# disable all feature FE does not support, otherwise |
|---|
| 80 |
# rebuilding this package will pick up random features |
|---|
| 81 |
# and make building this rpm non-deterministic. |
|---|
| 82 |
export CPPFLAGS='-I%{_includedir}/netcdf-3' |
|---|
| 83 |
export LDFLAGS='-L%{_libdir}/netcdf-3' |
|---|
| 84 |
%configure \ |
|---|
| 85 |
--includedir=%{_includedir}/gdal \ |
|---|
| 86 |
--datadir=%{_datadir}/gdal \ |
|---|
| 87 |
--with-grass=no \ |
|---|
| 88 |
--with-libgrass=no \ |
|---|
| 89 |
--with-cfitsio=no \ |
|---|
| 90 |
--with-netcdf=yes \ |
|---|
| 91 |
--with-png \ |
|---|
| 92 |
--with-jpeg \ |
|---|
| 93 |
--with-gif \ |
|---|
| 94 |
--with-ogdi=no \ |
|---|
| 95 |
--with-fme=no \ |
|---|
| 96 |
--with-hdf4=yes \ |
|---|
| 97 |
--with-hdf5=yes \ |
|---|
| 98 |
--with-jasper=no \ |
|---|
| 99 |
--with-ecw=no \ |
|---|
| 100 |
--with-kakadu=no \ |
|---|
| 101 |
--with-mrsid=no \ |
|---|
| 102 |
--without-bsb \ |
|---|
| 103 |
--with-pg=yes \ |
|---|
| 104 |
--with-xerces=no \ |
|---|
| 105 |
--with-odbc \ |
|---|
| 106 |
--with-oci=no \ |
|---|
| 107 |
--with-dods-root=no \ |
|---|
| 108 |
--with-sqlite=yes \ |
|---|
| 109 |
--with-mysql=yes \ |
|---|
| 110 |
--with-geos=no |
|---|
| 111 |
|
|---|
| 112 |
cp GDALmake.opt GDALmake.opt.orig |
|---|
| 113 |
sed -e "s/^CFLAGS.*$/CFLAGS=$CFLAGS/" \ |
|---|
| 114 |
-e "s/^CXXFLAGS.*$/CXXFLAGS=$CXXFLAGS/" \ |
|---|
| 115 |
-e "s/^FFLAGS.*$/FFLAGS=$FFLAGS/" \ |
|---|
| 116 |
GDALmake.opt.orig > GDALmake.opt |
|---|
| 117 |
|
|---|
| 118 |
make %{?_smp_mflags} |
|---|
| 119 |
|
|---|
| 120 |
make docs |
|---|
| 121 |
find html -name .cvsignore -exec rm -f {} \; |
|---|
| 122 |
unset CPPFLAGS |
|---|
| 123 |
unset LDFLAGS |
|---|
| 124 |
|
|---|
| 125 |
%install |
|---|
| 126 |
rm -rf %{buildroot} |
|---|
| 127 |
|
|---|
| 128 |
%makeinstall \ |
|---|
| 129 |
INST_PYMOD=%{buildroot}%{python_sitearch} \ |
|---|
| 130 |
INST_MAN=%{buildroot}/%{_mandir} \ |
|---|
| 131 |
INST_LIB=%{buildroot}/%{_libdir} \ |
|---|
| 132 |
INST_INCLUDE=%{buildroot}/%{_includedir}/gdal \ |
|---|
| 133 |
INST_BIN=%{buildroot}/%{_bindir} \ |
|---|
| 134 |
INST_DATA=%{buildroot}/%{_datadir}/gdal |
|---|
| 135 |
|
|---|
| 136 |
%post -p /sbin/ldconfig |
|---|
| 137 |
|
|---|
| 138 |
%postun -p /sbin/ldconfig |
|---|
| 139 |
|
|---|
| 140 |
%clean |
|---|
| 141 |
rm -rf %{buildroot} |
|---|
| 142 |
|
|---|
| 143 |
%files |
|---|
| 144 |
%defattr(-,root,root) |
|---|
| 145 |
%doc ChangeLog VERSION NEWS HOWTO-RELEASE |
|---|
| 146 |
%{_libdir}/lib*.so.* |
|---|
| 147 |
%{_datadir}/gdal |
|---|
| 148 |
|
|---|
| 149 |
%files devel |
|---|
| 150 |
%defattr(-,root,root,-) |
|---|
| 151 |
%doc html |
|---|
| 152 |
%{_bindir}/gdal-config |
|---|
| 153 |
%{_includedir}/* |
|---|
| 154 |
%{_libdir}/*.a |
|---|
| 155 |
%{_libdir}/*.la |
|---|
| 156 |
%{_libdir}/libgdal.so |
|---|
| 157 |
%{_mandir}/man1/gdal-config* |
|---|
| 158 |
|
|---|
| 159 |
%files bin |
|---|
| 160 |
%defattr(-,root,root,-) |
|---|
| 161 |
%{_bindir}/* |
|---|
| 162 |
%exclude %{_bindir}/gdal-config |
|---|
| 163 |
%exclude %{_bindir}/*.py |
|---|
| 164 |
%{_mandir}/man1/* |
|---|
| 165 |
%exclude %{_mandir}/man1/gdal-config* |
|---|
| 166 |
|
|---|
| 167 |
%files python |
|---|
| 168 |
%defattr(-,root,root,-) |
|---|
| 169 |
%{python_sitearch} |
|---|
| 170 |
%{_bindir}/*.py |
|---|
| 171 |
%exclude %{_libdir}/python*/site-packages/*.a |
|---|
| 172 |
|
|---|
| 173 |
%changelog |
|---|
| 174 |
* Tue Sep 20 2005 Silke Reimer <silke@intevation.de> 1.3.0-2 |
|---|
| 175 |
- made frmts/jpeg/gdalexif.h alg/gdal_tps.cpp not executable thus fixing |
|---|
| 176 |
rpmlint error "gdal-debuginfo script-without-shellbang" |
|---|
| 177 |
- using external libtiff |
|---|
| 178 |
- explicit requireing mysql, hdf and hdf5 support thus avoiding non |
|---|
| 179 |
deterministic build results |
|---|
| 180 |
- moved python scripts from gdal-bin to gdal-python |
|---|
| 181 |
|
|---|
| 182 |
* Thu Aug 25 2005 Silke Reimer <silke@intevation.de> 1.3.0-1 |
|---|
| 183 |
- new upstream version |
|---|
| 184 |
- add sqlite support |
|---|
| 185 |
|
|---|
| 186 |
* Sat Dec 18 2004 Various <http://fedora.us/> - 1.2.5-0.fdr.1 |
|---|
| 187 |
- add python-abi dependency to python sub-package |
|---|
| 188 |
- install python stuff into python sitearch |
|---|
| 189 |
- add patch to prepend LDFLAGS when linking |
|---|
| 190 |
- fetch NetCDF from its own lib/include directories |
|---|
| 191 |
|
|---|
| 192 |
* Fri Oct 01 2004 Ralf Corsepius <ralf@links2linux.de> 0:1.2.3-0.fdr.3 |
|---|
| 193 |
- install headers to %%{_includedir}/gdal. |
|---|
| 194 |
- install data to %%{_datadir}/gdal. |
|---|
| 195 |
- disable geos. |
|---|
| 196 |
- build docs, install them into *-devel. |
|---|
| 197 |
- Fundamental spec-file cleanup. |
|---|
| 198 |
|
|---|
| 199 |
* Wed Sep 29 2004 Silke Reimer <silke@intevation.net> 0:1.2.3-0.fdr.2 |
|---|
| 200 |
- new upstream version |
|---|
| 201 |
|
|---|
| 202 |
* Mon Sep 27 2004 Silke Reimer <silke@intevation.net> 0:1.2.2-0.fdr.2 |
|---|
| 203 |
- new upstream version |
|---|
| 204 |
- make use of $RPM_OPT_FLAGS by patching GDALmake.opt |
|---|
| 205 |
- explicit set of _prefix has been dropped |
|---|
| 206 |
|
|---|
| 207 |
* Tue Aug 31 2004 Silke Reimer <silke.reimer@intevation.net> 0:1.2.1-1.fdr.2 |
|---|
| 208 |
- Changed BuildRoot according to standard specfile. |
|---|
| 209 |
- Added %{?_smp_mflags} to make |
|---|
| 210 |
- Changed post and postun to avoid printing and additional requirements for |
|---|
| 211 |
post and postun |
|---|
| 212 |
- Changed Group of main package to "System Environment/Libraries" |
|---|
| 213 |
- Use %configure-macro |
|---|
| 214 |
|
|---|
| 215 |
* Fri Aug 06 2004 Silke Reimer <silke.reimer@intevation.net> - 0:1.2.1-0.fdr.2 |
|---|
| 216 |
- substantial changes to fit to Fedora naming conventions |
|---|
| 217 |
|
|---|
| 218 |
* Wed Jun 30 2004 Silke Reimer <silke.reimer@intevation.net> - 1.2.1-0 |
|---|
| 219 |
- Initial build |
|---|