]>
Commit | Line | Data |
---|---|---|
954ec354 | 1 | # TODO: |
8b360036 | 2 | # - be reasonable about devel dependencies - you do not need all of them to |
cfcb08ee | 3 | # use gdal (probably a gdal module or driver shall not imply devel |
4 | # dependency) | |
d3d190a4 | 5 | # - libjpeg12 (needs patching to use system one, --with-jpeg12 is not sufficient as of 1.9.2) |
9b4989ae | 6 | # - libkml (1.3.0 needed, not released yet) |
954ec354 | 7 | # - wait for newer pcidsk, switch to external again |
d3d190a4 | 8 | # - csharp, java |
9b4989ae JB |
9 | # - additional, proprietary(?) formats support: |
10 | # - FMEObjects (http://www.safe.com/support/support-resources/fme-downloads/) | |
11 | # - ESRI FileGDBAPI (http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api) | |
12 | # - ECW (http://www.erdas.com/products/ecw/ERDASECWJPEG2000SDK/Details.aspx) | |
13 | # - Kakadu/JPEG2000 (http://www.kakadusoftware.com/) | |
14 | # - MrSID (http://www.lizardtech.com/developer/) | |
15 | # - MSG/EUMETSAT (http://www.eumetsat.int/Home/Main/DataAccess/SupportSoftwareTools/index.htm) | |
9b4989ae | 16 | # - Ingres (--with-ingres=/path) |
0316feee | 17 | # - Informix DB (--with-idb) |
9b4989ae JB |
18 | # - DWGdirect (members only? http://www.opendwg.org/) |
19 | # - ESRI SDE (http://www.esri.com/software/arcgis/arcsde/index.html) | |
655672e5 | 20 | # |
21 | # Conditional build: | |
d3d190a4 | 22 | %bcond_without armadillo # Armadillo support for faster TPS transform |
779b0eec | 23 | %bcond_without crnlib # DDS support via crunch/crnlib |
4537079d | 24 | %bcond_without epsilon # EPSILON wavelet compression support |
779b0eec | 25 | %bcond_without fyba # SOSI geodata support using FYBA |
0316feee | 26 | %bcond_with grass # GRASS support (note: dependency loop) |
4537079d | 27 | %bcond_without gta # GTA format support |
d3d190a4 | 28 | %bcond_without mysql # MySQL DB support |
0316feee | 29 | %bcond_with oci # ORACLE OCI DB and Georaster support |
d3d190a4 JB |
30 | %bcond_without odbc # ODBC DB support |
31 | %bcond_without opencl # OpenCL (GPU) support | |
c9c08280 | 32 | %bcond_without openjpeg # OpenJPEG 2 (JPEG2000) support |
4537079d JB |
33 | %bcond_with podofo # PDF support via podofo instead of poppler |
34 | %bcond_without poppler # PDF support via poppler | |
779b0eec | 35 | %bcond_without rasdaman # Rasdaman support |
4537079d | 36 | %bcond_without spatialite # SpatiaLite support |
d3d190a4 JB |
37 | %bcond_without xerces # Xerces support |
38 | %bcond_without java # Java and MDB support | |
0316feee | 39 | %bcond_without php # PHP binding |
315a1c4a ER |
40 | %bcond_without ruby # Ruby binding |
41 | ||
fac7da6f JB |
42 | %if %{with podofo} |
43 | %undefine with_poppler | |
44 | %endif | |
66daf0b1 | 45 | %if 0%{!?php_name:1} |
ead243f9 | 46 | %define php_name php55 |
66daf0b1 | 47 | %endif |
faf5649c | 48 | Summary: Geospatial Data Abstraction Library |
a28c1bee | 49 | Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi |
faf5649c | 50 | Name: gdal |
ce035715 JB |
51 | Version: 1.11.2 |
52 | Release: 1 | |
faf5649c JB |
53 | License: BSD-like |
54 | Group: Libraries | |
84501866 | 55 | Source0: http://download.osgeo.org/gdal/%{version}/%{name}-%{version}.tar.xz |
ce035715 | 56 | # Source0-md5: 90221810dd9ca656ee23d434d4266ef6 |
f5a12c65 | 57 | Patch0: %{name}-perl.patch |
9b4989ae | 58 | Patch1: %{name}-python_install.patch |
f1b5abea JB |
59 | Patch2: %{name}-php.patch |
60 | Patch3: %{name}-fpic.patch | |
75b2e515 | 61 | Patch4: %{name}-format-security.patch |
0316feee JB |
62 | Patch5: %{name}-grass.patch |
63 | Patch6: %{name}-sse.patch | |
64 | Patch7: %{name}-link.patch | |
779b0eec JB |
65 | Patch8: %{name}-fyba.patch |
66 | Patch9: %{name}-dds.patch | |
779b0eec | 67 | Patch11: %{name}-armadillo.patch |
ce035715 | 68 | Patch12: %{name}-rasdaman.patch |
9b5c0fd4 | 69 | URL: http://www.gdal.org/ |
ead243f9 | 70 | %{?with_php:BuildRequires: %{php_name}-devel} |
d3d190a4 JB |
71 | %{?with_opencl:BuildRequires: OpenCL-devel >= 1.0} |
72 | %{?with_armadillo:BuildRequires: armadillo-devel} | |
69051332 JB |
73 | BuildRequires: autoconf >= 2.52 |
74 | BuildRequires: automake | |
6b59fa88 | 75 | BuildRequires: cfitsio-devel |
6a3158ac | 76 | %{?with_crnlib:BuildRequires: crnlib-devel} |
9b4989ae | 77 | BuildRequires: curl-devel |
9d161bc4 | 78 | BuildRequires: doxygen >= 1.4.2 |
209aac6b | 79 | %{?with_epsilon:BuildRequires: epsilon-compressor-devel} |
69051332 | 80 | BuildRequires: expat-devel >= 1.95.0 |
779b0eec | 81 | %{?with_fyba:BuildRequires: fyba-devel} |
4537079d | 82 | BuildRequires: freexl-devel >= 1.0 |
0316feee JB |
83 | BuildRequires: gcc >= 6:4.1 |
84 | BuildRequires: geos-devel >= 3.1.0 | |
b459f4d7 | 85 | BuildRequires: giflib-devel >= 4.0 |
779b0eec | 86 | %{?with_grass:BuildRequires: grass-devel >= 6.4} |
6b59fa88 | 87 | BuildRequires: hdf-devel >= 4.0 |
69051332 | 88 | BuildRequires: hdf5-devel |
6b59fa88 | 89 | BuildRequires: jasper-devel |
9b4989ae JB |
90 | %{?with_java:BuildRequires: jdk} |
91 | %{?with_java:BuildRequires: jpackage-utils} | |
0316feee | 92 | BuildRequires: json-c-devel >= 0.11 |
d4d7a2c6 | 93 | BuildRequires: libcsf-devel |
4058fbc3 | 94 | BuildRequires: libdap-devel >= 3.10 |
b3cbf6a3 | 95 | BuildRequires: libgeotiff-devel >= 1.2.1 |
b88bb9ef | 96 | %{?with_gta:BuildRequires: libgta-devel} |
6b59fa88 | 97 | BuildRequires: libjpeg-devel >= 6b |
9b4989ae | 98 | #BuildRequires: libkml-devel >= 1.3.0 |
e354fe40 | 99 | BuildRequires: libpng-devel >= 2:1.2.8 |
4537079d | 100 | %{?with_spatialite:BuildRequires: libspatialite-devel} |
b3cbf6a3 | 101 | BuildRequires: libstdc++-devel |
954ec354 | 102 | BuildRequires: libtiff-devel >= 4.0 |
69051332 | 103 | BuildRequires: libtool |
e2b089e1 | 104 | BuildRequires: libuuid-devel |
9b4989ae | 105 | BuildRequires: libwebp-devel |
0316feee | 106 | BuildRequires: libxml2-devel >= 2 |
d3d190a4 | 107 | %{?with_mysql:BuildRequires: mysql-devel} |
80114ba8 | 108 | BuildRequires: netcdf-devel >= 4.1 |
6b59fa88 | 109 | BuildRequires: ogdi-devel >= 3.1 |
c9c08280 | 110 | %{?with_openjpeg:BuildRequires: openjpeg2-devel >= 2.0.0-2} |
0316feee JB |
111 | # 8.1.7 for DB support, 10.0.1 for georaster |
112 | %{?with_oci:BuildRequires: oracle-instantclient-devel >= 10.0.1} | |
954ec354 | 113 | #BuildRequires: pcidsk-devel > 0.3 |
a0ffd9c4 | 114 | BuildRequires: perl-devel |
fac7da6f | 115 | %{?with_podofo:BuildRequires: podofo-devel} |
0077f857 | 116 | %{?with_poppler:BuildRequires: poppler-devel >= 0.24} |
9b4989ae JB |
117 | # ensure it's compiled with PQescapeStringConn support |
118 | BuildRequires: postgresql-backend-devel >= 8.1.4 | |
119 | BuildRequires: postgresql-devel >= 8.1.4 | |
120 | BuildRequires: proj-devel >= 4 | |
9a2dbbce | 121 | BuildRequires: python-devel >= 1:2.5 |
017b03bb | 122 | BuildRequires: python-numpy-devel >= 1:1.0.0 |
9b4989ae | 123 | BuildRequires: python-setuptools |
779b0eec | 124 | %{?with_rasdaman:BuildRequires: rasdaman-devel} |
479cb83c | 125 | BuildRequires: rpm-pythonprov |
315a1c4a | 126 | %{?with_ruby:BuildRequires: rpm-rubyprov} |
9b4989ae | 127 | BuildRequires: rpmbuild(macros) >= 1.344 |
4aafe7c0 | 128 | %{?with_ruby:BuildRequires: ruby-devel} |
b88bb9ef | 129 | BuildRequires: sed >= 4.0 |
9b4989ae | 130 | BuildRequires: sqlite3-devel >= 3.0.0 |
479cb83c | 131 | BuildRequires: swig-perl |
0316feee | 132 | BuildRequires: swig-php >= 2.0.12-2 |
9a2dbbce | 133 | BuildRequires: swig-python >= 1.3 |
017b03bb | 134 | %{?with_ruby:BuildRequires: swig-ruby} |
479cb83c | 135 | BuildRequires: texlive-dvips |
136 | BuildRequires: texlive-latex | |
9831286f | 137 | %{?with_odbc:BuildRequires: unixODBC-devel >= 2.2.15} |
9b4989ae JB |
138 | %{?with_xerces:BuildRequires: xerces-c-devel >= 2.7.0} |
139 | BuildRequires: xz-devel | |
faf5649c | 140 | BuildRequires: zlib-devel >= 1.1.4 |
4537079d | 141 | Requires: freexl >= 1.0 |
0316feee | 142 | Requires: geos >= 3.1.0 |
b3cbf6a3 | 143 | Requires: libgeotiff >= 1.2.1 |
e354fe40 | 144 | Requires: libpng >= 2:1.2.8 |
954ec354 | 145 | Requires: libtiff >= 4.0 |
faf5649c JB |
146 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
147 | ||
148 | %description | |
149 | GDAL is a translator library for raster geospatial data formats that | |
150 | is released under an Open Source license. As a library, it presents a | |
151 | single abstract data model to the calling application for all | |
152 | supported formats. The related OGR library (which lives within the | |
153 | GDAL source tree) provides a similar capability for simple features | |
154 | vector data. | |
f05c79e8 | 155 | |
d34f2ec8 JR |
156 | %description -l pl.UTF-8 |
157 | GDAL to biblioteka konwertująca między formatami rastrowych danych | |
158 | dotyczących powierzchni Ziemi, udostępniona na licencji Open Source. | |
159 | Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych | |
160 | do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR | |
161 | (której źródła są dołączone do drzewa źródeł GDAL) daje podobne | |
162 | możliwości dla danych wektorowych. | |
faf5649c | 163 | |
6b59fa88 JB |
164 | %package devel |
165 | Summary: GDAL library header files | |
a28c1bee | 166 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL |
6b59fa88 | 167 | Group: Development/Libraries |
1673a634 | 168 | Requires: %{name} = %{version}-%{release} |
d3d190a4 JB |
169 | %{?with_opencl:Requires: OpenCL-devel >= 1.0} |
170 | %{?with_armadillo:Requires: armadillo-devel} | |
b3cbf6a3 | 171 | Requires: cfitsio-devel |
6a3158ac | 172 | %{?with_crnlib:Requires: crnlib-devel} |
209aac6b JB |
173 | Requires: curl-devel |
174 | %{?with_epsilon:Requires: epsilon-compressor-devel} | |
779b0eec | 175 | %{?with_fyba:Requires: fyba-devel} |
69051332 | 176 | Requires: expat-devel >= 1.95.0 |
4537079d | 177 | Requires: freexl-devel >= 1.0 |
0316feee | 178 | Requires: geos-devel >= 3.1.0 |
209aac6b | 179 | Requires: giflib-devel >= 4.0 |
b3cbf6a3 | 180 | Requires: hdf-devel >= 4.0 |
69051332 | 181 | Requires: hdf5-devel |
b3cbf6a3 | 182 | Requires: jasper-devel |
0316feee | 183 | Requires: json-c-devel >= 0.11 |
d4d7a2c6 | 184 | Requires: libcsf-devel |
4058fbc3 | 185 | Requires: libdap-devel >= 3.10 |
b3cbf6a3 | 186 | Requires: libgeotiff-devel >= 1.2.1 |
209aac6b JB |
187 | %{?with_gta:Requires: libgta-devel} |
188 | Requires: libjpeg-devel >= 6b | |
e354fe40 | 189 | Requires: libpng-devel >= 2:1.2.8 |
4537079d | 190 | %{?with_spatialite:Requires: libspatialite-devel} |
b3cbf6a3 | 191 | Requires: libstdc++-devel |
954ec354 | 192 | Requires: libtiff-devel >= 4.0 |
209aac6b JB |
193 | Requires: libuuid-devel |
194 | Requires: libwebp-devel | |
0316feee | 195 | Requires: libxml2-devel >= 2 |
d3d190a4 | 196 | %{?with_mysql:Requires: mysql-devel} |
9b4989ae | 197 | Requires: netcdf-devel >= 4 |
b3cbf6a3 | 198 | Requires: ogdi-devel >= 3.1 |
c9c08280 | 199 | %{?with_openjpeg:Requires: openjpeg2-devel >= 2.0.0-2} |
954ec354 | 200 | #Requires: pcidsk-devel > 0.3 |
209aac6b | 201 | %{?with_podofo:Requires: podofo-devel} |
0077f857 | 202 | %{?with_poppler:Requires: poppler-devel >= 0.24} |
b3cbf6a3 | 203 | Requires: postgresql-devel |
209aac6b | 204 | Requires: proj-devel >= 4 |
779b0eec | 205 | %{?with_rasdaman:Requires: rasdaman-devel} |
9b4989ae | 206 | Requires: sqlite3-devel >= 3.0.0 |
655672e5 | 207 | %{?with_odbc:Requires: unixODBC-devel} |
69051332 | 208 | %{?with_xerces:Requires: xerces-c-devel >= 2.7.0} |
209aac6b JB |
209 | Requires: xz-devel |
210 | Requires: zlib-devel >= 1.1.4 | |
6b59fa88 JB |
211 | |
212 | %description devel | |
213 | GDAL library header files. | |
214 | ||
d34f2ec8 JR |
215 | %description devel -l pl.UTF-8 |
216 | Pliki nagłówkowe biblioteki GDAL. | |
6b59fa88 JB |
217 | |
218 | %package static | |
219 | Summary: GDAL static libraries | |
a28c1bee | 220 | Summary(pl.UTF-8): Statyczne biblioteki GDAL |
6b59fa88 | 221 | Group: Development/Libraries |
1673a634 | 222 | Requires: %{name}-devel = %{version}-%{release} |
6b59fa88 JB |
223 | |
224 | %description static | |
225 | GDAL static libraries. | |
226 | ||
d34f2ec8 | 227 | %description static -l pl.UTF-8 |
6b59fa88 JB |
228 | Statyczne biblioteki GDAL. |
229 | ||
a0ffd9c4 JB |
230 | %package -n perl-gdal |
231 | Summary: Perl bindings for GDAL | |
232 | Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL | |
233 | Group: Development/Languages/Perl | |
234 | Requires: %{name} = %{version}-%{release} | |
235 | ||
236 | %description -n perl-gdal | |
237 | Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules. | |
238 | ||
239 | %description -n perl-gdal -l pl.UTF-8 | |
017b03bb | 240 | Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR. |
a0ffd9c4 | 241 | |
ead243f9 | 242 | %package -n %{php_name}-gdal |
9b4989ae JB |
243 | Summary: PHP bindings for GDAL library |
244 | Summary(pl.UTF-8): Wiązania PHP do biblioteki GDAL | |
245 | Group: Development/Languages/PHP | |
246 | Requires: %{name} = %{version}-%{release} | |
247 | %{?requires_php_extension} | |
248 | ||
ead243f9 | 249 | %description -n %{php_name}-gdal |
9b4989ae JB |
250 | PHP bindings for GDAL library |
251 | ||
ead243f9 | 252 | %description -n %{php_name}-gdal -l pl.UTF-8 |
9b4989ae JB |
253 | Wiązania PHP do biblioteki GDAL. |
254 | ||
6b59fa88 JB |
255 | %package -n python-gdal |
256 | Summary: GDAL Python module | |
a28c1bee | 257 | Summary(pl.UTF-8): Moduł Pythona GDAL |
6b59fa88 | 258 | Group: Libraries/Python |
1673a634 | 259 | Requires: %{name} = %{version}-%{release} |
315a1c4a | 260 | Requires: python-libs |
6b59fa88 JB |
261 | |
262 | %description -n python-gdal | |
263 | GDAL Python module. | |
264 | ||
d34f2ec8 JR |
265 | %description -n python-gdal -l pl.UTF-8 |
266 | Moduł Pythona GDAL. | |
6b59fa88 | 267 | |
a0ffd9c4 JB |
268 | %package -n ruby-gdal |
269 | Summary: Ruby bindings for GDAL | |
270 | Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL | |
271 | Group: Development/Languages | |
272 | Requires: %{name} = %{version}-%{release} | |
a0ffd9c4 JB |
273 | |
274 | %description -n ruby-gdal | |
275 | Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules. | |
276 | ||
277 | %description -n ruby-gdal -l pl.UTF-8 | |
017b03bb ER |
278 | Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i |
279 | osr. | |
a0ffd9c4 | 280 | |
faf5649c JB |
281 | %prep |
282 | %setup -q | |
283 | %patch0 -p1 | |
284 | %patch1 -p1 | |
f1b5abea JB |
285 | %patch2 -p1 |
286 | %patch3 -p1 | |
c9c08280 | 287 | %patch4 -p1 |
0316feee JB |
288 | %patch5 -p1 |
289 | %patch6 -p1 | |
290 | %patch7 -p1 | |
779b0eec JB |
291 | %patch8 -p1 |
292 | %patch9 -p1 | |
779b0eec JB |
293 | %patch11 -p1 |
294 | %patch12 -p1 | |
0316feee JB |
295 | |
296 | # need to regenerate (old ones don't support perl 5.10 or php 5.5) | |
297 | %{__rm} swig/{perl,php}/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp} | |
298 | ||
299 | %{__sed} -i \ | |
300 | -e 's/^CC=gcc/CC=%{__cc}/' \ | |
301 | -e 's/^CXX=g++/CXX=%{__cxx}/' \ | |
302 | -e 's/^CFLAGS=-fpic/CFLAGS=%{rpmcflags} -fPIC/' \ | |
303 | -e 's/^LDFLAGS=-shared/LDFLAGS=%{rpmldflags} -shared/' \ | |
304 | swig/php/GNUmakefile | |
315a1c4a ER |
305 | # Build with fPIC to allow Ruby bindings |
306 | # Xcompiler should normally achieve that -- http://trac.osgeo.org/gdal/ticket/3978 | |
307 | # http://trac.osgeo.org/gdal/ticket/1994 | |
308 | sed -i 's|\$(CFLAGS)|$(CFLAGS) -fPIC|g' swig/ruby/RubyMakefile.mk | |
309 | # Install Ruby bindings to distribution specific directory | |
310 | sed -i 's|RUBY_EXTENSIONS_DIR :=.*|RUBY_EXTENSIONS_DIR := %{ruby_vendorarchdir}|' swig/ruby/RubyMakefile.mk | |
311 | ||
312 | # Install Ruby bindings into the proper place | |
313 | sed -i -e 's|^$(INSTALL_DIR):|$(DESTDIR)$(INSTALL_DIR):|' swig/ruby/RubyMakefile.mk | |
314 | sed -i -e 's|^install: $(INSTALL_DIR)|install: $(DESTDIR)$(INSTALL_DIR)|' swig/ruby/RubyMakefile.mk | |
315 | ||
f4952e6f AM |
316 | # our man path |
317 | sed -i -e 's#^mandir=.*##g' configure.in | |
318 | ||
4058fbc3 | 319 | %{__rm} -r man |
4ed54fac | 320 | |
b88bb9ef JB |
321 | %{__sed} -i -e 's,DODS_INC="-I.*,DODS_INC="$(pkg-config --cflags libdap)",' configure.in |
322 | ||
faf5649c | 323 | %build |
69051332 | 324 | %{__libtoolize} |
69051332 | 325 | %{__aclocal} -I m4 |
faf5649c | 326 | %{__autoconf} |
6b59fa88 | 327 | %configure \ |
e582c3b1 | 328 | --includedir=%{_includedir}/gdal \ |
5014b82a | 329 | --datadir=%{_datadir}/gdal \ |
d4d7a2c6 | 330 | --with-dods-root=/usr \ |
d3d190a4 | 331 | %{?with_armadillo:--with-armadillo} \ |
779b0eec | 332 | %{?with_crnlib:--with-dds} \ |
209aac6b | 333 | %{?with_epsilon:--with-epsilon} \ |
0316feee | 334 | %{?with_grass:--with-grass} \ |
b88bb9ef | 335 | %{!?with_gta:--without-gta} \ |
69051332 | 336 | --with-hide-internal-symbols \ |
9b4989ae JB |
337 | %{?with_java:--with-java=%{java_home}} \ |
338 | --with-liblzma \ | |
209aac6b | 339 | %{?with_java:--with-mdb --with-jvm-lib-add-rpath} \ |
d3d190a4 | 340 | %{?with_mysql:--with-mysql} \ |
0316feee | 341 | %{?with_oci:--with-oci --with-oci-include=/usr/include/oracle/client --with-oci-lib=%{_libdir}} \ |
d3d190a4 | 342 | %{?with_opencl:--with-opencl} \ |
a0ffd9c4 | 343 | --with-perl \ |
9b4989ae | 344 | %{?with_php:--with-php} \ |
fac7da6f JB |
345 | %{?with_podofo:--with-podofo} \ |
346 | %{?with_poppler:--with-poppler} \ | |
69051332 | 347 | --with-python \ |
779b0eec | 348 | %{?with_rasdaman:--with-rasdaman=%{_libdir}/rasdaman} \ |
4aafe7c0 | 349 | %{?with_ruby:--with-ruby} \ |
779b0eec | 350 | %{?with_fyba:--with-sosi} \ |
4537079d | 351 | %{?with_spatialite:--with-spatialite} \ |
69051332 | 352 | --with-sqlite3 \ |
9b4989ae | 353 | --with-webp \ |
655672e5 | 354 | %{?with_xerces:--with-xerces} \ |
6b59fa88 | 355 | --with-xerces-inc=/usr/include/xercesc \ |
80faacbe | 356 | --with-xerces-lib="-lxerces-c" \ |
69051332 | 357 | --without-libgrass |
954ec354 | 358 | # --with-pcidsk=/usr (needs > 0.3) |
779b0eec | 359 | # csharp builds, but has no configure option nor install target |
faf5649c | 360 | |
69051332 | 361 | # regenerate where needed |
825dc3dc | 362 | %{__make} -j1 -C swig/perl generate |
3df9ed7f | 363 | %if %{with ruby} |
02b013b1 | 364 | %{__make} -j1 -C swig/ruby generate |
3df9ed7f | 365 | %endif |
69051332 | 366 | |
779b0eec JB |
367 | %{__make} -j1 \ |
368 | %{?with_grass:GRASS_INCLUDE="-I/usr/include/grass64"} \ | |
369 | %{?with_fyba:SOSI_INC="-I/usr/include/fyba"} | |
a0ffd9c4 | 370 | |
825dc3dc | 371 | %{__make} -j1 docs |
3a591acf | 372 | |
f5a12c65 JK |
373 | %{__make} -j1 man |
374 | ||
faf5649c JB |
375 | %install |
376 | rm -rf $RPM_BUILD_ROOT | |
faf5649c | 377 | |
825dc3dc | 378 | %{__make} -j1 install install-man \ |
3a591acf JB |
379 | DESTDIR=$RPM_BUILD_ROOT |
380 | ||
388b39cb ER |
381 | rm -rf _html |
382 | cp -a html _html | |
383 | cp -a ogr/html _html/ogr | |
faf5649c | 384 | |
9b4989ae JB |
385 | %if %{with php} |
386 | # missing in make install | |
ead243f9 ER |
387 | install -d $RPM_BUILD_ROOT%{php_extensiondir} |
388 | install -p swig/php/php_gdal.so $RPM_BUILD_ROOT%{php_extensiondir}/gdal.so | |
389 | install -p swig/php/php_gdalconst.so $RPM_BUILD_ROOT%{php_extensiondir}/gdalconst.so | |
390 | install -p swig/php/php_ogr.so $RPM_BUILD_ROOT%{php_extensiondir}/ogr.so | |
391 | install -p swig/php/php_osr.so $RPM_BUILD_ROOT%{php_extensiondir}/osr.so | |
9b4989ae JB |
392 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d |
393 | cat <<'EOF' >$RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/gdal.ini | |
ead243f9 | 394 | ; Enable gdal extension modules |
9b4989ae JB |
395 | extension=gdal.so |
396 | extension=gdalconst.so | |
397 | extension=ogr.so | |
398 | extension=osr.so | |
399 | EOF | |
400 | %endif | |
401 | ||
374370d5 JB |
402 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
403 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
404 | %py_postclean | |
5014b82a | 405 | |
017b03bb ER |
406 | %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod |
407 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist | |
408 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist | |
409 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist | |
410 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist | |
411 | ||
412 | # some doxygen trash | |
0316feee JB |
413 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/gdal{compare,move}.dox |
414 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/gdal_{calc,edit,fillnodata,polygonize,proximity,sieve}.dox | |
017b03bb | 415 | |
faf5649c JB |
416 | %clean |
417 | rm -rf $RPM_BUILD_ROOT | |
418 | ||
6b59fa88 JB |
419 | %post -p /sbin/ldconfig |
420 | %postun -p /sbin/ldconfig | |
421 | ||
faf5649c JB |
422 | %files |
423 | %defattr(644,root,root,755) | |
c0a384ef | 424 | %doc NEWS PROVENANCE.TXT |
4058fbc3 JB |
425 | %attr(755,root,root) %{_bindir}/epsg_tr.py |
426 | %attr(755,root,root) %{_bindir}/esri2wkt.py | |
427 | %attr(755,root,root) %{_bindir}/gcps2vec.py | |
428 | %attr(755,root,root) %{_bindir}/gcps2wld.py | |
429 | %attr(755,root,root) %{_bindir}/gdal2tiles.py | |
430 | %attr(755,root,root) %{_bindir}/gdal2xyz.py | |
f4952e6f | 431 | %attr(755,root,root) %{_bindir}/gdal_auth.py |
4058fbc3 | 432 | %attr(755,root,root) %{_bindir}/gdal_contour |
954ec354 | 433 | %attr(755,root,root) %{_bindir}/gdal_calc.py |
f4952e6f | 434 | %attr(755,root,root) %{_bindir}/gdal_edit.py |
4058fbc3 JB |
435 | %attr(755,root,root) %{_bindir}/gdal_fillnodata.py |
436 | %attr(755,root,root) %{_bindir}/gdal_grid | |
437 | %attr(755,root,root) %{_bindir}/gdal_merge.py | |
438 | %attr(755,root,root) %{_bindir}/gdal_polygonize.py | |
439 | %attr(755,root,root) %{_bindir}/gdal_proximity.py | |
440 | %attr(755,root,root) %{_bindir}/gdal_rasterize | |
441 | %attr(755,root,root) %{_bindir}/gdal_retile.py | |
442 | %attr(755,root,root) %{_bindir}/gdal_sieve.py | |
443 | %attr(755,root,root) %{_bindir}/gdal_translate | |
444 | %attr(755,root,root) %{_bindir}/gdaladdo | |
445 | %attr(755,root,root) %{_bindir}/gdalbuildvrt | |
446 | %attr(755,root,root) %{_bindir}/gdalchksum.py | |
0316feee | 447 | %attr(755,root,root) %{_bindir}/gdalcompare.py |
4058fbc3 JB |
448 | %attr(755,root,root) %{_bindir}/gdaldem |
449 | %attr(755,root,root) %{_bindir}/gdalenhance | |
450 | %attr(755,root,root) %{_bindir}/gdalident.py | |
451 | %attr(755,root,root) %{_bindir}/gdalimport.py | |
452 | %attr(755,root,root) %{_bindir}/gdalinfo | |
954ec354 | 453 | %attr(755,root,root) %{_bindir}/gdallocationinfo |
4058fbc3 | 454 | %attr(755,root,root) %{_bindir}/gdalmanage |
f4952e6f AM |
455 | %attr(755,root,root) %{_bindir}/gdalmove.py |
456 | %attr(755,root,root) %{_bindir}/gdalserver | |
9b4989ae | 457 | %attr(755,root,root) %{_bindir}/gdalsrsinfo |
4058fbc3 JB |
458 | %attr(755,root,root) %{_bindir}/gdaltindex |
459 | %attr(755,root,root) %{_bindir}/gdaltransform | |
460 | %attr(755,root,root) %{_bindir}/gdalwarp | |
461 | %attr(755,root,root) %{_bindir}/mkgraticule.py | |
462 | %attr(755,root,root) %{_bindir}/nearblack | |
463 | %attr(755,root,root) %{_bindir}/ogr2ogr | |
464 | %attr(755,root,root) %{_bindir}/ogrinfo | |
0316feee | 465 | %attr(755,root,root) %{_bindir}/ogrlineref |
4058fbc3 JB |
466 | %attr(755,root,root) %{_bindir}/ogrtindex |
467 | %attr(755,root,root) %{_bindir}/pct2rgb.py | |
468 | %attr(755,root,root) %{_bindir}/rgb2pct.py | |
469 | %attr(755,root,root) %{_bindir}/testepsg | |
5014b82a | 470 | %attr(755,root,root) %{_libdir}/libgdal.so.*.*.* |
017b03bb | 471 | %attr(755,root,root) %ghost %{_libdir}/libgdal.so.1 |
6b59fa88 | 472 | %{_datadir}/gdal |
4058fbc3 | 473 | %{_mandir}/man1/gdal2tiles.1* |
0316feee | 474 | %{_mandir}/man1/gdal_calc.1* |
4058fbc3 | 475 | %{_mandir}/man1/gdal_contour.1* |
f4952e6f | 476 | %{_mandir}/man1/gdal_edit.1* |
4058fbc3 JB |
477 | %{_mandir}/man1/gdal_fillnodata.1* |
478 | %{_mandir}/man1/gdal_grid.1* | |
479 | %{_mandir}/man1/gdal_merge.1* | |
f4952e6f AM |
480 | %{_mandir}/man1/gdal_polygonize.1* |
481 | %{_mandir}/man1/gdal_proximity.1* | |
4058fbc3 JB |
482 | %{_mandir}/man1/gdal_rasterize.1* |
483 | %{_mandir}/man1/gdal_retile.1* | |
484 | %{_mandir}/man1/gdal_sieve.1* | |
485 | %{_mandir}/man1/gdal_translate.1* | |
486 | %{_mandir}/man1/gdal_utilities.1* | |
487 | %{_mandir}/man1/gdaladdo.1* | |
488 | %{_mandir}/man1/gdalbuildvrt.1* | |
0316feee | 489 | %{_mandir}/man1/gdalcompare.1* |
4058fbc3 JB |
490 | %{_mandir}/man1/gdaldem.1* |
491 | %{_mandir}/man1/gdalinfo.1* | |
954ec354 | 492 | %{_mandir}/man1/gdallocationinfo.1* |
f4952e6f AM |
493 | %{_mandir}/man1/gdalmanage.1* |
494 | %{_mandir}/man1/gdalmove.1* | |
9b4989ae | 495 | %{_mandir}/man1/gdalsrsinfo.1* |
4058fbc3 JB |
496 | %{_mandir}/man1/gdaltindex.1* |
497 | %{_mandir}/man1/gdaltransform.1* | |
498 | %{_mandir}/man1/gdalwarp.1* | |
499 | %{_mandir}/man1/nearblack.1* | |
500 | %{_mandir}/man1/ogr2ogr.1* | |
501 | %{_mandir}/man1/ogr_utilities.1* | |
502 | %{_mandir}/man1/ogrinfo.1* | |
0316feee | 503 | %{_mandir}/man1/ogrlineref.1* |
4058fbc3 JB |
504 | %{_mandir}/man1/ogrtindex.1* |
505 | %{_mandir}/man1/pct2rgb.1* | |
506 | %{_mandir}/man1/rgb2pct.1* | |
6b59fa88 JB |
507 | |
508 | %files devel | |
509 | %defattr(644,root,root,755) | |
388b39cb | 510 | %doc _html/* |
5014b82a | 511 | %attr(755,root,root) %{_bindir}/gdal-config |
6b59fa88 | 512 | %attr(755,root,root) %{_libdir}/libgdal.so |
5014b82a | 513 | %{_libdir}/libgdal.la |
0316feee | 514 | %{_pkgconfigdir}/gdal.pc |
e582c3b1 | 515 | %{_includedir}/gdal |
5014b82a | 516 | %{_mandir}/man1/gdal-config.1* |
6b59fa88 JB |
517 | |
518 | %files static | |
519 | %defattr(644,root,root,755) | |
9b5c0fd4 | 520 | %{_libdir}/libgdal.a |
6b59fa88 | 521 | |
a0ffd9c4 JB |
522 | %files -n perl-gdal |
523 | %defattr(644,root,root,755) | |
524 | %dir %{perl_vendorarch}/Geo | |
525 | %{perl_vendorarch}/Geo/GDAL.pm | |
526 | %dir %{perl_vendorarch}/Geo/GDAL | |
527 | %{perl_vendorarch}/Geo/GDAL/Const.pm | |
528 | %{perl_vendorarch}/Geo/OGR.pm | |
529 | %{perl_vendorarch}/Geo/OSR.pm | |
530 | %dir %{perl_vendorarch}/auto/Geo | |
531 | %dir %{perl_vendorarch}/auto/Geo/GDAL | |
a0ffd9c4 JB |
532 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so |
533 | %dir %{perl_vendorarch}/auto/Geo/GDAL/Const | |
a0ffd9c4 JB |
534 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so |
535 | %dir %{perl_vendorarch}/auto/Geo/OGR | |
a0ffd9c4 JB |
536 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so |
537 | %dir %{perl_vendorarch}/auto/Geo/OSR | |
a0ffd9c4 JB |
538 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so |
539 | ||
9b4989ae | 540 | %if %{with php} |
ead243f9 | 541 | %files -n %{php_name}-gdal |
9b4989ae JB |
542 | %defattr(644,root,root,755) |
543 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/gdal.ini | |
544 | %attr(755,root,root) %{php_extensiondir}/gdal.so | |
545 | %attr(755,root,root) %{php_extensiondir}/gdalconst.so | |
546 | %attr(755,root,root) %{php_extensiondir}/ogr.so | |
547 | %attr(755,root,root) %{php_extensiondir}/osr.so | |
548 | %endif | |
549 | ||
6b59fa88 JB |
550 | %files -n python-gdal |
551 | %defattr(644,root,root,755) | |
9a2dbbce JB |
552 | %{py_sitedir}/gdal.py[co] |
553 | %{py_sitedir}/gdalconst.py[co] | |
554 | %{py_sitedir}/gdalnumeric.py[co] | |
9a2dbbce JB |
555 | %{py_sitedir}/ogr.py[co] |
556 | %{py_sitedir}/osr.py[co] | |
69051332 JB |
557 | %{py_sitedir}/GDAL-*.egg-info |
558 | %dir %{py_sitedir}/osgeo | |
559 | %attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so | |
560 | %attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so | |
561 | %attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so | |
562 | %attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so | |
563 | %attr(755,root,root) %{py_sitedir}/osgeo/_osr.so | |
564 | %{py_sitedir}/osgeo/*.py[co] | |
a0ffd9c4 | 565 | |
4aafe7c0 | 566 | %if %{with ruby} |
a0ffd9c4 JB |
567 | %files -n ruby-gdal |
568 | %defattr(644,root,root,755) | |
315a1c4a ER |
569 | %dir %{ruby_vendorarchdir}/gdal |
570 | %attr(755,root,root) %{ruby_vendorarchdir}/gdal/gdal.so | |
571 | %attr(755,root,root) %{ruby_vendorarchdir}/gdal/gdalconst.so | |
572 | %attr(755,root,root) %{ruby_vendorarchdir}/gdal/ogr.so | |
573 | %attr(755,root,root) %{ruby_vendorarchdir}/gdal/osr.so | |
4aafe7c0 | 574 | %endif |