gnupg/scripts (4 files)
cvs user wk
cvs at cvs.gnupg.org
Wed Mar 30 16:08:11 CEST 2005
Date: Wednesday, March 30, 2005 @ 16:23:01
Author: wk
Path: /cvs/gnupg/gnupg/scripts
Modified: ChangeLog conf-w32/bzip2-1.diff mk-w32-dist w32installer.nsi
* w32installer.nsi: Allow including of WINPT source. Include
libiconv source.
* mk-w32-dist: Add code to detect presence of source. Calculate a
build number; add option --build-number to overide.
-----------------------+
ChangeLog | 7 +++
conf-w32/bzip2-1.diff | 2 -
mk-w32-dist | 86 +++++++++++++++++++++++++++++++++++++++++++-----
w32installer.nsi | 32 ++++++++++++++---
4 files changed, 112 insertions(+), 15 deletions(-)
Index: gnupg/scripts/ChangeLog
diff -u gnupg/scripts/ChangeLog:1.66 gnupg/scripts/ChangeLog:1.67
--- gnupg/scripts/ChangeLog:1.66 Mon Mar 14 20:19:20 2005
+++ gnupg/scripts/ChangeLog Wed Mar 30 16:23:01 2005
@@ -1,3 +1,10 @@
+2005-03-30 Werner Koch <wk at g10code.com>
+
+ * w32installer.nsi: Allow including of WINPT source. Include
+ libiconv source.
+ * mk-w32-dist: Add code to detect presence of source. Calculate a
+ build number; add option --build-number to overide.
+
2005-03-14 Werner Koch <wk at g10code.com>
* mk-w32-dist: Check for patch files.
Index: gnupg/scripts/conf-w32/bzip2-1.diff
diff -u gnupg/scripts/conf-w32/bzip2-1.diff:1.1 gnupg/scripts/conf-w32/bzip2-1.diff:1.2
--- gnupg/scripts/conf-w32/bzip2-1.diff:1.1 Mon Mar 14 21:41:20 2005
+++ gnupg/scripts/conf-w32/bzip2-1.diff Wed Mar 30 16:23:00 2005
@@ -3,7 +3,7 @@
usual using the mingw32 cross compiler package from Debian and install
the library and header file on top of the cross compiler installation
(/usr/i586-mingw32msvc/lib/). Note that for ease of maintenance we
-don't used a DLL. [wk 2005-03-14]
+don't use a DLL. [wk 2005-03-14]
diff -u orig/bzip2-1.0.2/Makefile bzip2-1.0.2/Makefile
Index: gnupg/scripts/mk-w32-dist
diff -u gnupg/scripts/mk-w32-dist:1.19 gnupg/scripts/mk-w32-dist:1.20
--- gnupg/scripts/mk-w32-dist:1.19 Mon Mar 14 20:19:20 2005
+++ gnupg/scripts/mk-w32-dist Wed Mar 30 16:23:01 2005
@@ -36,6 +36,20 @@
exit 1
fi
+# Windows uses an internal build number. We use the last day of the
+# year concatenated with the hour. for it. If it happens that a new
+# release of the same version is to be made in the next year, the
+# build number must be given manually by adding the appropriate number
+# of days.
+if [ "$1" = "--build-number" -a -n "$2" ]; then
+ build_number="$2"
+ shift
+ shift
+else
+ build_number=$(date -u '+%j%k' | sed 's/^0*\(.*\)/\1/')
+fi
+
+
if i586-mingw32msvc-strip --version >/dev/null 2>&1 ; then
STRIP=i586-mingw32msvc-strip
else
@@ -92,7 +106,8 @@
# Figure out the version
version=$(sed -n 's/^#[ ]*define[ ][ ]*VERSION[ ][ ]*\"\([0-9.a-z-]*\)\"/\1/p' $bindir/config.h)
-prod_version=$(echo "$version"|awk -F'[^0-9]' '{print $1 "." $2 "." $3 ".1"}')
+prod_version=$(echo "$version"|awk -F'[^0-9]' '{print $1 "." $2 "." $3 }')
+prod_version="${prod_version}.${build_number}"
echo "building version $version ($prod_version)"
rm * >/dev/null 2>/dev/null || true
@@ -189,7 +204,7 @@
# iconv.dll is a hard requirement
if [ ! -f "$topdir/iconv/iconv.dll" ]; then
- echo "iconv.dll not availavle" >&2
+ echo "iconv.dll not available" >&2
exit 1
fi
ln "$topdir/iconv/iconv.dll" iconv.dll
@@ -208,19 +223,74 @@
winpt_defs="-DWITH_WINPT"
fi
- # See whether we should include the source.
- if [ ! -d "$topdir/tarballs" ]; then
- # FIXME
- :
+ # See whether we should include the source and figure out the
+ # version numbers of the source files.
+ if [ -d "$topdir/tarballs" ]; then
+ have_gnupg_src=no
+ have_libiconv_src=no
+ have_winpt_src=no
+ for i in `find "$topdir/tarballs" -type f -name '*.tar.gz'`; do
+ fname=$(basename "$i" .gz)
+ zcat "$i" > "$fname"
+ case "$fname" in
+ gnupg-*)
+ tmp=$(echo "$fname" | \
+ sed -n 's/^[^-]*-\([0-9.a-z-]*\)\.tar$/\1/p')
+ echo "gnupg source version is $tmp" >&2
+ if [ "$version" != "$tmp" ]; then
+ echo "gnupg source version does not match" >&2
+ exit 1
+ fi
+ have_gnupg_src=yes
+ ;;
+ libiconv-*)
+ tmp=$(echo "$fname" | \
+ sed -n 's/^[^-]*-\([0-9.a-z-]*\)\.tar$/\1/p')
+ echo "libiconv source version is $tmp" >&2
+ src_defs="$src_defs -DLIBICONV_VERSION=$tmp"
+ have_libiconv_src=yes
+ ;;
+ winpt-*)
+ tmp=$(echo "$fname" | \
+ sed -n 's/^[^-]*-\([0-9.a-z-]*\)\.tar$/\1/p')
+ echo "winpt source version is $tmp" >&2
+ src_defs="$src_defs -DWINPT_VERSION=$tmp"
+ have_winpt_src=yes
+ ;;
+
+ *)
+ echo "WARNING: unknown source file $fname ignored" >&2
+ ;;
+ esac
+ done
+ if [ -n "$src_defs" ]; then
+ if [ $have_gnupg_src = "no" ]; then
+ echo "gnupg source missing" >&2
+ exit 1
+ fi
+ if [ $have_libiconv_src = "no" ]; then
+ echo "libiconv source missing" >&2
+ exit 1
+ fi
+ if [ -n "$winpt_defs" ]; then
+ if [ $have_winpt_src = "no" ]; then
+ echo "winpt source missing" >&2
+ exit 1
+ fi
+ fi
+
+ src_defs="$src_defs -DWITH_SOURCE"
+ fi
+
fi
# Now run the installer
echo "invoking installer as:"
- echo makensis -v2 -nocd -DVERSION="${version}" \
+ echo makensis -nocd -DVERSION="${version}" \
-DPROD_VERSION="${prod_version}" \
-DGNUPG_SRCDIR="${srcdir}" ${winpt_defs} ${src_defs} \
${patches_defs} ${srcdir}/scripts/w32installer.nsi
- BUILDINFO=$buildinfo makensis -v2 -nocd -DVERSION="${version}" \
+ BUILDINFO=$buildinfo makensis -nocd -DVERSION="${version}" \
-DPROD_VERSION="${prod_version}" \
-DGNUPG_SRCDIR="${srcdir}" ${winpt_defs} ${src_defs} \
${patches_defs} ${srcdir}/scripts/w32installer.nsi
Index: gnupg/scripts/w32installer.nsi
diff -u gnupg/scripts/w32installer.nsi:1.8 gnupg/scripts/w32installer.nsi:1.9
--- gnupg/scripts/w32installer.nsi:1.8 Mon Mar 14 20:19:20 2005
+++ gnupg/scripts/w32installer.nsi Wed Mar 30 16:23:01 2005
@@ -37,7 +37,6 @@
SetCompressor lzma
-
VIProductVersion "${PROD_VERSION}"
VIAddVersionKey "ProductName" "GNU Privacy Guard (${VERSION})"
VIAddVersionKey "Comments" \
@@ -132,6 +131,8 @@
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
ReserveFile "opt.ini"
ReserveFile "COPYING.txt"
+ReserveFile "README-W32.txt"
+ReserveFile "${NSISDIR}/Plugins/System.dll"
ReserveFile "${NSISDIR}/Plugins/UserInfo.dll"
@@ -236,15 +237,22 @@
;------------------
!ifdef WITH_SOURCE
-Section "Source" SecSource
+Section /o "Source" SecSource
SetOutPath "$INSTDIR\Src"
- ; Note that we include the uncompressed tarball because this allows
+ ; Note that we include the uncompressed tarballs because this allows
; far better compression results for the distribution. We might
; want to compress it again after installation.
+
File "gnupg-${VERSION}.tar"
+ File "libiconv-${LIBICONV_VERSION}.tar"
+
+!ifdef WITH_WINPT
+ File "winpt-$(WINPT_VERSION}.tar"
+!endif ; WITH_WINPT
+
SectionEnd ; Section Source
!endif
@@ -389,6 +397,11 @@
Delete "$INSTDIR\Doc\NEWS.txt"
Delete "$INSTDIR\Doc\FAQ.txt"
+ Delete "$INSTDIR\Src\gnupg-${VERSION}.tar"
+ Delete "$INSTDIR\Src\libiconv-${LIBICONV_VERSION}.tar"
+ Delete "$INSTDIR\Src\winpt-$(WINPT_VERSION}.tar"
+ Delete "$INSTDIR\Src\*.diff"
+
Delete "$INSTDIR\uninst-gnupg.exe"
;;------------------------
@@ -553,13 +566,15 @@
with the proposed OpenPGP Internet standard as described in RFC2440. \
\r\n\r\n$_CLICK \
\r\n\r\n\r\n\r\n\r\nThis is GnuPG version ${VERSION}\r\n\
- built on $%BUILDINFO%"
+ built on $%BUILDINFO%\r\n\
+ file version ${PROD_VERSION}"
LangString T_About ${LANG_GERMAN} \
"GnuPG is das Werkzeug aus dem GNU Projekt zur sicheren Kommunikation \
sowie zum sicheren Speichern von Daten. \
\r\n\r\n$_CLICK \
- \r\n\r\n\r\n\r\n\r\nDies ist GnuPG version ${VERSION}\r\n\
- erstellt am $%BUILDINFO%"
+ \r\n\r\n\r\n\r\n\r\nDies ist GnuPG Version ${VERSION}\r\n\
+ erstellt am $%BUILDINFO%\r\n\
+ Dateiversion ${PROD_VERSION}"
; Startup page
LangString T_GPLHeader ${LANG_ENGLISH} \
@@ -634,6 +649,11 @@
LangString DESC_SecDoc ${LANG_GERMAN} \
"Handbuchseiten und eine FAQ"
+LangString DESC_SecSource ${LANG_ENGLISH} \
+ "Quelltextdateien"
+LangString DESC_SecSource ${LANG_GERMAN} \
+ "Source files"
+
;-------------------------------------
More information about the Gnupg-commits
mailing list