~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to rpm/fedora/grass_FC4.spec

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

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 1
8
 
 
9
 
%define PACKAGE_NAME grass
10
 
 
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
15
 
%define shortver 62
16
 
%else
17
 
%define cvssnapshot     2006_10_14
18
 
%define cvsversion      6.3
19
 
%define PACKAGE_VERSION %{cvsversion}
20
 
%define PACKAGE_RELEASE 1
21
 
%define shortver 63
22
 
%endif
23
 
%define _prefix /usr
24
 
%define _bindir /usr/bin
25
 
 
26
 
%define with_blas       0
27
 
%define with_ffmpeg     0
28
 
%define with_fftw3      0
29
 
%define with_odbc       0
30
 
%define with_mysql      0
31
 
%define with_postgres   1
32
 
%define with_largefiles 1
33
 
 
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}
42
 
 
43
 
 
44
 
 
45
 
#Query the RPM database to find which redhat/fedora release we are running.
46
 
%if %(rpmquery fedora-release | grep -cv 'not installed$')
47
 
    %define FCL 1
48
 
    %define VER1 %(rpmquery --qf '%{VERSION}' fedora-release)
49
 
%endif
50
 
%if %(rpmquery redhat-release | grep -v 'not installed$' | grep -c -e '-[0-9][DAEW]')
51
 
    %define ENT 1
52
 
    %define VER1 %(rpmquery --qf '%{VERSION}' redhat-release|cut -c1)   
53
 
%endif
54
 
%if %(rpmquery sl-release | grep -v 'not installed$' | grep -c -e '-[0-9]')
55
 
    %define SLC 1
56
 
    %define VER1 %(rpmquery --qf '%{VERSION}' sl-release|cut -c1-)      
57
 
%endif
58
 
 
59
 
 
60
 
Summary:        GRASS - Geographic Resources Analysis Support System
61
 
Name:           %PACKAGE_NAME
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  
69
 
%else
70
 
Source:         http://grass.itc.it/grass63/source/snapshot/grass-%{cvsversion}.cvs_src_snapshot_%{cvssnapshot}.tar.gz
71
 
%endif
72
 
License:        GPL, Copyright by the GRASS Development Team
73
 
Group:          Sciences/Geosciences
74
 
Packager:       Markus Neteler <neteler@itc.it>
75
 
URL:            %PACKAGE_URL
76
 
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)/%{name}-%{version}
77
 
Prefix:         %{_prefix}
78
 
 
79
 
Requires:       gdal >= 1.3
80
 
BuildRequires:  gdal-devel >= 1.3
81
 
Requires:       tcl >= 8.3
82
 
BuildRequires:  tcl-devel >= 8.3
83
 
Requires:       tk >= 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
91
 
Requires:       bash >= 3.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
105
 
Requires:       libjpeg
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
116
 
%endif
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
122
 
%endif
123
 
%if "%{with_ffmpeg}" == "1"
124
 
Requires:       ffmpeg
125
 
BuildRequires:  ffmpeg-devel
126
 
%endif
127
 
%if "%{with_odbc}" == "1"
128
 
Requires:       unixODBC     
129
 
BuildRequires:  unixODBC-devel
130
 
%endif
131
 
%if "%{with_mysql}" == "1"
132
 
Requires:       mysql
133
 
BuildRequires:  mysql-devel
134
 
%endif
135
 
%if "%{with_postgres}" == "1"
136
 
Requires:       postgresql-libs >= 7.3
137
 
BuildRequires:  postgresql-devel >= 7.3
138
 
%endif
139
 
BuildRequires:  bison
140
 
BuildRequires:  flex
141
 
BuildRequires:  man
142
 
 
143
 
Vendor: GRASS
144
 
#
145
 
# clean up of provides for other packages: gdal-grass, qgis etc.
146
 
#
147
 
 
148
 
%description
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.
155
 
 
156
 
 
157
 
%prep
158
 
#%setup -q   ## run quietly with minimal output.
159
 
%if "%{!?snap:1}" == "1"
160
 
%setup  -n %{name}-%{version}  ## name the directory
161
 
%else
162
 
%setup  -n %{name}-%{version}.cvs_src_snapshot_%{cvssnapshot}  ## name the directory
163
 
%endif
164
 
#
165
 
# Filter out library number
166
 
#
167
 
cat > %{_tmppath}/find_provides.sh <<EOF
168
 
#!/bin/sh
169
 
/usr/lib/rpm/redhat/find-provides | sed -e 's/%{version}\.//g' | sort -u
170
 
exit 0
171
 
EOF
172
 
chmod ugo+x %{_tmppath}/find_provides.sh
173
 
 
174
 
%build
175
 
#
176
 
#configure with shared libs:
177
 
#
178
 
%if "%{FCL}" == "1" &&  "%{VER1}" == "4"
179
 
CFLAGS="-O2 -g -Wall"
180
 
%else
181
 
CFLAGS="-O2 -g -Wall -Werror-implicit-function-declaration -fno-common"
182
 
%endif
183
 
 
184
 
CXXFLAGS="-O2 -g -Wall"
185
 
#LDFLAGS="-s"
186
 
 
187
 
( %configure  \
188
 
   --enable-shared \
189
 
%if "%{with_largefiles}" == "1"
190
 
   --enable-largefile \
191
 
%endif
192
 
%if "%{with_fftw3}" == "1"
193
 
   --with-fftw \
194
 
%else
195
 
   --without-fftw \
196
 
%endif
197
 
   --with-includes=%{_includedir} \
198
 
   --with-libs=%{_libdir} \
199
 
   --with-motif \
200
 
   --with-motif-includes=/usr/X11R6/include/Xm \
201
 
   --with-freetype=yes \
202
 
   --with-freetype-includes=%{_includedir}/freetype2 \
203
 
   --with-nls \
204
 
   --with-gdal=/usr/bin/gdal-config \
205
 
   --with-proj \
206
 
   --with-proj-includes=%{_includedir} \
207
 
   --with-proj-libs=%{_libdir}  \
208
 
   --with-proj-share=/usr/share/proj \
209
 
   --with-glw \
210
 
   --with-sqlite \
211
 
%if "%{with_mysql}" == "1"
212
 
   --with-mysql \
213
 
   --with-mysql-includes=%{_includedir}/mysql \
214
 
   --with-mysql-libs=%{_libdir}/mysql \
215
 
%else
216
 
   --without-mysql \
217
 
%endif
218
 
%if "%{with_odbc}" == "1"
219
 
   --with-odbc  \
220
 
   --with-odbc-libs=%{_libdir} \
221
 
   --with-odbc-includes=%{_includedir} \
222
 
%else
223
 
   --without-odbc \
224
 
%endif
225
 
%if "%{with_postgres}" == "1"
226
 
   --with-postgres  \
227
 
   --with-postgres-includes=%{_includedir}/pgsql \
228
 
   --with-postgres-libs=%{_libdir} \
229
 
%else
230
 
   --without-postgres  \
231
 
%endif
232
 
%if "%{with_blas}" == "1"
233
 
   --with-blas  \
234
 
   --with-lapack  \
235
 
%endif
236
 
%if "%{with_ffmpeg}" == "1"
237
 
   --with-ffmpeg \
238
 
   --with-ffmpeg-includes=%{_includedir}/ffmpeg
239
 
   --with-ffmpeg-libs=%{_libdir}
240
 
%endif
241
 
   --with-cxx
242
 
)
243
 
 
244
 
#configure with shared libs:
245
 
 
246
 
make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir}  \
247
 
     PREFIX=%{buildroot}%{_prefix}
248
 
 
249
 
%install
250
 
 
251
 
rm -rf %{buildroot}
252
 
 
253
 
make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir} \
254
 
   PREFIX=%{buildroot}%{_prefix} install
255
 
 
256
 
# changing GISBASE in startup script (deleting %{buildroot} from path)
257
 
mv %{buildroot}%{_bindir}/grass%{shortver} %{buildroot}%{_bindir}/grass%{shortver}.tmp
258
 
 
259
 
cat  %{buildroot}%{_bindir}/grass%{shortver}.tmp | \
260
 
    sed -e "1,\$s&^GISBASE.*&GISBASE=%{_prefix}/grass-%{version}&" | \
261
 
    cat - > %{buildroot}%{_bindir}/grass%{shortver}
262
 
 
263
 
rm %{buildroot}%{_bindir}/grass%{shortver}.tmp
264
 
chmod +x %{buildroot}%{_bindir}/grass%{shortver}
265
 
 
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
269
 
 
270
 
# Install pkg-config
271
 
if [ ! -d %{buildroot}%{_libdir}/pkgconfig ]
272
 
then
273
 
 mkdir -p %{buildroot}%{_libdir}/pkgconfig
274
 
fi
275
 
install -m 644 grass.pc %{buildroot}%{_libdir}/pkgconfig/
276
 
 
277
 
%clean
278
 
rm -rf %{buildroot}
279
 
 
280
 
#cd ..
281
 
#rm -rf grass-%{version}
282
 
 
283
 
%files
284
 
%defattr(-,root,root)
285
 
 
286
 
%doc AUTHORS COPYING GPL.TXT README REQUIREMENTS.html
287
 
 
288
 
%attr(0755,root,root)
289
 
 
290
 
%{_bindir}/grass%{shortver}
291
 
%{_bindir}/gem6
292
 
%{_prefix}/grass-%{version}
293
 
%{_libdir}/pkgconfig/grass.pc
294
 
/etc/ld.so.conf.d/grass-%{version}.conf
295
 
 
296
 
%post -p /sbin/ldconfig
297
 
 
298
 
%postun -p /sbin/ldconfig
299
 
 
300
 
%Changelog
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>
321
 
  - Initial build