2002-06-29 15:46:34 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# This file is free software; as a special exception the author gives
|
|
|
|
# unlimited permission to copy and/or distribute it, with or without
|
|
|
|
# modifications, as long as this notice is preserved.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd dist-w32
|
|
|
|
|
2002-06-30 09:39:53 +02:00
|
|
|
bindir=..
|
|
|
|
|
2002-06-29 15:46:34 +02:00
|
|
|
if [ -f ../README ]; then
|
|
|
|
srcdir=..
|
2002-06-30 09:39:53 +02:00
|
|
|
elif [ -f ../../README ]; then
|
|
|
|
srcdir=../..
|
|
|
|
bindir=..
|
2002-06-29 15:46:34 +02:00
|
|
|
elif [ -f ../../gnupg-stable/README ]; then
|
|
|
|
srcdir=../../gnupg-stable
|
|
|
|
elif [ -f ../../../gnupg-stable/README ]; then
|
|
|
|
srcdir=../../../gnupg-stable
|
|
|
|
else
|
|
|
|
echo "cannot figure out the source dir" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2002-06-30 09:39:53 +02:00
|
|
|
version=$(sed -n 's/^#[ ]*define[ ][ ]*VERSION[ ][ ]*\"\([0-9.]*\)\"/\1/p' $bindir/config.h)
|
|
|
|
echo "building version $version"
|
|
|
|
|
2002-06-29 15:46:34 +02:00
|
|
|
rm * || true
|
2002-09-02 15:44:29 +02:00
|
|
|
|
|
|
|
cp ${bindir}/g10/gpg.exe gpg.exe
|
2002-06-29 15:46:34 +02:00
|
|
|
mingw32 strip gpg.exe
|
2002-09-02 15:44:29 +02:00
|
|
|
cp ${bindir}/g10/gpgv.exe gpgv.exe
|
2002-06-30 09:39:53 +02:00
|
|
|
mingw32 strip gpgv.exe
|
2002-11-13 17:50:44 +01:00
|
|
|
cp ${bindir}/keyserver/gpgkeys_ldap.exe gpgkeys_ldap.exe
|
|
|
|
mingw32 strip gpgkeys_ldap.exe
|
|
|
|
cp ${bindir}/keyserver/gpgkeys_hkp.exe gpgkeys_hkp.exe
|
|
|
|
mingw32 strip gpgkeys_hkp.exe
|
2002-09-02 15:44:29 +02:00
|
|
|
cp ${bindir}/tools/gpgsplit.exe gpgsplit.exe
|
|
|
|
mingw32 strip gpgsplit.exe
|
|
|
|
|
|
|
|
for i in FAQ; do
|
|
|
|
cp ${bindir}/doc/$i .
|
|
|
|
todos $i
|
|
|
|
done
|
|
|
|
man -Tlatin1 -l ${srcdir}/doc/gpg.1 | sed `printf "s/\b.//g"` >gpg.man
|
2002-06-29 15:46:34 +02:00
|
|
|
todos gpg.man
|
2002-09-02 15:44:29 +02:00
|
|
|
man -Tlatin1 -l ${srcdir}/doc/gpgv.1 | sed `printf "s/\b.//g"` >gpgv.man
|
|
|
|
todos gpgv.man
|
|
|
|
man -Tlatin1 -l ${srcdir}/doc/gnupg.7 | sed `printf "s/\b.//g"` >gnupg.man
|
|
|
|
todos gnupg.man
|
|
|
|
for i in README COPYING; do
|
|
|
|
cp ${srcdir}/$i .
|
|
|
|
todos $i
|
|
|
|
done
|
|
|
|
for i in README.W32 gnupg-w32.reg; do
|
|
|
|
cp ${srcdir}/doc/$i .
|
|
|
|
todos $i
|
|
|
|
done
|
|
|
|
|
2002-09-11 14:56:56 +02:00
|
|
|
|
|
|
|
for i in ${srcdir}/po/*.po; do
|
|
|
|
lang=$(basename $i .po)
|
|
|
|
fromset=`sed -n '/^"Content-Type:/ s/.*charset=\([a-zA-Z0-9_-]*\).*/\1/p' $i`
|
2003-05-26 15:39:38 +02:00
|
|
|
# pl,hu,sk are also cp1250 but the current PO file can't be converted.
|
2002-09-11 14:56:56 +02:00
|
|
|
case $lang in
|
2003-05-26 15:39:38 +02:00
|
|
|
cs) toset="CP852" ;;
|
2002-09-12 15:11:51 +02:00
|
|
|
tr) toset="CP1254" ;; # DOS: CP857
|
|
|
|
el) toset="CP1253" ;; # same as latin-7?
|
2003-05-26 15:39:38 +02:00
|
|
|
el|eo|et|ja|pl|hu|sk|zh_TW) toset="" ;;
|
2004-06-14 07:49:19 +02:00
|
|
|
en@*) toset="skip" ;;
|
2002-09-11 14:56:56 +02:00
|
|
|
*) toset="CP850" ;;
|
|
|
|
esac
|
2004-06-14 07:49:19 +02:00
|
|
|
if [ "$toset" = "skip" ]; then
|
|
|
|
:
|
|
|
|
elif [ -n "$toset" ]; then
|
2002-09-11 14:56:56 +02:00
|
|
|
echo "$lang: converting from $fromset to $toset" >&2
|
|
|
|
iconv --silent --from-code=$fromset --to-code=$toset < $i | \
|
|
|
|
sed "/^\"Content-Type:/ s/charset=[a-zA-Z0-9_-]*/charset=$toset/" | \
|
|
|
|
msgfmt --output-file=$lang.mo -
|
|
|
|
else
|
|
|
|
echo "$lang: keeping $fromset" >&2
|
|
|
|
msgfmt --output-file=$lang.mo $i
|
|
|
|
fi
|
|
|
|
done
|
2002-09-02 15:44:29 +02:00
|
|
|
zip -9 "gnupg-w32cli-${version}.zip" *
|
|
|
|
|
|
|
|
|
2002-06-29 15:46:34 +02:00
|
|
|
|
|
|
|
|