Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37732634
en ru br
ALT Linux repos
S:8.3.0-alt1
D:6.2.3-alt1
5.0: 6.2.3-alt2
4.1: 6.2.3-alt1

Group :: Sciences/Geosciences
RPM: grass

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: grass
Version: 6.2.3
Release: alt1

%define grassfix 62
#%%define grassdir grass%grassfix
%define grassdir %name-%version

%define grassdatadir /var/lib/grass%grassfix/data

# add_findrov_lib_path seems not to work here...

%add_findprov_lib_path %_libdir/%grassdir/lib
%set_verify_elf_method unresolved=relaxed

Summary: Geographic Resources Analysis Support System
License: %gpl2plus
Group: Sciences/Geosciences
URL: http://grass.itc.it/
Packager: Egor Vyscrebentsov <evyscr at altlinux.ru>

# http://download.osgeo.org/grass/grass62/source/grass-6.2.3.tar.gz

Source0: %name-%version.tar.gz

#Patch0: %name-6.2.3-alt-soname.patch

Patch1: %name-6.2.2-pld-linking.patch
Patch2: %name-6.2.3-alt-destdir.patch
Patch3: %name-6.2.3-alt-init.patch

Provides: grass%grassfix

BuildPreReq: rpm-build-licenses

# Automatically added by buildreq on Mon Feb 19 2007

BuildRequires: flex libfftw-devel libjpeg-devel libncurses-devel libpng-devel libpq-devel libqt4-core libtiff-devel libtinfo-devel postgresql-devel proj-devel tcl-devel tk-devel xorg-x11-devel xorg-x11-mesagl zlib-devel libgdal-devel
BuildRequires: proj-nad readline-devel
#BuildRequires: freetype-devel

%description
GRASS (Geographic Resources Analysis Support System) is an
open source, Free Software Geographical Information System (GIS)
with raster, topological vector, image processing, and graphics
production functionality that operates on various platforms
through a graphical user interface and shell in X-Window.

%package devel
Summary: Development files for programs which will use the GRASS library
Group: Development/C
Requires: %name = %version-%release

%description devel
GRASS (Geographic Resources Analysis Support System) is an
open source, Free Software Geographical Information System (GIS).
This package contains headers needed for development programs
which will use the GRASS library.

%package doc
Summary: Documentation for GRASS GIS
Group: Documentation
Requires: %name = %version-%release

%description doc
GRASS (Geographic Resources Analysis Support System) is an
open source, Free Software Geographical Information System (GIS).
This package contains documentation about GRASS GIS.

%prep
%setup -q
#patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
%configure \
--prefix=/usr/lib \
--libdir=%_libdir/%grassdir/lib \
--with-nls \
--with-postgres-includes=/usr/include/pgsql \
--with-proj-share=/usr/share/proj \
--with-python \
--with-readline \

# WARNING: GRASS 6.2.2 wants ft2build.h while we have ftbuild.h

# --with-freetype --with-freetype-incudes=%%_includedir/freetype \
# Following parameters seem to make nothing...
# --includedir=%_includedir \
# --with-includes=%_includedir \

# GRASS does not like make_build

%make

%install
%make_install DESTDIR=%buildroot install

mkdir -p %buildroot%_bindir
install -p -m0755 bin.%_target_platform-gnu/grass%grassfix %buildroot/usr/bin
chmod a+x %buildroot/usr/bin/grass%grassfix
subst 's#GISBASE=.*#GISBASE=%_libdir/%{grassdir}#' \
%buildroot/usr/bin/grass%grassfix
subst 's#mozilla-firefox#firefox#' %buildroot/usr/lib/%grassdir/etc/Init.sh

sed -i '/export GISBASE/ a \[ -z "$GISDBASE" ] && export GISDBASE=%grassdatadir' %buildroot/usr/bin/grass%grassfix

# Add makefiles to includes:

#cp -a include/Make %buildroot%_libdir/grass%grassfix/include/

mkdir -p %buildroot%grassdatadir
mkdir -p %buildroot/var/lock/grass%grassfix

cp -a dist.%_target_platform-gnu/demolocation %buildroot%grassdatadir/
subst 's#GISDBASE=.*#GISDBASE=%{grassdatadir}#' \
%buildroot%grassdatadir/demolocation/.grassrc%grassfix

%post
#%%update_menus
[ ! -L /var/lock/grass62/locks ] || rm -f /var/lock/grass62/locks
[ $1 -ne 1 ] || ln -s /var/lock/grass%grassfix %_libdir/%grassdir/locks

%preun
rm -f  %_libdir/%grassdir/locks

#postun

#%%clean_menus

%triggerpostun -- grass
[ $2 -eq 0 ] || ln -s /var/lock/grass%grassfix %_libdir/%grassdir/locks

%files
%_bindir/*
%dir %_libdir/%grassdir
%_libdir/%grassdir/bin
%dir %_libdir/%grassdir/lib
%_libdir/%grassdir/lib/*.%version.so
%_libdir/%grassdir/bwidget
%_libdir/%grassdir/driver
%_libdir/%grassdir/etc
%_libdir/%grassdir/fonts
%_libdir/%grassdir/lib
%_libdir/%grassdir/locale
%_libdir/%grassdir/man
%_libdir/%grassdir/scripts
#%_menudir/%name
#%_miconsdir/*.png
#%_liconsdir/*.png
#%_iconsdir/*.png
%attr(1777,root,root) /var/lock/grass%grassfix
/var/lib/grass%grassfix
%doc AUTHORS COPYING INSTALL CHANGES REQUIREMENTS.html

%files devel
%exclude %_libdir/%grassdir/lib/*.%version.so
%_libdir/%grassdir/lib/*.so
%_libdir/%grassdir/include
%doc SUBMITTING*

%files doc
%_libdir/%grassdir/docs

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin