3
# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
5
# This file is free software; as a special exception the author gives
6
# unlimited permission to copy and/or distribute it, with or without
7
# modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful, but
10
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
11
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
if [ -f ../README ]; then
22
elif [ -f ../../README ]; then
25
elif [ -f ../../gnupg-stable/README ]; then
26
srcdir=../../gnupg-stable
27
elif [ -f ../../../gnupg-stable/README ]; then
28
srcdir=../../../gnupg-stable
30
echo "cannot figure out the source dir" >&2
34
version=$(sed -n 's/^#[ ]*define[ ][ ]*VERSION[ ][ ]*\"\([0-9.]*\)\"/\1/p' $bindir/config.h)
35
echo "building version $version"
39
cp ${bindir}/g10/gpg.exe gpg.exe
41
cp ${bindir}/g10/gpgv.exe gpgv.exe
42
mingw32 strip gpgv.exe
43
cp ${bindir}/tools/gpgsplit.exe gpgsplit.exe
44
mingw32 strip gpgsplit.exe
50
man -Tlatin1 -l ${srcdir}/doc/gpg.1 | sed `printf "s/\b.//g"` >gpg.man
52
man -Tlatin1 -l ${srcdir}/doc/gpgv.1 | sed `printf "s/\b.//g"` >gpgv.man
54
man -Tlatin1 -l ${srcdir}/doc/gnupg.7 | sed `printf "s/\b.//g"` >gnupg.man
56
for i in README COPYING; do
60
for i in README.W32 gnupg-w32.reg; do
66
for i in ${srcdir}/po/*.po; do
67
lang=$(basename $i .po)
68
fromset=`sed -n '/^"Content-Type:/ s/.*charset=\([a-zA-Z0-9_-]*\).*/\1/p' $i`
70
cs|pl) toset="CP1250" ;;
71
tr) toset="CP1254" ;; # DOS: CP857
72
el) toset="CP1253" ;; # same as latin-7?
73
el|eo|et|ja) toset="" ;;
76
if [ -n "$toset" ]; then
77
echo "$lang: converting from $fromset to $toset" >&2
78
iconv --silent --from-code=$fromset --to-code=$toset < $i | \
79
sed "/^\"Content-Type:/ s/charset=[a-zA-Z0-9_-]*/charset=$toset/" | \
80
msgfmt --output-file=$lang.mo -
82
echo "$lang: keeping $fromset" >&2
83
msgfmt --output-file=$lang.mo $i
86
zip -9 "gnupg-w32cli-${version}.zip" *