~ubuntu-branches/ubuntu/karmic/gnupg2/karmic-updates

« back to all changes in this revision

Viewing changes to scripts/mk-w32-dist

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Urlichs
  • Date: 2006-01-24 04:31:42 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060124043142-pbg192or6qxv3yk2
Tags: 1.9.20-1
* New Upstream version. Closes:#306890,#344530
  * Closes:#320490: gpg-protect-tool fails to decrypt PKCS-12 files 
* Depend on libopensc2-dev, not -1-. Closes:#348106

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 
4
#
 
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.
 
8
#
 
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.
 
12
 
 
13
 
 
14
set -e
 
15
 
 
16
cd dist-w32
 
17
 
 
18
bindir=..
 
19
 
 
20
if [ -f ../README ]; then
 
21
    srcdir=..
 
22
elif [ -f ../../README ]; then
 
23
    srcdir=../..
 
24
    bindir=..
 
25
elif [ -f ../../gnupg-stable/README ]; then
 
26
    srcdir=../../gnupg-stable
 
27
elif [ -f ../../../gnupg-stable/README ]; then
 
28
    srcdir=../../../gnupg-stable
 
29
else
 
30
    echo "cannot figure out the source dir" >&2
 
31
    exit 1
 
32
fi
 
33
 
 
34
version=$(sed -n 's/^#[ ]*define[ ][ ]*VERSION[ ][ ]*\"\([0-9.]*\)\"/\1/p' $bindir/config.h)
 
35
echo "building version $version"
 
36
 
 
37
rm * || true
 
38
 
 
39
cp ${bindir}/g10/gpg.exe gpg.exe
 
40
mingw32 strip 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
 
45
 
 
46
for i in FAQ; do
 
47
  cp ${bindir}/doc/$i .
 
48
  todos $i
 
49
done
 
50
man -Tlatin1 -l ${srcdir}/doc/gpg.1 | sed `printf "s/\b.//g"`  >gpg.man
 
51
todos gpg.man
 
52
man -Tlatin1 -l ${srcdir}/doc/gpgv.1 | sed `printf "s/\b.//g"`  >gpgv.man
 
53
todos gpgv.man
 
54
man -Tlatin1 -l ${srcdir}/doc/gnupg.7 | sed `printf "s/\b.//g"`  >gnupg.man
 
55
todos gnupg.man
 
56
for i in README COPYING; do
 
57
  cp ${srcdir}/$i .
 
58
  todos $i
 
59
done
 
60
for i in README.W32 gnupg-w32.reg; do
 
61
  cp ${srcdir}/doc/$i .
 
62
  todos $i
 
63
done
 
64
 
 
65
 
 
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`
 
69
   case $lang in 
 
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="" ;;
 
74
      *) toset="CP850" ;;
 
75
   esac
 
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 -
 
81
   else
 
82
       echo "$lang: keeping $fromset" >&2 
 
83
       msgfmt --output-file=$lang.mo $i
 
84
   fi
 
85
done
 
86
zip -9 "gnupg-w32cli-${version}.zip" *
 
87
 
 
88
 
 
89
 
 
90