~ubuntu-branches/ubuntu/natty/ibm-3270/natty

« back to all changes in this revision

Viewing changes to ws3270/mkversion.sh

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2009-12-14 11:48:53 UTC
  • mfrom: (1.1.4 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091214114853-mywixml32hct9jr1
Tags: 3.3.10ga4-2
* Fix section to match override.
* Use debhelper compat level 7.
* Use 3.0 (quilt) source format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# Copyright (c) 1999-2009, Paul Mattes.
 
4
# Copyright (c) 2005, Don Russell.
 
5
# All rights reserved.
 
6
#
 
7
# Redistribution and use in source and binary forms, with or without
 
8
# modification, are permitted provided that the following conditions are met:
 
9
#     * Redistributions of source code must retain the above copyright
 
10
#       notice, this list of conditions and the following disclaimer.
 
11
#     * Redistributions in binary form must reproduce the above copyright
 
12
#       notice, this list of conditions and the following disclaimer in the
 
13
#       documentation and/or other materials provided with the distribution.
 
14
#     * Neither the names of Paul Mattes, Don Russell, Jeff Sparkes, GTRC nor
 
15
#       the names of their contributors may be used to endorse or promote
 
16
#       products derived from this software without specific prior written
 
17
#       permission.
 
18
#
 
19
# THIS SOFTWARE IS PROVIDED BY PAUL MATTES AND DON RUSSELL "AS IS" AND ANY
 
20
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
21
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
22
# DISCLAIMED. IN NO EVENT SHALL PAUL MATTES OR DON RUSSELL BE LIABLE FOR ANY
 
23
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 
24
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 
25
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 
26
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
27
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 
28
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
29
 
 
30
# Create version.o from version.txt
 
31
#set -x
 
32
 
 
33
# Ensure that 'date' emits 7-bit U.S. ASCII.
 
34
LANG=C
 
35
LC_ALL=C
 
36
export LANG LC_ALL
 
37
 
 
38
set -e
 
39
 
 
40
. ./version.txt
 
41
builddate=`date`
 
42
sccsdate=`date +%Y/%m/%d`
 
43
user=${LOGNAME-$USER}
 
44
 
 
45
# Create an all numeric timestamp for rpqnames.
 
46
# rpq.c will return this string of numbers in bcd format
 
47
# It is OK to change the length (+ or -), but use
 
48
# decimal (0-9) digits only. Length must be even number of digits.
 
49
rpq_timestamp=`date +%Y%m%d%H%M%S`
 
50
 
 
51
trap 'rm -f version.c' 0 1 2 15
 
52
 
 
53
cat <<EOF >version.c
 
54
char *build = "${2-x3270} v$version $builddate $user";
 
55
char *app_defaults_version = "$adversion";
 
56
static char sccsid[] = "@(#)${2-x3270} v$version $sccsdate $user";
 
57
 
 
58
const char *build_rpq_timestamp = "$rpq_timestamp";
 
59
const char *build_rpq_version = "$version";
 
60
EOF
 
61
 
 
62
${1-cc} -c version.c