1 |
%define grassfix 64 |
2 |
|
3 |
# %%{_bindir}/nviz is included in grass |
4 |
%define _requires_exceptions nviz |
5 |
|
6 |
Name: grass |
7 |
Version: 6.4.1 |
8 |
Release: %mkrel 11 |
9 |
Group: Sciences/Geosciences |
10 |
Summary: Geographic Resources Analysis Support System |
11 |
License: GPLv2+ |
12 |
URL: http://grass.osgeo.org/ |
13 |
Source: http://grass.osgeo.org/grass%{grassfix}/source/grass-%{version}.tar.gz |
14 |
Source2: grass5_48.png |
15 |
Source3: grass5_32.png |
16 |
Source4: grass5_16.png |
17 |
Patch0: grass-6.4.1-ffmpeg0.8.patch |
18 |
Patch1: grass-6.4.1-raster-routpng.patch |
19 |
BuildRequires: libxmu-devel |
20 |
BuildRequires: libpng-devel |
21 |
BuildRequires: jpeg-devel |
22 |
BuildRequires: tiff-devel |
23 |
BuildRequires: gd-devel >= 2.0 |
24 |
BuildRequires: freetype2-devel |
25 |
BuildRequires: cairo-devel |
26 |
BuildRequires: MesaGLU-devel |
27 |
BuildRequires: unixODBC-devel |
28 |
BuildRequires: fftw-devel |
29 |
BuildRequires: lesstif-devel |
30 |
BuildRequires: tk tk-devel |
31 |
BuildRequires: ncurses-devel |
32 |
BuildRequires: zlib-devel |
33 |
BuildRequires: gdbm-devel |
34 |
BuildRequires: readline-devel |
35 |
BuildRequires: postgresql-devel |
36 |
BuildRequires: gcc-gfortran |
37 |
BuildRequires: gdal-devel |
38 |
BuildRequires: flex |
39 |
BuildRequires: swig |
40 |
BuildRequires: bison |
41 |
BuildRequires: proj-devel proj >= 4.4.7 |
42 |
BuildRequires: tcl tcl-devel |
43 |
BuildRequires: fftw-devel |
44 |
BuildRequires: cfitsio-devel |
45 |
BuildRequires: unixODBC-devel |
46 |
BuildRequires: mysql-devel |
47 |
BuildRequires: termcap-devel |
48 |
BuildRequires: ffmpeg-devel |
49 |
BuildRequires: python-devel |
50 |
BuildRequires: libwxPythonGTK-devel |
51 |
BuildRequires: sqlite-devel |
52 |
BuildRequires: lzma |
53 |
# deal with Xorg split |
54 |
BuildRequires: mesaglw-devel |
55 |
|
56 |
Requires: xterm |
57 |
Requires: tk |
58 |
Requires: tcl |
59 |
|
60 |
Obsoletes: grass57 |
61 |
|
62 |
%description |
63 |
GRASS (Geographic Resources Analysis Support System) is an |
64 |
open source, Free Software Geographical Information System (GIS) |
65 |
with raster, topological vector, image processing, and graphics |
66 |
production functionality that operates on various platforms |
67 |
through a graphical user interface and shell in X-Window. |
68 |
|
69 |
%prep |
70 |
%setup -q -n %name-%{version} |
71 |
%patch0 -p0 |
72 |
%patch1 |
73 |
|
74 |
%build |
75 |
%define __cputoolize true |
76 |
%define Werror_cflags %nil |
77 |
%configure2_5x --host=%{_host} \ |
78 |
%if "%_lib" != "lib" |
79 |
--enable-64bit \ |
80 |
%endif |
81 |
--with-dbm-includes=%{_includedir}/gdbm/ \ |
82 |
--with-postgres \ |
83 |
--with-postgres-includes=%{_includedir}/ \ |
84 |
--with-freetype \ |
85 |
--with-freetype-includes=%{_includedir}/freetype2 \ |
86 |
--with-motif \ |
87 |
--with-cairo \ |
88 |
--with-opengl-libs=%{_libdir} \ |
89 |
--with-motif-libs=%{_libdir} \ |
90 |
--with-motif-libs=%{_libdir} \ |
91 |
--with-motif-includes=%{_includedir} \ |
92 |
--with-gdal \ |
93 |
--with-mysql --with-mysql-includes=%{_includedir}/mysql \ |
94 |
--with-odbc \ |
95 |
--enable-largefile \ |
96 |
--with-ffmpeg --with-ffmpeg-includes="%{_includedir}/libavcodec \ |
97 |
%{_includedir}/libavdevice \ |
98 |
%{_includedir}/libavformat %{_includedir}/libavutil \ |
99 |
%{_includedir}/libpostproc %{_includedir}/libswscale" \ |
100 |
--with-curses \ |
101 |
--with-python --with-wxwidgets="%{_bindir}/wx-config"\ |
102 |
--with-sqlite \ |
103 |
--with-cxx \ |
104 |
--with-proj-share=%{_datadir}/proj \ |
105 |
--with-nls \ |
106 |
--with-readline |
107 |
|
108 |
%make |
109 |
|
110 |
%install |
111 |
%__rm -rf %{buildroot} |
112 |
%__mkdir_p %{buildroot}/%{_bindir} |
113 |
#%makeinstall_std INST_DIR=%{_libdir}/grass%{grassfix} |
114 |
# Actions in make install that don't take into account packaging in a place different to running: |
115 |
%__sed -e 's|^GISBASE.*|GISBASE=%{_libdir}/grass%{grassfix}|' \ |
116 |
bin.%{_target_platform}/grass%{grassfix} > %{buildroot}/%{_bindir}/grass%{grassfix} |
117 |
%__chmod a+x %{buildroot}/usr/bin/grass%{grassfix} |
118 |
|
119 |
%__mkdir_p %{buildroot}/%{_libdir}/grass%{grassfix} |
120 |
%__cp -a dist.%{_target_platform}/* %{buildroot}/%{_libdir}/grass%{grassfix} |
121 |
|
122 |
# Add makefiles to includes: |
123 |
%__cp -a include/Make %{buildroot}/%{_libdir}/grass%{grassfix}/include/ |
124 |
|
125 |
# Manually archive the man pages: |
126 |
%__lzma %{buildroot}/%{_libdir}/grass%{grassfix}/man/man?/* |
127 |
|
128 |
%__mkdir %{buildroot}/%{_libdir}/grass%{grassfix}/locks/ |
129 |
|
130 |
%__mkdir_p %{buildroot}%{_iconsdir}/hicolor/{16x16,32x32,48x48}/apps |
131 |
|
132 |
%__install -m644 %{SOURCE2} %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png |
133 |
%__install -m644 %{SOURCE3} %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png |
134 |
%__install -m644 %{SOURCE4} %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png |
135 |
|
136 |
%__mkdir_p %{buildroot}%{_datadir}/applications |
137 |
%__cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF |
138 |
[Desktop Entry] |
139 |
Name=Grass%{grassfix} |
140 |
Comment=Geographic Resources Analysis Support System |
141 |
Exec=grass%{grassfix} |
142 |
Icon=%{name} |
143 |
Terminal=true |
144 |
Type=Application |
145 |
Categories=Science;Geology; |
146 |
EOF |
147 |
|
148 |
%__mkdir_p %{buildroot}%_sysconfdir/ld.so.conf.d |
149 |
%__cat > %{buildroot}%_sysconfdir/ld.so.conf.d/grass.conf << EOF |
150 |
%{_libdir}/grass%{grassfix}/lib |
151 |
EOF |
152 |
|
153 |
%clean |
154 |
%__rm -rf %{buildroot} |
155 |
|
156 |
%files |
157 |
%defattr(-,root,root) |
158 |
%attr(0755,root,root) %{_bindir}/* |
159 |
%{_sysconfdir}/ld.so.conf.d/* |
160 |
%{_libdir}/grass%{grassfix}/ |
161 |
%{_datadir}/applications/%{_real_vendor}-%{name}.desktop |
162 |
%{_iconsdir}/*/*/*/* |
163 |
%attr(1777,root,root) %{_libdir}/grass%{grassfix}/locks |
164 |
%doc AUTHORS COPYING INSTALL README CHANGES |