~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to rpm/fedora/grass_FC7.spec

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# GRASS 6.X RPM spec file for ITC
2
 
# This file is Free Software under GNU GPL v>=2.
3
 
# Derived from grass_FC4.spec
4
 
 
5
 
# Define snap to use the snapshot version, change cvssnapshot and cvsversion accordingly
6
 
#
7
 
%define snap 0
8
 
 
9
 
%define with_blas       0
10
 
%define with_ffmpeg     0
11
 
%define with_fftw3      1
12
 
%define with_odbc       1
13
 
%define with_mysql      0
14
 
%define with_postgres   1
15
 
%define with_largefiles 1
16
 
%define with_motif      0
17
 
%define with_readline   0
18
 
 
19
 
#
20
 
# Turn off automatic generation of dependencies to
21
 
# avoid a problem with libgrass* dependency issues.
22
 
# Other dependencies listed below.
23
 
#
24
 
%define _use_internal_dependency_generator 0
25
 
 
26
 
# Filter out the library number on provides
27
 
%define __find_provides %{_tmppath}/find_provides.sh
28
 
 
29
 
# Disable the _find_requires macro.
30
 
%define __find_requires %{nil}
31
 
 
32
 
 
33
 
%if "%{snap:1}" == "0"
34
 
%define PACKAGE_VERSION 6.2.2
35
 
%define PACKAGE_RELEASE 1
36
 
%define shortver 62
37
 
%else
38
 
%define cvssnapshot     2006_11_03
39
 
%define cvsversion      6.2.2
40
 
%define PACKAGE_VERSION %{cvsversion}
41
 
%define PACKAGE_RELEASE 1
42
 
%define shortver 62
43
 
%endif
44
 
 
45
 
 
46
 
#Query the RPM database to find which redhat/fedora release we are running.
47
 
%if %(rpmquery fedora-release | grep -cv 'not installed$')
48
 
    %define FCL 1
49
 
    %define VER1 %(rpmquery --qf '%{VERSION}' fedora-release)
50
 
%endif
51
 
%if %(rpmquery redhat-release | grep -v 'not installed$' | grep -c -e '-[0-9][DAEW]')
52
 
    %define ENT 1
53
 
    %define VER1 %(rpmquery --qf '%{VERSION}' redhat-release|cut -c1)   
54
 
%endif
55
 
%if %(rpmquery sl-release | grep -v 'not installed$' | grep -c -e '-[0-9]')
56
 
    %define SLC 1
57
 
    %define VER1 %(rpmquery --qf '%{VERSION}' sl-release|cut -c1-)      
58
 
%endif
59
 
 
60
 
 
61
 
Summary:        GRASS - Geographic Resources Analysis Support System
62
 
Name:           grass
63
 
Version:        %PACKAGE_VERSION
64
 
Epoch:          %PACKAGE_RELEASE
65
 
%{?FCL:Release: %{PACKAGE_RELEASE}.fc%{VER1}}
66
 
%{?ENT:Release: %{PACKAGE_RELEASE}.E%{VER1}}
67
 
%{?SLC:Release: %{PACKAGE_RELEASE}.SL%{VER1}}
68
 
%if "%{snap:1}" == "0"
69
 
Source:     http://grass.itc.it/grass62/source/grass-%{PACKAGE_VERSION}.tar.bz2
70
 
%else
71
 
Source:     http://grass.itc.it/grass62/source/snapshot/grass-%{cvsversion}.cvs_src_snapshot_%{cvssnapshot}.tar.gz
72
 
%endif
73
 
License:        GPL, Copyright by the GRASS Development Team
74
 
Group:          Sciences/Geosciences
75
 
Packager:   Brad Douglas <rez@touchofmadness.com>
76
 
URL:        http://grass.itc.it/index.php
77
 
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)/%{name}-%{version}
78
 
Prefix:     %{_prefix}
79
 
 
80
 
Requires:       gdal >= 1.3
81
 
BuildRequires:  gdal-devel >= 1.3
82
 
Requires:       tcl >= 8.3
83
 
BuildRequires:  tcl-devel >= 8.3
84
 
Requires:       tk >= 8.3
85
 
BuildRequires:  tk-devel >= 8.3
86
 
Requires:       proj >= 4.5.0
87
 
BuildRequires:  proj-devel >= 4.5.0
88
 
Requires:       geos >= 2.2.3
89
 
BuildRequires:  geos-devel >= 2.2.3
90
 
#Requires:       freetype >= 2.3.0
91
 
#BuildRequires:  freetype-devel >= 2.3.0
92
 
Requires:       freetype >= 2.2.0
93
 
BuildRequires:  freetype-devel >= 2.2.0
94
 
Requires:       bash >= 3.0
95
 
Requires:       mesa-libGL >= 6.5
96
 
BuildRequires:  mesa-libGL-devel >= 6.5
97
 
Requires:       libX11 >= 1.0
98
 
BuildRequires:  libX11-devel >= 1.0
99
 
Requires:               sqlite >= 3.3
100
 
BuildRequires:  sqlite-devel >= 3.3
101
 
%if "%{with_motif}" == "1"
102
 
Requires:       lesstif >= 0.95
103
 
BuildRequires:  lesstif-devel >= 0.95
104
 
%endif
105
 
#Requires:       glibc >= 2.6
106
 
#BuildRequires:  glibc-devel >= 2.6
107
 
Requires:       glibc >= 2.5
108
 
BuildRequires:  glibc-devel >= 2.5
109
 
Requires:       libgcc >= 4.1.0
110
 
#Requires:       ncurses >= 5.6
111
 
#BuildRequires:  ncurses-devel >= 5.6
112
 
Requires:       ncurses >= 5.5
113
 
BuildRequires:  ncurses-devel >= 5.5
114
 
Requires:       libpng >= 1.2.12
115
 
BuildRequires:  libpng-devel >= 1.2.12
116
 
Requires:               libjpeg
117
 
BuildRequires:  libjpeg-devel
118
 
Requires:       libstdc++ >= 4.1
119
 
BuildRequires:  libstdc++-devel >= 4.1
120
 
Requires:       libtiff >= 3.8
121
 
BuildRequires:  libtiff-devel >= 3.8
122
 
Requires:       zlib >= 1.2
123
 
BuildRequires:  zlib-devel >= 1.2
124
 
%if "%{with_readline}" == "1"
125
 
Requires:       readline >= 5.1
126
 
BuildRequires:  readline-devel >= 5.1
127
 
%endif
128
 
%if "%{with_fftw3}" == "1"
129
 
Requires:       fftw3 >= 3.1
130
 
BuildRequires:  fftw3-devel >= 3.1
131
 
%endif
132
 
%if "%{with_blas}" == "1"
133
 
Requires:       blas >= 3.1
134
 
BuildRequires:  blas >= 3.1
135
 
Requires:       lapack >= 3.1
136
 
BuildRequires:  lapack >= 3.1
137
 
%endif
138
 
%if "%{with_ffmpeg}" == "1"
139
 
Requires:       ffmpeg
140
 
BuildRequires:  ffmpeg-devel
141
 
%endif
142
 
%if "%{with_odbc}" == "1"
143
 
Requires:           unixODBC >= 2.2
144
 
BuildRequires:  unixODBC-devel >= 2.2
145
 
%endif
146
 
%if "%{with_mysql}" == "1"
147
 
Requires:               mysql
148
 
BuildRequires:  mysql-devel
149
 
%endif
150
 
%if "%{with_postgres}" == "1"
151
 
#Requires:       postgresql-libs >= 8.2
152
 
#BuildRequires: postgresql-devel >= 8.2
153
 
Requires:       postgresql-libs >= 8.1
154
 
BuildRequires:  postgresql-devel >= 8.1
155
 
%endif
156
 
Requires:               python >= 2.4
157
 
BuildRequires:  python-devel >= 2.4
158
 
BuildRequires:  bison
159
 
BuildRequires:  flex
160
 
BuildRequires:  man
161
 
 
162
 
Vendor: GRASS
163
 
#
164
 
# clean up of provides for other packages: gdal-grass, qgis etc.
165
 
#
166
 
 
167
 
%description
168
 
GRASS (Geographic Resources Analysis Support System) is a Geographic
169
 
Information System (GIS) used for geospatial data management and
170
 
analysis, image processing, graphics/maps production, spatial
171
 
modeling, and visualization. GRASS is currently used in academic and
172
 
commercial settings around the world, as well as by many governmental
173
 
agencies and environmental consulting companies.
174
 
 
175
 
 
176
 
%prep
177
 
%if "%{snap:1}" == "0"
178
 
%setup  -n %{name}-%{version}  ## name the directory
179
 
%else
180
 
%setup  -n %{name}-%{version}.cvs_src_snapshot_%{cvssnapshot}  ## name the directory
181
 
%endif
182
 
 
183
 
#
184
 
# Filter out library number
185
 
#
186
 
cat > %{_tmppath}/find_provides.sh <<EOF
187
 
#!/bin/sh
188
 
/usr/lib/rpm/redhat/find-provides | sed -e 's/%{version}\.//g' | sort -u
189
 
exit 0
190
 
EOF
191
 
chmod ugo+x %{_tmppath}/find_provides.sh
192
 
 
193
 
#
194
 
# Edit configure script for libraries
195
 
#
196
 
%if "%{with_readline}" == "1"
197
 
sed -i 's/-lreadline/-lreadline -lcurses/g' configure
198
 
chmod +x configure
199
 
%endif
200
 
 
201
 
%build
202
 
#
203
 
#configure with shared libs:
204
 
#
205
 
#%if "%{FCL}" == "1" &&  "%{VER1}" == "4"
206
 
#CFLAGS="-O2 -g -Wall"
207
 
#%else
208
 
#CFLAGS="-O2 -g -Wall -Werror-implicit-function-declaration -fno-common"
209
 
#%endif
210
 
 
211
 
CXXFLAGS="-O2 -g -Wall"
212
 
 
213
 
(%configure  \
214
 
    --enable-shared     \
215
 
    --with-includes=%{_includedir}  \
216
 
    --with-cxx          \
217
 
    --with-jpeg         \
218
 
    --with-tiff         \
219
 
    --with-png          \
220
 
    --with-tcltk        \
221
 
%if "%{with_postgres}" == "1"
222
 
    --with-postgres     \
223
 
    --with-postgres-includes=%{_includedir}/pgsql \
224
 
    --with-postgres-libs=%{_libdir}               \
225
 
%else
226
 
    --without-postgres  \
227
 
%endif
228
 
%if "%{with_mysql}" == "1"
229
 
    --with-mysql \
230
 
    --with-mysql-includes=%{_includedir}/mysql   \
231
 
    --with-mysql-libs=%{_libdir}/mysql           \
232
 
%else
233
 
    --without-mysql     \
234
 
%endif
235
 
    --with-sqlite       \
236
 
%if "%{with_ffmpeg}" == "1"
237
 
    --with-ffmpeg       \
238
 
    --with-ffmpeg-includes=%{_includedir}/ffmpeg \
239
 
    --with-ffmpeg-libs=%{_libdir}                \
240
 
%else
241
 
    --without-ffmpeg    \
242
 
%endif
243
 
    --with-opengl       \
244
 
%if "%{with_odbc}" == "1"
245
 
    --with-odbc         \
246
 
    --with-odbc-libs=%{_libdir}                  \
247
 
    --with-odbc-includes=%{_includedir}          \
248
 
%else
249
 
    --without-odbc      \
250
 
%endif
251
 
%if "%{with_fftw3}" == "1"
252
 
    --with-fftw         \
253
 
%else
254
 
    --without-fftw      \
255
 
%endif
256
 
%if "%{with_blas}" == "1"
257
 
    --with-blas         \
258
 
    --with-lapack       \
259
 
%else
260
 
    --without-blas      \
261
 
    --without-lapack    \
262
 
%endif
263
 
%if "%{with_motif}" == "1"
264
 
    --with-motif        \
265
 
%else
266
 
    --without-motif     \
267
 
%endif
268
 
    --with-freetype     \
269
 
    --with-freetype-includes=%{_includedir}/freetype2 \
270
 
    --without-glw       \
271
 
    --with-nls          \
272
 
%if "%{with_readline}" == "1"
273
 
    --with-readline     \
274
 
    --with-readline-includes=%{_includedir}/readline  \
275
 
    --with-readline-libs=%{_libdir}                   \
276
 
%else
277
 
    --without-readline  \
278
 
%endif
279
 
    --without-opendwg   \
280
 
    --with-curses       \
281
 
    --with-python       \
282
 
    --with-gdal=/usr/bin/gdal-config \
283
 
    --with-proj         \
284
 
    --with-proj-includes=%{_includedir} \
285
 
    --with-proj-libs=%{_libdir}         \
286
 
    --with-proj-share=%{_datadir}/proj  \
287
 
%if "%{with_largefiles}" == "1"
288
 
    --enable-largefile  \
289
 
%endif
290
 
    --with-x
291
 
)
292
 
 
293
 
#configure with shared libs:
294
 
 
295
 
make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir}  \
296
 
     PREFIX=%{buildroot}%{_prefix}
297
 
 
298
 
%install
299
 
 
300
 
rm -rf %{buildroot}
301
 
 
302
 
make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir} \
303
 
   PREFIX=%{buildroot}%{_prefix} install
304
 
 
305
 
# changing GISBASE in startup script (deleting %{buildroot} from path)
306
 
mv %{buildroot}%{_bindir}/grass%{shortver} %{buildroot}%{_bindir}/grass%{shortver}.tmp
307
 
 
308
 
cat  %{buildroot}%{_bindir}/grass%{shortver}.tmp | \
309
 
    sed -e "1,\$s&^GISBASE.*&GISBASE=%{_prefix}/grass-%{version}&" | \
310
 
    cat - > %{buildroot}%{_bindir}/grass%{shortver}
311
 
 
312
 
rm %{buildroot}%{_bindir}/grass%{shortver}.tmp
313
 
chmod +x %{buildroot}%{_bindir}/grass%{shortver}
314
 
 
315
 
# Make grass libraries available on the system
316
 
install -d %{buildroot}/etc/ld.so.conf.d
317
 
echo %{_prefix}/grass-%{version}/%{_lib} >> %{buildroot}/etc/ld.so.conf.d/grass-%{version}.conf
318
 
 
319
 
# Install pkg-config
320
 
if [ ! -d %{buildroot}%{_libdir}/pkgconfig ]
321
 
then
322
 
 mkdir -p %{buildroot}%{_libdir}/pkgconfig
323
 
fi
324
 
install -m 644 grass.pc %{buildroot}%{_libdir}/pkgconfig/
325
 
 
326
 
%clean
327
 
rm -rf %{buildroot}
328
 
 
329
 
#cd ..
330
 
#rm -rf grass-%{version}
331
 
 
332
 
%files
333
 
%defattr(-,root,root)
334
 
 
335
 
%doc AUTHORS COPYING GPL.TXT README REQUIREMENTS.html
336
 
 
337
 
%attr(0755,root,root)
338
 
 
339
 
%{_bindir}/grass%{shortver}
340
 
%{_bindir}/gem
341
 
%{_prefix}/grass-%{version}
342
 
%{_libdir}/pkgconfig/grass.pc
343
 
/etc/ld.so.conf.d/grass-%{version}.conf
344
 
 
345
 
%post -p /sbin/ldconfig
346
 
 
347
 
%postun -p /sbin/ldconfig
348
 
 
349
 
%Changelog
350
 
* Tue Jul 24 2007 Brad Douglas <rez@touchofmadness.com>
351
 
  - Commented out FLAGS section - use default %configure eval
352
 
  - Reorganized configure layout and specified all options
353
 
* Tue Jul 17 2007 Brad Douglas <rez@touchofmadness.com>
354
 
  - Conditionalized readline dependency
355
 
* Tue Dec 12 2006 Brad Douglas <rez@touchofmadness.com>
356
 
  - Conditionalized openmotif/lesstif dependency for (>=FC5)
357
 
* Tue Nov 15 2006 Brad Douglas <rez@touchofmadness.com>
358
 
  - sed configure to add ncurses dependency for readline (>=FC5)
359
 
* Fri Oct 20 2006 Markus Neteler <neteler@itc.it>
360
 
  - fftw3 conditionalized (needed for FC4); less strict compiler flags
361
 
* Tue Oct 17 2006 Roberto Flor <flor@itc.it>
362
 
  - Moved to 6.2.0RC3, enabled ffmpeg, added snapshot/version flag
363
 
* Tue Mar 17 2006 Roberto Flor <flor@itc.it>
364
 
  - Added with/without option
365
 
  - Added cvs snapshot option
366
 
  - Fixed a lot of inconsistency on x86_64 lib
367
 
* Tue Feb 28 2006 Roberto Flor <flor@itc.it>
368
 
  - Small changes and cleanup. Requires FC4 or RH Enterprise 4.
369
 
  - Dirty fix for provides error
370
 
* Thu Oct 12 2005 Markus Neteler <neteler@itc.it>
371
 
  - First build of RPM for Fedora Core 4.
372
 
* Thu Mar 30 2005 Craig Aumann <caumann@ualberta.ca>
373
 
  - First build of RPM for Fedora Core 3.
374
 
* Wed Sep 01 2004 Bernhard Reiter <bernhard@intevation.de>
375
 
  - made ready to be checked into GRASS CVS: added header, disabled Patch1
376
 
* Tue Aug 10 2004 Silke Reimer <silke.reimer@intevation.net>
377
 
  - small changes to fit to Fedora naming conventions
378
 
* Thu Jul 01 2004 Silke Reimer <silke.reimer@intevation.net>
379
 
  - Initial build