bfc1508d (kx 2023-03-24 03:55:33 +0300 1) #!/bin/bash
bfc1508d (kx 2023-03-24 03:55:33 +0300 2)
bfc1508d (kx 2023-03-24 03:55:33 +0300 3) CWD=`pwd`
bfc1508d (kx 2023-03-24 03:55:33 +0300 4)
bfc1508d (kx 2023-03-24 03:55:33 +0300 5) SCRIPT_DIR=`cd $(dirname ${BASH_SOURCE[0]}) >/dev/null 2>&1 && pwd`
bfc1508d (kx 2023-03-24 03:55:33 +0300 6) program=`basename $0`
bfc1508d (kx 2023-03-24 03:55:33 +0300 7)
bfc1508d (kx 2023-03-24 03:55:33 +0300 8) cd ${SCRIPT_DIR}/..
bfc1508d (kx 2023-03-24 03:55:33 +0300 9)
bfc1508d (kx 2023-03-24 03:55:33 +0300 10)
bfc1508d (kx 2023-03-24 03:55:33 +0300 11) ################################################################
bfc1508d (kx 2023-03-24 03:55:33 +0300 12) # Gettext:
bfc1508d (kx 2023-03-24 03:55:33 +0300 13) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 14) gettextize --force
bfc1508d (kx 2023-03-24 03:55:33 +0300 15)
bfc1508d (kx 2023-03-24 03:55:33 +0300 16) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 17) # Patch for po/Makefile.in.in
bfc1508d (kx 2023-03-24 03:55:33 +0300 18) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 19) file=po/Makefile.in.in
bfc1508d (kx 2023-03-24 03:55:33 +0300 20)
bfc1508d (kx 2023-03-24 03:55:33 +0300 21) if ! `cat $file | grep -q '^top_builddir'` ; then
bfc1508d (kx 2023-03-24 03:55:33 +0300 22) line="`cat $file | grep -n '^top_srcdir' | cut -f2 -d':'`"
bfc1508d (kx 2023-03-24 03:55:33 +0300 23) lnum="`cat $file | grep -n '^top_srcdir' | cut -f1 -d':'`"
bfc1508d (kx 2023-03-24 03:55:33 +0300 24) echo "Finding the line for 'top_builddir = @top_builddir@' declaration"
bfc1508d (kx 2023-03-24 03:55:33 +0300 25) if [ ! -z "$line" ] ; then
bfc1508d (kx 2023-03-24 03:55:33 +0300 26) echo " FOUND: $file: $lnum: $line"
bfc1508d (kx 2023-03-24 03:55:33 +0300 27) sed -i "$lnum a\
bfc1508d (kx 2023-03-24 03:55:33 +0300 28) top_builddir = @top_builddir@" $file
bfc1508d (kx 2023-03-24 03:55:33 +0300 29) fi
bfc1508d (kx 2023-03-24 03:55:33 +0300 30) fi
bfc1508d (kx 2023-03-24 03:55:33 +0300 31) echo ""
bfc1508d (kx 2023-03-24 03:55:33 +0300 32)
bfc1508d (kx 2023-03-24 03:55:33 +0300 33) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 34) # gettextize output:
bfc1508d (kx 2023-03-24 03:55:33 +0300 35) # =================
bfc1508d (kx 2023-03-24 03:55:33 +0300 36) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 37) # -------------------------------------------------------------------------------
bfc1508d (kx 2023-03-24 03:55:33 +0300 38) # Creating m4/ChangeLog
bfc1508d (kx 2023-03-24 03:55:33 +0300 39) # Updating Makefile.am (backup is in Makefile.am~)
bfc1508d (kx 2023-03-24 03:55:33 +0300 40) # Updating configure.ac (backup is in configure.ac~)
bfc1508d (kx 2023-03-24 03:55:33 +0300 41) # Adding an entry to ChangeLog (backup is in ChangeLog~)
bfc1508d (kx 2023-03-24 03:55:33 +0300 42) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 43) # Please create po/Makevars from the template in po/Makevars.template.
bfc1508d (kx 2023-03-24 03:55:33 +0300 44) # You can then remove po/Makevars.template.
bfc1508d (kx 2023-03-24 03:55:33 +0300 45) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 46) # Please fill po/POTFILES.in as described in the documentation.
bfc1508d (kx 2023-03-24 03:55:33 +0300 47) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 48) # Please run 'aclocal' to regenerate the aclocal.m4 file.
bfc1508d (kx 2023-03-24 03:55:33 +0300 49) # You need aclocal from GNU automake 1.9 (or newer) to do this.
bfc1508d (kx 2023-03-24 03:55:33 +0300 50) # Then run 'autoconf' to regenerate the configure file.
bfc1508d (kx 2023-03-24 03:55:33 +0300 51) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 52) # You will also need config.guess and config.sub, which you can get from the CVS
bfc1508d (kx 2023-03-24 03:55:33 +0300 53) # of the 'config' project at http://savannah.gnu.org/. The commands to fetch
bfc1508d (kx 2023-03-24 03:55:33 +0300 54) # them
bfc1508d (kx 2023-03-24 03:55:33 +0300 55) # are
bfc1508d (kx 2023-03-24 03:55:33 +0300 56) # $ wget
bfc1508d (kx 2023-03-24 03:55:33 +0300 57) # 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess'
bfc1508d (kx 2023-03-24 03:55:33 +0300 58) # $ wget
bfc1508d (kx 2023-03-24 03:55:33 +0300 59) # 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub'
bfc1508d (kx 2023-03-24 03:55:33 +0300 60) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 61) # You might also want to copy the convenience header file gettext.h
bfc1508d (kx 2023-03-24 03:55:33 +0300 62) # from the /usr/share/gettext directory into your package.
bfc1508d (kx 2023-03-24 03:55:33 +0300 63) # It is a wrapper around <libintl.h> that implements the configure --disable-nls
bfc1508d (kx 2023-03-24 03:55:33 +0300 64) # option.
bfc1508d (kx 2023-03-24 03:55:33 +0300 65) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 66) # Press Return to acknowledge the previous five paragraphs.
bfc1508d (kx 2023-03-24 03:55:33 +0300 67) # -------------------------------------------------------------------------------
bfc1508d (kx 2023-03-24 03:55:33 +0300 68) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 69) # NOTE:
bfc1508d (kx 2023-03-24 03:55:33 +0300 70) # ====
bfc1508d (kx 2023-03-24 03:55:33 +0300 71) # Собственные исходники, там где надо использовать <libintl.h>,
bfc1508d (kx 2023-03-24 03:55:33 +0300 72) # должны включать "gettext.h" тогда можно будет использовать опцию
bfc1508d (kx 2023-03-24 03:55:33 +0300 73) # конфигурирования --disable-nls .
bfc1508d (kx 2023-03-24 03:55:33 +0300 74) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 75) if [ ! -f "po/Makevars" ] ; then
bfc1508d (kx 2023-03-24 03:55:33 +0300 76) mv po/Makevars.template po/Makevars
bfc1508d (kx 2023-03-24 03:55:33 +0300 77) else
bfc1508d (kx 2023-03-24 03:55:33 +0300 78) mv po/Makevars.template po/Makevars
bfc1508d (kx 2023-03-24 03:55:33 +0300 79) fi
bfc1508d (kx 2023-03-24 03:55:33 +0300 80) cp -a gettext.h gettext.h~
bfc1508d (kx 2023-03-24 03:55:33 +0300 81) cp /usr/share/gettext/gettext.h .
bfc1508d (kx 2023-03-24 03:55:33 +0300 82) #
bfc1508d (kx 2023-03-24 03:55:33 +0300 83) # End of Gettext.
bfc1508d (kx 2023-03-24 03:55:33 +0300 84) ################################################################