[grass] NEW VERSION, GENERAL CLEAN-UP, WORKING LOCALES AND DOCS

Volker Fröhlich volter at fedoraproject.org
Tue Nov 22 17:00:31 UTC 2011


commit 357b526530e3b10a4f896ba725db1fca99174c1b
Author: Volker Fröhlich <volker27 at gmx.at>
Date:   Tue Nov 22 17:58:50 2011 +0100

    NEW VERSION, GENERAL CLEAN-UP, WORKING LOCALES AND DOCS
    
    - Update for 6.4.1
    - Remove a lot of obsolete stuff
    - Replace GISBASE variable occurences for locales and
      documentation to find these files, placed FHS conform

 grass-6.4.1-docfiles.patch           |   15 ++
 grass-6.4.1-ternaryOp-python24.patch |   37 ++++
 grass.desktop                        |    1 -
 grass.spec                           |  312 ++++++++++++++++++++++------------
 4 files changed, 253 insertions(+), 112 deletions(-)
---
diff --git a/grass-6.4.1-docfiles.patch b/grass-6.4.1-docfiles.patch
new file mode 100644
index 0000000..ba12778
--- /dev/null
+++ b/grass-6.4.1-docfiles.patch
@@ -0,0 +1,15 @@
+diff -Nur grass-6.4.1/Makefile grass-6.4.1-docfiles/Makefile
+--- grass-6.4.1/Makefile	2011-03-10 10:54:19.000000000 +0100
++++ grass-6.4.1-docfiles/Makefile	2011-09-21 17:13:50.515009523 +0200
+@@ -59,10 +59,8 @@
+ 	LOCALE=0
+ endif
+ 
+-FILES = AUTHORS COPYING CHANGES REQUIREMENTS.html contributors.csv  contributors_extra.csv  translators.csv GPL.TXT
+ 
+-BIN_DIST_FILES = $(FILES) \
+-	grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.tmp \
++BIN_DIST_FILES = grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.tmp \
+ 	bin \
+ 	bwidget \
+ 	docs \
diff --git a/grass-6.4.1-ternaryOp-python24.patch b/grass-6.4.1-ternaryOp-python24.patch
new file mode 100644
index 0000000..b1a34f2
--- /dev/null
+++ b/grass-6.4.1-ternaryOp-python24.patch
@@ -0,0 +1,37 @@
+diff https://svn.osgeo.org/grass/grass/tags/release_20110412_grass_6_4_1 https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 -r 45958:45964 > ~/dev/src/elgis-testing/rpmbuild/elgis/grass/SOURCES/grass-ternaryOp-python24.patch
+Index: gui/wxpython/gui_modules/prompt.py
+===================================================================
+--- gui/wxpython/gui_modules/prompt.py	(revision 45958)
++++ gui/wxpython/gui_modules/prompt.py	(revision 45964)
+@@ -850,8 +850,7 @@
+             toComplete['entity'] = 'command'
+             toComplete['cmd'] = cmd
+             return toComplete
+-                
+-            
++    
+     def GetWordLeft(self, withDelimiter = False, ignoredDelimiter = None):
+         """!Get word left from current cursor position. The beginning
+         of the word is given by space or chars: .,-= 
+@@ -862,13 +861,17 @@
+         textLeft = self.GetTextLeft()
+         
+         parts = list()
+-        ignoredDelimiter = ignoredDelimiter if ignoredDelimiter is not None else ''
++        if ignoredDelimiter is None:
++            ignoredDelimiter = ''
++        
+         for char in set(' .,-=') - set(ignoredDelimiter):
+-            delimiter = '' if not withDelimiter else char
++            if not withDelimiter:
++                delimiter = ''
++            else:
++                delimiter = char
+             parts.append(delimiter + textLeft.rpartition(char)[2])
+         return min(parts, key=lambda x: len(x))
+-        
+-        
++         
+     def ShowList(self):
+         """!Show sorted auto-completion list if it is not empty"""
+         if len(self.autoCompList) > 0:
diff --git a/grass.desktop b/grass.desktop
index 31433f4..f259ee5 100644
--- a/grass.desktop
+++ b/grass.desktop
@@ -1,5 +1,4 @@
 [Desktop Entry]
-Encoding=UTF-8
 Name=GRASS
 Comment=Geographical Information System (GIS)
 Exec=grass64
diff --git a/grass.spec b/grass.spec
index 76d7d2e..7f98036 100644
--- a/grass.spec
+++ b/grass.spec
@@ -1,3 +1,19 @@
+#TODO: Create ticket on "shared lib calls exit"
+#TODO: Create a ticket on FHS violation
+#TODO: Should the manpages be called foo.1grass, like in Ubuntu?
+#TODO: The manpages are created from HTML with a parser, that is
+# included. It has some flaws, see:
+# https://trac.osgeo.org/grass/ticket/612
+#TODO: Add Module Makefile for developers?
+#TODO: xml-etree?
+#TODO: Consider to drop the separate libs packages, like Debian did
+#TODO: Review the pkgconf file
+# Ubuntu doesn't have the Requires line in the pkgconfig file
+## Ubuntu's gdal-grass is called libgdal1-1.7.0-grass
+#TODO: Consider a documentation sub-package
+
+# All EPEL 5 specific elements are left inside to make life easier for ELGIS
+
 %global shortversion 64
 
 %ifarch x86_64 ia64 ppc64 s390x sparc64 alpha 
@@ -7,36 +23,78 @@
 %global configure_64_bit --enable-64bit-vis
 %endif
 
-
 Name:      grass
 Version:   6.4.1
-Release:   1%{?dist}
+Release:   4%{?dist}
 Summary:   GRASS - Geographic Resources Analysis Support System
 Group:     Applications/Engineering
 License:   GPLv2+
 URL:       http://grass.fbk.eu
-Source0:   http://grass.fbk.eu/grass64/source/grass-%{version}.tar.gz
+Source0:   http://grass.fbk.eu/%{name}%{shortversion}/source/%{name}-%{version}.tar.gz
 Source1:   %{name}.desktop
 Patch0:    %{name}-pkgconf.patch
+
+# Warning: This patch contains the GRASS version number
 Patch1:    %{name}-shlib-soname.patch
+
+Patch2:    %{name}-6.4.1-docfiles.patch
+# Patches 3 and 4 taken from Ubuntu
+
+#TODO: There is no "pager" file in Fedora
+# Why can't you use the normal PAGER environment variable?
+#Patch3:    %{name}-6.4.1-pager.patch
+#Doesn't seem to work on Fedora
+#Patch4:    %{name}-6.4.1-www-browser.patch
+
+# http://osgeo-org.1803224.n2.nabble.com/Error-with-GRASS-6-4-1-on-CentOS-5-td6270338.html
+Patch5:    %{name}-6.4.1-ternaryOp-python24.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
 Requires:  proj-nad proj-epsg wxPython
-Requires:  wxGTK wxGTK-gl
+Requires:  wxGTK-gl
 Requires:  numpy
 
+BuildRequires:  bison
+BuildRequires:  blas-devel
+BuildRequires:  cairo-devel
+BuildRequires:  desktop-file-utils
+BuildRequires:  doxygen
+BuildRequires:  fftw2-devel
+BuildRequires:  flex
+BuildRequires:  freetype-devel
+BuildRequires:  gdal-devel
+BuildRequires:  geos-devel
 BuildRequires:  gettext
+BuildRequires:  lapack-devel
+BuildRequires:  lesstif-devel
+BuildRequires:  libjpeg-devel
+BuildRequires:  libpng-devel
+BuildRequires:  libtiff-devel
+BuildRequires:  libXmu-devel
+BuildRequires:  mesa-libGLU-devel
+BuildRequires:  mesa-libGLw-devel
+BuildRequires:  mysql-devel
+BuildRequires:  ncurses-devel
+BuildRequires:  pkgconfig
+BuildRequires:  postgresql-devel
+BuildRequires:  proj-devel  
+
+#TODO: Really BR?
+BuildRequires:  proj-epsg
+BuildRequires:  proj-nad
+
 BuildRequires:  python-devel
-BuildRequires:  bison flex pkgconfig swig
-BuildRequires:  proj-devel proj-nad proj-epsg
-BuildRequires:  desktop-file-utils libjpeg-devel
-BuildRequires:  libtiff-devel libpng-devel freetype-devel
-BuildRequires:  zlib-devel readline-devel ncurses-devel tk-devel 
-BuildRequires:  unixODBC-devel mysql-devel postgresql-devel sqlite-devel
-BuildRequires:  geos-devel blas-devel lapack-devel fftw2-devel gdal-devel
-BuildRequires:  mesa-libGLU-devel mesa-libGLw-devel libXmu-devel lesstif-devel wxPython-devel
-BuildRequires:  cairo-devel wxGTK-devel
-
-# we have multilib triage
+BuildRequires:  readline-devel
+BuildRequires:  sqlite-devel
+BuildRequires:  swig
+BuildRequires:  tk-devel 
+BuildRequires:  unixODBC-devel
+BuildRequires:  wxGTK-devel
+BuildRequires:  wxPython-devel
+BuildRequires:  zlib-devel
+
+# We have multi-lib triage
 %if "%{_lib}" == "lib"
 %global cpuarch 32
 %else
@@ -62,57 +120,91 @@ GRASS (Geographic Resources Analysis Support System) runtime libraries.
 Summary: GRASS (Geographic Resources Analysis Support System) development headers
 Group: Applications/Engineering
 Requires: %{name}%{?isa}-libs = %{version}-%{release}
+
+# Can be removed after EOL of EPEL5
 Requires: pkgconfig
+
 Requires: lesstif-devel wxPython-devel
 Requires: mesa-libGL-devel libX11-devel libXt-devel
 Requires: gdal-devel proj-devel xorg-x11-proto-devel
 
-
 %description devel
 GRASS (Geographic Resources Analysis Support System) development headers.
 
 
 %prep
-
 %setup -q
-#TODO: Review the pkgconfig file
-%patch0 -p0 -b .pkgconf~
-%patch1 -p0 -b .shlibver~
-
-# readline requires ncurses, so workaround
-# correct mysql_config query
-#TODO: Seemingly not necessary
-#sed -i 's|-lreadline|-lreadline -lcurses|g' configure
+%patch0 -p0 -b .pkgconf
+%patch1 -p0 -b .shlibver
+%patch2 -p1 -b .docfiles
+#%patch3 -p1 -b .pager
+#%patch4 -p1 -b .www-browser
+%patch5 -p0 -b .ternaryOp
+
+# Correct mysql_config query
 sed -i 's|--libmysqld-libs|--libs|g' configure
 
-# preserve timestamp during install process
+# Preserve timestamp during install process
+# TODO: Ticket?
 sed -i 's|^cp |cp -p |' tools/build_html_index.sh
 sed -i 's|-cp |-cp -p |' Makefile
 
-# Update FSF address of different ages
+# Update FSF addresses of different age
 # https://trac.osgeo.org/grass/ticket/1422
 # Already fixed for next version!
 for f in `find . -name *.h -o -name *.c -o -name *.rtf` ; do
-  sed -i -e 's/\(59 Temple Place.*Suite 330\|675 Mass Ave\)/51 Franklin Street, Fifth Floor/' $f
-  sed -i -e 's/\(Boston, MA.*02111-1307\|Cambridge, MA 02139\)/Boston,  MA 02110-1301/' $f
+  sed -i -e 's/\(59 Temple Place.*Suite 330\|675 Mass Ave\)/51 Franklin Street, Fifth Floor/' \
+      -e 's/\(Boston, MA.*02111-1307\|Cambridge, MA 02139\)/Boston,  MA 02110-1301/' $f
 done
 for f in `find lib/vector/dglib -type f` ; do
   sed -i -e 's/02111-1307/02110-1301/' $f
 done
 
-#TODO: Create ticket on "shared lib calls exit"
-#TODO: Debug package without sources -- Something seems wrong with prefix here
-#Could be caused by:
-#-I/media/speicher1/makerpm/rpmbuild/BUILD/grass-6.4.1/dist.x86_64-unknown-linux-gnu/include
+# EOL wrong
+sed -i -e 's|\r||g' gui/icons/%{name}/vdigit/box.xbm
+
+# Correct paths for locales
+# Ignore the GISBASE environment variable for locales
+sed -i 's|gisbase = getenv("GISBASE");|gisbase = "%{_datadir}";|' \
+    lib/gis/locale.c
+
+# Replace GISBASE environment variable with paths that match our locale file layout
+sed -i 's|\$GISBASE/locale|%{_datadir}/locale|' \
+    lib/init/init.sh
+
+sed -i -e 's|os.path.join(os.getenv("GISBASE"), '\''locale'\''|os.path.join('\''%{_datadir}'\'', '\''locale'\''|' \
+    -e 's|os.path.join(os.getenv("GISBASE"), "etc"|os.path.join(\"%{_libdir}/%{name}-%{version}\", "etc"|' \
+    -e 's|self.gisbase  = os.getenv("GISBASE")|self.gisbase = "%{_docdir}/%{name}-%{version}"|' \
+    gui/wxpython/gui_modules/*.py gui/wxpython/*.py gui/wxpython/scripts/vkrige.py lib/python/*.py
+
+# Correct paths for documentation
+# Replace GISBASE environment variable with paths, that match our documentation file layout
+sed -i -e 's|$env(GISBASE)/docs/|%{_docdir}/%{name}-%{version}/docs/|' \
+    lib/init/gis_set.tcl \
+    lib/gis/gui.tcl \
+    visualization/nviz/scripts/nviz2.2_script
+sed -i -e 's|%{name}-%{version}/docs|%{name}-%{version}|g' \
+    -e 's|C_BASE="$GISBASE"|C_BASE=\"%{_docdir}/%{name}-%{version}/docs"|g' \
+    scripts/g.manual/g.manual
+sed -i -e 's|(\"GISBASE\"), \"docs\", \"html\", \"icons\", \"silk\")|(\"GISBASE\"), \"icons\", \"silk\")|g' \
+    gui/wxpython/icons/icon.py
+sed -i -e 's|self.fspath = os.path.join(gisbase|self.fspath = os.path.join("%{_docdir}/%{name}-%{version}\"|' \
+    gui/wxpython/gui_modules/ghelp.py
+sed -i 's|file://$env(GISBASE)|file://%{_docdir}/%{name}-%{version}|' \
+    raster/r.li/r.li.setup/r.li.setup.main
+sed -i 's|GRASS_DOC_BASE=`check_docbase "$GISBASE"`|GRASS_DOC_BASE=%{_docdir}/%{name}-%{version}|' \
+    scripts/g.manual/g.manual
+
+# Exceptional path for files used in the GUI as well
+#TODO: Could include those files in the main package too
+sed -i -e 's|os\.getenv("GISBASE")|\"%{_docdir}/%{name}-libs-%{version}\"|' \
+    gui/wxpython/gui_modules/ghelp.py
 
-%build
 
-# code may contain sensible buffer overflows triggered by gcc ssp flag (mustfixupstream).
-#TODO: Where is the ticket?
-CFLAGS=`echo %{optflags}|sed -e 's/-Wp,-D_FORTIFY_SOURCE=2 //g'`
-# keep timestamp over install section
+%build
+# Keep timestamp over install section
+#TODO: Necessary?
 export INSTALL="%{__install} -c -p"
-export CFLAGS
 
 %configure \
    --enable-largefile \
@@ -151,46 +243,20 @@ rm -rf %{buildroot}
 
 # make install
 make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir} \
-     PREFIX=%{buildroot}%{_prefix} install
-
-# changing GISBASE in startup script to point to systems %{_libdir}%{name}-%{version}
-mv  %{buildroot}%{_bindir}/%{name}%{shortversion} %{buildroot}%{_bindir}/%{name}%{shortversion}.tmp
-cat %{buildroot}%{_bindir}/%{name}%{shortversion}.tmp | \
-    sed -e "1,\$s&^GISBASE.*&GISBASE=%{_libdir}/%{name}-%{version}&" | \
-    cat - > %{buildroot}%{_bindir}/%{name}%{shortversion}
-rm  %{buildroot}%{_bindir}/%{name}%{shortversion}.tmp
-chmod +x %{buildroot}%{_bindir}/%{name}%{shortversion}
-
-# change to wxWidgets by default
-cat %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/Init.sh | \
-sed -e '/default if needed \- currently tcltk/,/fi/ {:ack N; /fi/! b ack  s/\"tcltk/\"wxpython/}' \
-    > %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/Init.sh.tmp
-mv -f %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/Init.sh.tmp \
-      %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/Init.sh
-chmod 755 %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/Init.sh
-
-# fix docs lookup path
-sed -i -e 's/$env(GISBASE)\/docs\//\/usr\/share\/doc\/%{name}-%{version}\/docs\//' \
-    %{buildroot}%{_prefix}/%{name}-%{version}/etc/gis_set.tcl
-sed -i -e 's/$env(GISBASE)\/docs\//\/usr\/share\/doc\/%{name}-%{version}\/docs\//' \
-    %{buildroot}%{_prefix}/%{name}-%{version}/etc/gui.tcl
-sed -i -e 's/$env(GISBASE)\/docs\//\/usr\/share\/doc\/%{name}-%{version}\/docs\//' \
-    %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/nviz2.2_script
-sed -i -e 's|C_BASE="$GISBASE"|C_BASE=\"\/usr\/share\/doc\/%{name}-%{version}\/docs"|g' \
-    %{buildroot}%{_prefix}/%{name}-%{version}/scripts/g.manual
-sed -i -e 's|%{name}-%{version}\/docs|%{name}-%{version}|g' \
-    %{buildroot}%{_prefix}/%{name}-%{version}/scripts/g.manual
-sed -i -e 's|(\"GISBASE\"), \"docs\", \"html\", \"icons\", \"silk\")|(\"GISBASE\"), \"icons\", \"silk\")|g' \
-    %{buildroot}%{_prefix}/%{name}-%{version}/etc/wxpython/icons/icon.py
+    PREFIX=%{buildroot}%{_prefix} install
+
+# Change GISBASE in startup script to point to systems %{_libdir}/%{name}-%{version}
+#TODO: Still necessary?
+sed -i -e "1,\$s&^GISBASE.*&GISBASE=%{_libdir}/%{name}-%{version}&"  \
+    %{buildroot}%{_bindir}/%{name}%{shortversion}
 
-# make grass libraries available on the system
-mv %{buildroot}%{_prefix}/%{name}-%{version}/lib/ %{buildroot}%{_libdir}
 
-# make grass headers available on the system
+# Make grass headers and libraries available on the system
+mv %{buildroot}%{_prefix}/%{name}-%{version}/lib/ %{buildroot}%{_libdir}
 mv %{buildroot}%{_prefix}/%{name}-%{version}/include %{buildroot}%{_prefix}/
 rm -rf %{buildroot}%{_includedir}/Make
 
-# create universal multilib header bz#341391
+# Create universal multilib header bz#341391
 install -p -m 644 %{buildroot}%{_includedir}/%{name}/config.h \
            %{buildroot}%{_includedir}/%{name}/config-%{cpuarch}.h
 
@@ -210,14 +276,15 @@ EOF
 touch -r ChangeLog_%{version}.gz %{buildroot}%{_includedir}/%{name}/config.h
 touch -r ChangeLog_%{version}.gz %{buildroot}%{_includedir}/%{name}/config-%{cpuarch}.h
 
-# fix prelink issue bz#458427
+#TODO: Do we still need this?
+# Fix prelink issue bz#458427
 mkdir -p %{buildroot}%{_sysconfdir}/prelink.conf.d
 cat > %{buildroot}%{_sysconfdir}/prelink.conf.d/%{name}-%{cpuarch}.conf <<EOF
 -b %{_libdir}/libgrass_gproj.so.6.4.0
 -b %{_libdir}/libgrass_sim.so.6.4
 EOF
 
-# make man pages available on system, convert to utf8.
+# Make man pages available on system, convert to utf8
 pushd %{buildroot}%{_prefix}/%{name}-%{version}/man/
 for manpage in `find  man1 -type f` ; do
    iconv -f iso88592 -t utf8 \
@@ -229,67 +296,67 @@ mkdir -p %{buildroot}%{_mandir}
 mv %{buildroot}%{_prefix}/%{name}-%{version}/man/* %{buildroot}%{_mandir}
 rm -rf %{buildroot}%{_prefix}/%{name}-%{version}/man
 
-# make locales available in system, fix issue for pt_BR.
+# Make locales available on system, correct case for pt_br locale
 mkdir -p %{buildroot}%{_datadir}/locale/
 mv %{buildroot}%{_prefix}/%{name}-%{version}/locale %{buildroot}%{_datadir}/
 mv %{buildroot}%{_datadir}/locale/pt_br %{buildroot}%{_datadir}/locale/pt_BR
 
-# pack lang sets
 %find_lang %{name}mods
 %find_lang %{name}libs
 %find_lang %{name}wxpy
-cat %{name}mods.lang > %{name}.lang
-cat %{name}libs.lang >> %{name}.lang
-cat %{name}wxpy.lang >> %{name}.lang
 
-# install pkg-config file
+# Install pkg-config file
 mkdir -p %{buildroot}%{_libdir}/pkgconfig
 install -p -m 644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig/
 
-# install desktop icon
+# Install desktop file and icon
 mkdir  %{buildroot}%{_datadir}/pixmaps/
 install -p -m 644 tools/%{name}_logo.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
 desktop-file-install --vendor="fedora" \
         --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
 
-# Update Exec entry in desktop file to reflect GRASS version
-sed -i 's/\(Exec=\).*$/\1%{name}%{shortversion}/' %{buildroot}%{_datadir}/applications/fedora-%{name}.desktop
-
 # Correct permissions
+#TODO: Still necessary? If so, create a ticket and/or change in prep
+#TODO: Why are the permissions right in Ubuntu?
 find %{buildroot} -name "*.tcl" -exec chmod +r-x '{}' \;
-chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/wxpython/gui_modules/menuform.py
-chmod -x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/configIndex
-chmod -x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/nviz_params
-chmod -x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/tclIndex
-chmod -x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/panelIndex
-chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/gem/skeleton/post
-chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/gem/skeleton/uninstall
-chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/g.mapsets.tcl
-chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/dm/tksys.tcl
-chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/gm/tksys.tcl
-chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/gm/animate.tcl
-
-# fixup few nviz script header, it will anyway allways executed by nviz
+chmod +x %{buildroot}%{_prefix}/%{name}-%{version}/etc/wxpython/gui_modules/menuform.py
+chmod -x %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/configIndex
+chmod -x %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/nviz_params
+chmod -x %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/tclIndex
+chmod -x %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/panelIndex
+chmod +x %{buildroot}%{_prefix}/%{name}-%{version}/etc/g.mapsets.tcl
+chmod +x %{buildroot}%{_prefix}/%{name}-%{version}/etc/dm/tksys.tcl
+chmod +x %{buildroot}%{_prefix}/%{name}-%{version}/etc/gm/tksys.tcl
+chmod +x %{buildroot}%{_prefix}/%{name}-%{version}/etc/gm/animate.tcl
+
+# fixup few nviz script header, it will anyway always be executed by nviz
 for nviz in {script_play,nviz2.2_script,script_tools,script_file_tools,script_get_line}; do
- cat %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz \
-  | grep -v '#!nviz' > %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz.tmp 
- mv  %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz.tmp \
-     %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz
+ cat %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/$nviz \
+  | grep -v '#!nviz' > %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/$nviz.tmp 
+ mv  %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/$nviz.tmp \
+     %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/$nviz
 done
 
-# move icon folder in GISBASE and set its path to be FHS compliant
+# Move icon folder in GISBASE and set its path to be FHS compliant
 mv %{buildroot}%{_prefix}/%{name}-%{version}/docs/html/icons %{buildroot}%{_prefix}/%{name}-%{version}/
 
-# switch to the system wide docs to be FHS compliant
+# Switch to the system wide docs, to be FHS compliant
 rm -rf %{buildroot}%{_prefix}/%{name}-%{version}/docs
 
-# hide GISBASE into systems %{_libdir} instead, to be FHS compliant
+# Hide GISBASE into system's %{_libdir} instead, to be FHS compliant
 mv %{buildroot}%{_prefix}/%{name}-%{version} %{buildroot}%{_libdir}/
 
-# fix fontpath
+# Correct font path
 sed -i -e 's|%{buildroot}%{_prefix}/%{name}-%{version}|%{_libdir}/%{name}-%{version}|' \
 %{buildroot}%{_libdir}/%{name}-%{version}/etc/fontcap
 
+# Create versionless symlinks for binary and libdir
+# The libdir symlink is handy for QGIS. QGIS asks the user for gisbase
+# and then stores it. See BZ 711860
+# The binary symlink keeps us from updating the desktop file
+# Ubuntu does it the same way
+ln -s %{_bindir}/%{name}%{shortversion} %{buildroot}%{_bindir}/%{name}
+ln -s %{_libdir}/%{name}-%{version} %{buildroot}%{_libdir}/%{name}
 
 %clean
 rm -rf %{buildroot}
@@ -297,8 +364,10 @@ rm -rf %{buildroot}
 %post libs -p /sbin/ldconfig
 %postun libs -p /sbin/ldconfig
 
-%files -f %{name}.lang
+%files -f %{name}mods.lang -f %{name}libs.lang -f %{name}wxpy.lang
+%doc dist.*/docs
 %{_sysconfdir}/prelink.conf.d/%{name}-%{cpuarch}.conf
+%{_bindir}/%{name}
 %{_bindir}/%{name}%{shortversion}
 %{_bindir}/gem%{shortversion}
 %dir %{_libdir}/%{name}-%{version}
@@ -311,21 +380,42 @@ rm -rf %{buildroot}
 %{_mandir}/man1/*
 
 %files libs
-%doc AUTHORS COPYING GPL.TXT CHANGES ChangeLog_%{version}.gz
+%doc AUTHORS COPYING GPL.TXT CHANGES ChangeLog_%{version}.gz translators.csv contributors.csv contributors_extra.csv
+%{_libdir}/%{name}
 %{_libdir}/lib%{name}_*.so.*
 %{_libdir}/%{name}-%{version}/etc/*.table
 %{_libdir}/%{name}-%{version}/driver/db/*
 
 %files devel
-%doc TODO doc
+%doc TODO doc SUBMITTING*
 %exclude %{_libdir}/lib%{name}_*.a
 %{_libdir}/pkgconfig/%{name}.pc
 %{_includedir}/%{name}
 %{_libdir}/lib%{name}_*.so
 
-#TODO: Add Python example?
 
 %changelog
+* Wed Nov 02 2011 Volker Fröhlich <volker27 at gmx.at> - 6.4.1-4
+- Remove encoding from desktop file
+- Remove BR on wxGTK, because wxGTK requires it anyway
+- Disable Ubuntu patches, because they don't seem to work in Fedora
+- Move all the string substitution for locales and docs to prep
+- Use name macro in Source
+- Drop custom compiler flags -- no evidence they serve a purpose
+- Remove 2 unnecessary chmods
+- Don't use sysconfdir macro in places, where etc means something different
+- Add contributors to documentation
+
+* Wed Nov 02 2011 Volker Fröhlich <volker27 at gmx.at> - 6.4.1-3
+- Patch locale and documentation paths properly for the GUI
+
+* Tue Sep 22 2011 Volker Fröhlich <volker27 at gmx.at> - 6.4.1-2
+- Remove duplicate documentation
+- Correct further documentation paths
+- Create version-less symlinks for library directory and binary
+- Supply all lang files to the files section directly
+- Add ternary operator patch for Python 2.4 (ELGIS)
+
 * Tue Aug 02 2011 Volker Fröhlich <volker27 at gmx.at> - 6.4.1-1
 - Update to 6.4.1
 - Remove explicit lib and include dirs, where not necessary


More information about the scm-commits mailing list