5 kx #!/bin/bash
5 kx
5 kx CWD=`pwd`
5 kx
5 kx SCRIPT_DIR=`cd $(dirname ${BASH_SOURCE[0]}) >/dev/null 2>&1 && pwd`
5 kx program=`basename $0`
5 kx
5 kx cd ${SCRIPT_DIR}/..
5 kx
5 kx
5 kx ################################################################
5 kx # Gettext:
5 kx #
5 kx gettextize --force
5 kx
5 kx #
5 kx # Patch for po/Makefile.in.in
5 kx #
5 kx file=po/Makefile.in.in
5 kx
5 kx if ! `cat $file | grep -q '^top_builddir'` ; then
5 kx line="`cat $file | grep -n '^top_srcdir' | cut -f2 -d':'`"
5 kx lnum="`cat $file | grep -n '^top_srcdir' | cut -f1 -d':'`"
5 kx echo "Finding the line for 'top_builddir = @top_builddir@' declaration"
5 kx if [ ! -z "$line" ] ; then
5 kx echo " FOUND: $file: $lnum: $line"
5 kx sed -i "$lnum a\
5 kx top_builddir = @top_builddir@" $file
5 kx fi
5 kx fi
5 kx echo ""
5 kx
5 kx #
5 kx # gettextize output:
5 kx # =================
5 kx #
5 kx # -------------------------------------------------------------------------------
5 kx # Creating m4/ChangeLog
5 kx # Updating Makefile.am (backup is in Makefile.am~)
5 kx # Updating configure.ac (backup is in configure.ac~)
5 kx # Adding an entry to ChangeLog (backup is in ChangeLog~)
5 kx #
5 kx # Please create po/Makevars from the template in po/Makevars.template.
5 kx # You can then remove po/Makevars.template.
5 kx #
5 kx # Please fill po/POTFILES.in as described in the documentation.
5 kx #
5 kx # Please run 'aclocal' to regenerate the aclocal.m4 file.
5 kx # You need aclocal from GNU automake 1.9 (or newer) to do this.
5 kx # Then run 'autoconf' to regenerate the configure file.
5 kx #
5 kx # You will also need config.guess and config.sub, which you can get from the CVS
5 kx # of the 'config' project at http://savannah.gnu.org/. The commands to fetch
5 kx # them
5 kx # are
5 kx # $ wget
5 kx # 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess'
5 kx # $ wget
5 kx # 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub'
5 kx #
5 kx # You might also want to copy the convenience header file gettext.h
5 kx # from the /usr/share/gettext directory into your package.
5 kx # It is a wrapper around <libintl.h> that implements the configure --disable-nls
5 kx # option.
5 kx #
5 kx # Press Return to acknowledge the previous five paragraphs.
5 kx # -------------------------------------------------------------------------------
5 kx #
5 kx # NOTE:
5 kx # ====
5 kx # Собственные исходники, там где надо использовать <libintl.h>,
5 kx # должны включать "gettext.h" тогда можно будет использовать опцию
5 kx # конфигурирования --disable-nls .
5 kx #
5 kx if [ ! -f "po/Makevars" ] ; then
5 kx mv po/Makevars.template po/Makevars
5 kx else
5 kx mv po/Makevars.template po/Makevars
5 kx fi
5 kx cp -a gettext.h gettext.h~
5 kx cp /usr/share/gettext/gettext.h .
5 kx #
5 kx # End of Gettext.
5 kx ################################################################