~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to build-aux/update-copyright

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-10-19 00:00:09 UTC
  • mfrom: (2.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20111019000009-8p33w3wz4b1rdri0
Tags: 1.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
  - Depend on libssl-dev 0.9.8k-7ubuntu4 (LP: #503339)
* Dropped changes, superseded in Debian:
  - Keep build dependencies in main:
    + debian/control: remove info2man build-dep
    + debian/patches/series: disable wget-infopod_generated_manpage
  - Mark wget Multi-Arch: foreign, so packages that aren't of the same arch
    can depend on it.
* Pass --with-ssl=openssl; we don't want to use gnutls, there's no udeb for
  it.
* Add a second build pass for the udeb, so we can build without libidn.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/perl -0777 -pi
 
1
eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
 
2
  & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
 
3
    if 0;
2
4
# Update an FSF copyright year list to include the current year.
3
5
 
4
 
my $VERSION = '2009-08-14.18:56'; # UTC
 
6
my $VERSION = '2011-01-02.20:59'; # UTC
5
7
 
6
 
# Copyright (C) 2009 Free Software Foundation, Inc.
 
8
# Copyright (C) 2009-2011 Free Software Foundation, Inc.
7
9
#
8
 
# This program is free software; you can redistribute it and/or modify
 
10
# This program is free software: you can redistribute it and/or modify
9
11
# it under the terms of the GNU General Public License as published by
10
12
# the Free Software Foundation; either version 3, or (at your option)
11
13
# any later version.
20
22
 
21
23
# Written by Jim Meyering and Joel E. Denny
22
24
 
23
 
# The arguments to this script should be names of files that contain FSF
24
 
# copyright statements to be updated.  For example, you might wish to
25
 
# use the update-copyright target rule in maint.mk from gnulib's
26
 
# maintainer-makefile module.
27
 
#
28
 
# 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
29
35
# year is not the current year, then the statement is updated for the
30
36
# new year and it is reformatted to:
31
37
#
34
40
#   3. Expand copyright year intervals.  (See "Environment variables"
35
41
#      below.)
36
42
#
37
 
# A warning is printed for every file for which no FSF copyright
 
43
# A warning is printed for every file for which no copyright
38
44
# statement is recognized.
39
45
#
40
 
# Each file's FSF copyright statement must be formated correctly in
 
46
# Each file's copyright statement must be formated correctly in
41
47
# order to be recognized.  For example, each of these is fine:
42
48
#
43
49
#   Copyright @copyright{} 1990-2005, 2007-2009 Free Software
57
63
#   ## Copyright (C) 1990-2005, 2007-2009 Free Software
58
64
#   #  Foundation, Inc.
59
65
#
60
 
# The following copyright statement is not recognized because the
61
 
# copyright holder is not the FSF:
62
 
#
63
 
#   Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
64
 
#
65
 
# However, any correctly formatted FSF copyright statement following
66
 
# either of the previous two copyright statements would be recognized.
67
 
#
68
 
# 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
69
70
# to be recognized are:
70
71
#
71
 
#   1. It is the first FSF copyright statement that meets all of the
72
 
#      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
73
74
#      ignored.
74
75
#   2. Its format is "Copyright (C)", then a list of copyright years,
75
 
#      and then the name of the copyright holder, which is "Free
76
 
#      Software Foundation, Inc.".
 
76
#      and then the name of the copyright holder.
77
77
#   3. The "(C)" takes one of the following forms or is omitted
78
78
#      entirely:
79
79
#
82
82
#        C. @copyright{}
83
83
#        D. ©
84
84
#
85
 
#   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
86
86
#      may be prefixed by any sequence (e.g., a comment) of no more than
87
 
#      5 characters.
 
87
#      5 characters -- including white space.
88
88
#   5. Iff such a prefix is present, the same prefix appears at the
89
89
#      beginning of each remaining line within the FSF copyright
90
90
#      statement.  There is one exception in order to support C-style
112
112
#      are expanded instead.
113
113
#   3. For testing purposes, you can set the assumed current year in
114
114
#      UPDATE_COPYRIGHT_YEAR.
 
115
#   4. The default maximum line length for a copyright line is 72.
 
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.".
115
119
 
116
120
use strict;
117
121
use warnings;
118
122
 
119
123
my $copyright_re = 'Copyright';
120
124
my $circle_c_re = '(?:\([cC]\)|@copyright{}|©)';
121
 
my $holder = 'Free Software Foundation, Inc.';
 
125
my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
 
126
$holder ||= 'Free Software Foundation, Inc.';
122
127
my $prefix_max = 5;
123
 
my $margin = 72;
 
128
my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH};
 
129
!$margin || $margin !~ m/^\d+$/
 
130
  and $margin = 72;
 
131
 
124
132
my $tab_width = 8;
125
133
 
126
134
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
245
253
  }
246
254
else
247
255
  {
248
 
    print STDERR "$ARGV: warning: FSF copyright statement not found\n";
 
256
    print STDERR "$ARGV: warning: copyright statement not found\n";
249
257
  }
250
258
 
251
259
# Local variables:
 
260
# mode: perl
252
261
# indent-tabs-mode: nil
253
262
# eval: (add-hook 'write-file-hooks 'time-stamp)
254
263
# time-stamp-start: "my $VERSION = '"