~ubuntu-branches/ubuntu/quantal/gnutls26/quantal-security

« back to all changes in this revision

Viewing changes to build-aux/update-copyright

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2011-10-01 15:28:13 UTC
  • mfrom: (12.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20111001152813-yygm1c4cxonfxhzy
Tags: 2.12.11-1
* New upstream version.
  + Allow CA importing of 0 certificates to succeed. Closes: #640639
* Add libp11-kit-dev to libgnutls-dev dependencies. (see #643811)
* [20_guiledocstring.diff] guile: Fix docstring extraction with CPP 4.5+.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
    if 0;
4
4
# Update an FSF copyright year list to include the current year.
5
5
 
6
 
my $VERSION = '2009-12-28.11:09'; # UTC
 
6
my $VERSION = '2011-01-02.20:59'; # UTC
7
7
 
8
 
# Copyright (C) 2009-2010 Free Software Foundation, Inc.
 
8
# Copyright (C) 2009-2011 Free Software Foundation, Inc.
9
9
#
10
10
# This program is free software: you can redistribute it and/or modify
11
11
# it under the terms of the GNU General Public License as published by
22
22
 
23
23
# Written by Jim Meyering and Joel E. Denny
24
24
 
25
 
# The arguments to this script should be names of files that contain FSF
26
 
# copyright statements to be updated.  For example, you might wish to
27
 
# use the update-copyright target rule in maint.mk from gnulib's
28
 
# maintainer-makefile module.
29
 
#
30
 
# Iff an FSF copyright statement is recognized in a file and the final
 
25
# The arguments to this script should be names of files that contain
 
26
# copyright statements to be updated.  The copyright holder's name
 
27
# defaults to "Free Softward Foundation, Inc." but may be changed to
 
28
# any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
 
29
# variable.
 
30
#
 
31
# For example, you might wish to use the update-copyright target rule
 
32
# in maint.mk from gnulib's maintainer-makefile module.
 
33
#
 
34
# Iff a copyright statement is recognized in a file and the final
31
35
# year is not the current year, then the statement is updated for the
32
36
# new year and it is reformatted to:
33
37
#
36
40
#   3. Expand copyright year intervals.  (See "Environment variables"
37
41
#      below.)
38
42
#
39
 
# A warning is printed for every file for which no FSF copyright
 
43
# A warning is printed for every file for which no copyright
40
44
# statement is recognized.
41
45
#
42
 
# Each file's FSF copyright statement must be formated correctly in
 
46
# Each file's copyright statement must be formated correctly in
43
47
# order to be recognized.  For example, each of these is fine:
44
48
#
45
49
#   Copyright @copyright{} 1990-2005, 2007-2009 Free Software
59
63
#   ## Copyright (C) 1990-2005, 2007-2009 Free Software
60
64
#   #  Foundation, Inc.
61
65
#
62
 
# The following copyright statement is not recognized because the
63
 
# copyright holder is not the FSF:
64
 
#
65
 
#   Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
66
 
#
67
 
# However, any correctly formatted FSF copyright statement following
68
 
# either of the previous two copyright statements would be recognized.
69
 
#
70
 
# The exact conditions that a file's FSF copyright statement must meet
 
66
# However, any correctly formatted copyright statement following
 
67
# a non-matching copyright statements would be recognized.
 
68
#
 
69
# The exact conditions that a file's copyright statement must meet
71
70
# to be recognized are:
72
71
#
73
 
#   1. It is the first FSF copyright statement that meets all of the
74
 
#      following conditions.  Subsequent FSF copyright statements are
 
72
#   1. It is the first copyright statement that meets all of the
 
73
#      following conditions.  Subsequent copyright statements are
75
74
#      ignored.
76
75
#   2. Its format is "Copyright (C)", then a list of copyright years,
77
 
#      and then the name of the copyright holder, which is "Free
78
 
#      Software Foundation, Inc.".
 
76
#      and then the name of the copyright holder.
79
77
#   3. The "(C)" takes one of the following forms or is omitted
80
78
#      entirely:
81
79
#
84
82
#        C. @copyright{}
85
83
#        D. ©
86
84
#
87
 
#   4. The "Copyright" appears at the beginning of a line except that it
 
85
#   4. The "Copyright" appears at the beginning of a line, except that it
88
86
#      may be prefixed by any sequence (e.g., a comment) of no more than
89
 
#      5 characters.
 
87
#      5 characters -- including white space.
90
88
#   5. Iff such a prefix is present, the same prefix appears at the
91
89
#      beginning of each remaining line within the FSF copyright
92
90
#      statement.  There is one exception in order to support C-style
116
114
#      UPDATE_COPYRIGHT_YEAR.
117
115
#   4. The default maximum line length for a copyright line is 72.
118
116
#      Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length.
 
117
#   5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other
 
118
#      than "Free Software Foundation, Inc.".
119
119
 
120
120
use strict;
121
121
use warnings;
122
122
 
123
123
my $copyright_re = 'Copyright';
124
124
my $circle_c_re = '(?:\([cC]\)|@copyright{}|©)';
125
 
my $holder = 'Free Software Foundation, Inc.';
 
125
my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
 
126
$holder ||= 'Free Software Foundation, Inc.';
126
127
my $prefix_max = 5;
127
128
my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH};
128
129
!$margin || $margin !~ m/^\d+$/
252
253
  }
253
254
else
254
255
  {
255
 
    print STDERR "$ARGV: warning: FSF copyright statement not found\n";
 
256
    print STDERR "$ARGV: warning: copyright statement not found\n";
256
257
  }
257
258
 
258
259
# Local variables: