3
# Copyright (C) 2000, 2001, 2002, 2004 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
if i586-mingw32msvc-strip --version >/dev/null 2>&1 ; then
35
STRIP=i586-mingw32msvc-strip
41
version=$(sed -n 's/^#[ ]*define[ ][ ]*VERSION[ ][ ]*\"\([0-9.a-z-]*\)\"/\1/p' $bindir/config.h)
42
echo "building version $version"
44
rm * >/dev/null 2>/dev/null || true
46
cp ${bindir}/g10/gpg.exe gpg.exe
48
cp ${bindir}/g10/gpgv.exe gpgv.exe
50
for name in hkp http ldap finger; do
51
cp ${bindir}/keyserver/gpgkeys_$name.exe gpgkeys_$name.exe
52
$STRIP gpgkeys_$name.exe
54
cp ${bindir}/tools/gpgsplit.exe gpgsplit.exe
58
cp ${bindir}/doc/$i $i.txt
61
man -Tlatin1 -l ${srcdir}/doc/gpg.1 | sed `printf "s/\b.//g"` >gpg.man
63
man -Tlatin1 -l ${srcdir}/doc/gpgv.1 | sed `printf "s/\b.//g"` >gpgv.man
65
man -Tlatin1 -l ${srcdir}/doc/gnupg.7 | sed `printf "s/\b.//g"` >gnupg.man
67
for i in README COPYING NEWS; do
68
cp ${srcdir}/$i $i.txt
71
for i in README.W32 gnupg-w32.reg; do
76
# We must distribute the MO files in UTF-8, the conversion is done by
78
for i in ${srcdir}/po/*.po; do
79
lang=$(basename $i .po)
80
grep -s $lang ${srcdir}/po/LINGUAS >/dev/null || continue
82
fromset=`sed -n '/^"Content-Type:/ s/.*charset=\([a-zA-Z0-9_-]*\).*/\1/p' $i`
84
utf8|utf-8|UTF8|UTF-8)
85
echo "$lang: keeping $fromset" >&2
86
msgfmt --output-file=$lang.mo $i
89
echo "$lang: converting from $fromset to utf-8" >&2
90
iconv --silent --from-code=$fromset --to-code=utf-8 < $i | \
91
sed "/^\"Content-Type:/ s/charset=[a-zA-Z0-9_-]*/charset=utf-8/" | \
92
msgfmt --output-file=$lang.mo -
96
zip -9 "gnupg-w32cli-${version}.zip" *
97
if makensis -version >/dev/null 2>&1 ; then
98
makensis -v2 -nocd -DVERSION="${version}" ${srcdir}/scripts/w32installer.nsi