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
5
# Define snap to use the snapshot version, change cvssnapshot and cvsversion accordingly
9
%define PACKAGE_NAME grass
11
%if "%{!?snap:1}" == "1"
12
%define PACKAGE_VERSION 6.2.0RC3
13
%define PACKAGE_URL http://grass.itc.it/index.php
14
%define PACKAGE_RELEASE 1
17
%define cvssnapshot 2006_10_14
18
%define cvsversion 6.3
19
%define PACKAGE_VERSION %{cvsversion}
20
%define PACKAGE_RELEASE 1
24
%define _bindir /usr/bin
31
%define with_postgres 1
32
%define with_largefiles 1
34
# Turn off automatic generation of dependencies to
35
# avoid a problem with libgrass* dependency issues.
36
# Other dependencies listed below.
37
%define _use_internal_dependency_generator 0
38
# Filter out the library number on provides
39
%define __find_provides %{_tmppath}/find_provides.sh
40
# Disable the _find_requires macro.
41
%define __find_requires %{nil}
45
#Query the RPM database to find which redhat/fedora release we are running.
46
%if %(rpmquery fedora-release | grep -cv 'not installed$')
48
%define VER1 %(rpmquery --qf '%{VERSION}' fedora-release)
50
%if %(rpmquery redhat-release | grep -v 'not installed$' | grep -c -e '-[0-9][DAEW]')
52
%define VER1 %(rpmquery --qf '%{VERSION}' redhat-release|cut -c1)
54
%if %(rpmquery sl-release | grep -v 'not installed$' | grep -c -e '-[0-9]')
56
%define VER1 %(rpmquery --qf '%{VERSION}' sl-release|cut -c1-)
60
Summary: GRASS - Geographic Resources Analysis Support System
62
Version: %PACKAGE_VERSION
63
Epoch: %PACKAGE_RELEASE
64
%{?FCL:Release: %{PACKAGE_RELEASE}.fdr.fc%{VER1}}
65
%{?ENT:Release: %{PACKAGE_RELEASE}.E%{VER1}}
66
%{?SLC:Release: %{PACKAGE_RELEASE}.SL%{VER1}}
67
%if "%{!?snap:1}" == "1"
68
Source: http://grass.itc.it/grass62/source/grass-%{PACKAGE_VERSION}.tar.gz
70
Source: http://grass.itc.it/grass63/source/snapshot/grass-%{cvsversion}.cvs_src_snapshot_%{cvssnapshot}.tar.gz
72
License: GPL, Copyright by the GRASS Development Team
73
Group: Sciences/Geosciences
74
Packager: Markus Neteler <neteler@itc.it>
76
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)/%{name}-%{version}
80
BuildRequires: gdal-devel >= 1.3
82
BuildRequires: tcl-devel >= 8.3
84
BuildRequires: tk-devel >= 8.3
85
Requires: proj >= 4.4.9
86
BuildRequires: proj-devel >= 4.4.9
87
Requires: geos >= 2.1.1
88
BuildRequires: geos-devel >= 2.1.1
89
Requires: freetype >= 2.0.0
90
BuildRequires: freetype-devel >= 2.0.0
92
Requires: xorg-x11-Mesa-libGL >= 6.8
93
BuildRequires: xorg-x11-Mesa-libGL >= 6.8
94
Requires: xorg-x11-libs >= 6.8
95
BuildRequires: xorg-x11-devel >= 6.8
96
Requires: openmotif >= 2.2.3
97
BuildRequires: openmotif-devel >= 2.2.3
98
Requires: glibc >= 2.0
99
BuildRequires: glibc-devel >= 2.0
100
Requires: libgcc >= 3.4.2
101
Requires: ncurses >= 5.4
102
BuildRequires: ncurses-devel >= 5.4
103
Requires: libpng >= 1.2.8
104
BuildRequires: libpng-devel >= 1.2.8
106
BuildRequires: libjpeg-devel
107
Requires: libstdc++ >= 3.4
108
BuildRequires: libstdc++-devel >= 3.4
109
Requires: libtiff >= 3.6
110
BuildRequires: libtiff-devel >= 3.6
111
Requires: zlib >= 1.2
112
BuildRequires: zlib-devel >= 1.2
113
%if "%{with_fftw3}" == "1"
114
Requires: fftw3 >= 3.1
115
BuildRequires: fftw3-devel >= 3.1
117
%if "%{with_blas}" == "1"
118
Requires: blas >= 3.0
119
BuildRequires: blas >= 3.0
120
Requires: lapack >= 3.0
121
BuildRequires: lapack >= 3.0
123
%if "%{with_ffmpeg}" == "1"
125
BuildRequires: ffmpeg-devel
127
%if "%{with_odbc}" == "1"
129
BuildRequires: unixODBC-devel
131
%if "%{with_mysql}" == "1"
133
BuildRequires: mysql-devel
135
%if "%{with_postgres}" == "1"
136
Requires: postgresql-libs >= 7.3
137
BuildRequires: postgresql-devel >= 7.3
145
# clean up of provides for other packages: gdal-grass, qgis etc.
149
GRASS (Geographic Resources Analysis Support System) is a Geographic
150
Information System (GIS) used for geospatial data management and
151
analysis, image processing, graphics/maps production, spatial
152
modeling, and visualization. GRASS is currently used in academic and
153
commercial settings around the world, as well as by many governmental
154
agencies and environmental consulting companies.
158
#%setup -q ## run quietly with minimal output.
159
%if "%{!?snap:1}" == "1"
160
%setup -n %{name}-%{version} ## name the directory
162
%setup -n %{name}-%{version}.cvs_src_snapshot_%{cvssnapshot} ## name the directory
165
# Filter out library number
167
cat > %{_tmppath}/find_provides.sh <<EOF
169
/usr/lib/rpm/redhat/find-provides | sed -e 's/%{version}\.//g' | sort -u
172
chmod ugo+x %{_tmppath}/find_provides.sh
176
#configure with shared libs:
178
%if "%{FCL}" == "1" && "%{VER1}" == "4"
179
CFLAGS="-O2 -g -Wall"
181
CFLAGS="-O2 -g -Wall -Werror-implicit-function-declaration -fno-common"
184
CXXFLAGS="-O2 -g -Wall"
189
%if "%{with_largefiles}" == "1"
192
%if "%{with_fftw3}" == "1"
197
--with-includes=%{_includedir} \
198
--with-libs=%{_libdir} \
200
--with-motif-includes=/usr/X11R6/include/Xm \
201
--with-freetype=yes \
202
--with-freetype-includes=%{_includedir}/freetype2 \
204
--with-gdal=/usr/bin/gdal-config \
206
--with-proj-includes=%{_includedir} \
207
--with-proj-libs=%{_libdir} \
208
--with-proj-share=/usr/share/proj \
211
%if "%{with_mysql}" == "1"
213
--with-mysql-includes=%{_includedir}/mysql \
214
--with-mysql-libs=%{_libdir}/mysql \
218
%if "%{with_odbc}" == "1"
220
--with-odbc-libs=%{_libdir} \
221
--with-odbc-includes=%{_includedir} \
225
%if "%{with_postgres}" == "1"
227
--with-postgres-includes=%{_includedir}/pgsql \
228
--with-postgres-libs=%{_libdir} \
232
%if "%{with_blas}" == "1"
236
%if "%{with_ffmpeg}" == "1"
238
--with-ffmpeg-includes=%{_includedir}/ffmpeg
239
--with-ffmpeg-libs=%{_libdir}
244
#configure with shared libs:
246
make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir} \
247
PREFIX=%{buildroot}%{_prefix}
253
make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir} \
254
PREFIX=%{buildroot}%{_prefix} install
256
# changing GISBASE in startup script (deleting %{buildroot} from path)
257
mv %{buildroot}%{_bindir}/grass%{shortver} %{buildroot}%{_bindir}/grass%{shortver}.tmp
259
cat %{buildroot}%{_bindir}/grass%{shortver}.tmp | \
260
sed -e "1,\$s&^GISBASE.*&GISBASE=%{_prefix}/grass-%{version}&" | \
261
cat - > %{buildroot}%{_bindir}/grass%{shortver}
263
rm %{buildroot}%{_bindir}/grass%{shortver}.tmp
264
chmod +x %{buildroot}%{_bindir}/grass%{shortver}
266
# Make grass libraries available on the system
267
install -d %{buildroot}/etc/ld.so.conf.d
268
echo %{_prefix}/grass-%{version}/%{_lib} >> %{buildroot}/etc/ld.so.conf.d/grass-%{version}.conf
271
if [ ! -d %{buildroot}%{_libdir}/pkgconfig ]
273
mkdir -p %{buildroot}%{_libdir}/pkgconfig
275
install -m 644 grass.pc %{buildroot}%{_libdir}/pkgconfig/
281
#rm -rf grass-%{version}
284
%defattr(-,root,root)
286
%doc AUTHORS COPYING GPL.TXT README REQUIREMENTS.html
288
%attr(0755,root,root)
290
%{_bindir}/grass%{shortver}
292
%{_prefix}/grass-%{version}
293
%{_libdir}/pkgconfig/grass.pc
294
/etc/ld.so.conf.d/grass-%{version}.conf
296
%post -p /sbin/ldconfig
298
%postun -p /sbin/ldconfig
301
* Fri Oct 20 2006 Markus Neteler <neteler@itc.it>
302
- fftw3 conditionalized (needed for FC4); less strict compiler flags
303
* Tue Oct 17 2006 Roberto Flor <flor@itc.it>
304
- Moved to 6.2.0RC3, enabled ffmpeg, added snapshot/version flag
305
* Tue Mar 17 2006 Roberto Flor <flor@itc.it>
306
- Added with/without option
307
- Added cvs snapshot option
308
- Fixed a lot of inconsistency on x86_64 lib
309
* Tue Feb 28 2006 Roberto Flor <flor@itc.it>
310
- Small changes and cleanup. Requires FC4 or RH Enterprise 4.
311
- Dirty fix for provides error
312
* Thu Oct 12 2005 Markus Neteler <neteler@itc.it>
313
- First build of RPM for Fedora Core 4.
314
* Thu Mar 30 2005 Craig Aumann <caumann@ualberta.ca>
315
- First build of RPM for Fedora Core 3.
316
* Wed Sep 01 2004 Bernhard Reiter <bernhard@intevation.de>
317
- made ready to be checked into GRASS CVS: added header, disabled Patch1
318
* Tue Aug 10 2004 Silke Reimer <silke.reimer@intevation.net>
319
- small changes to fit to Fedora naming conventions
320
* Thu Jul 01 2004 Silke Reimer <silke.reimer@intevation.net>