r71924 - in /trunk/libapache2-mod-perl2/debian: README.source changelog copyright parse_apache_changes.pl

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Wed Mar 23 21:29:47 UTC 2011


Author: periapt-guest
Date: Wed Mar 23 21:29:21 2011
New Revision: 71924

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=71924
Log:
worked out copyright for core code

Added:
    trunk/libapache2-mod-perl2/debian/README.source
    trunk/libapache2-mod-perl2/debian/parse_apache_changes.pl   (with props)
Modified:
    trunk/libapache2-mod-perl2/debian/changelog
    trunk/libapache2-mod-perl2/debian/copyright

Added: trunk/libapache2-mod-perl2/debian/README.source
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/README.source?rev=71924&op=file
==============================================================================
--- trunk/libapache2-mod-perl2/debian/README.source (added)
+++ trunk/libapache2-mod-perl2/debian/README.source Wed Mar 23 21:29:21 2011
@@ -1,0 +1,4 @@
+The script debian/parse_apache_changes.pl can be used to parse 
+the Changes and Apache-Test/Changes file to get the contributers
+and their copyright years. It is fairly crude. The users are generally 
+CPAN ids.

Modified: trunk/libapache2-mod-perl2/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/changelog?rev=71924&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/changelog (original)
+++ trunk/libapache2-mod-perl2/debian/changelog Wed Mar 23 21:29:21 2011
@@ -5,9 +5,6 @@
   - Clean lintian
   - Check copyright
     1.) Is the Apache liense stanza correct
-    2.) We could parse the Changes file to extract a list of 
-    contributers and years. There seems to be support for this
-    in the README
   - Resolve doc-base issues
   - Check dependencies
 

Modified: trunk/libapache2-mod-perl2/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/copyright?rev=71924&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/copyright (original)
+++ trunk/libapache2-mod-perl2/debian/copyright Wed Mar 23 21:29:21 2011
@@ -10,6 +10,22 @@
 
 Files: *
 Copyright: 2002-2011, Doug MacEachern
+ 2003, Mike Cramer
+ 2003, 2004, 2005, 2006, 2007, 2010, Philippe M. Chiasson
+ 2005, 2006, Philip M. Gollucci
+ 2003, 2004, 2005, 2006, 2007, Geoffrey Young
+ 2004, 2005, 2006, Randy Kobes
+ 2010, 2011, Torsten Foertsch <torsten.foertsch at gmx.net>
+ 2011, Stefan Fritsch
+ 2004, Ken
+ 2003, 2004, 2005, 2006, Stas
+ 2004, 2006, 2010, Joe Orton
+ 2004, Boris Zentner
+ 2010, Mark A. Hershberger
+ 2010, 2011, Fred Moyer
+ 2005, joes
+ 2004, David Wheeler
+ 2004, Steve Hay
 License: Apache-2.0
 
 Files: debian/*

Added: trunk/libapache2-mod-perl2/debian/parse_apache_changes.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/parse_apache_changes.pl?rev=71924&op=file
==============================================================================
--- trunk/libapache2-mod-perl2/debian/parse_apache_changes.pl (added)
+++ trunk/libapache2-mod-perl2/debian/parse_apache_changes.pl Wed Mar 23 21:29:21 2011
@@ -1,0 +1,57 @@
+#!/usr/bin/perl
+use strict;
+
+package ChangesPodFormatter;
+use base qw(Pod::Simple::Methody);
+
+sub start_Document {
+    my $self = shift;
+    $self->{state} = 'Doc';
+    $self->{year} = '';
+    if (not exists $self->{contributers}) {
+        $self->{contributers} = {};
+    }
+}
+
+sub start_item_text {
+    my $self = shift;
+    $self->{state} = 'Item';
+    return;
+}
+
+sub end_item_text {
+    my $self = shift;
+    $self->{state} = 'Doc';
+    return;
+}
+
+sub handle_text {
+    my ($self, $text) = @_;
+    if ($self->{state} eq 'Item') {
+        if ($text =~ /\w+\s+\d{1,2},\s+(\d{4})$/) {
+            my $year = $1;
+            $self->{year} = $year;
+        }
+        else {
+            print "$text\n";
+        }
+    }
+    else {
+        foreach my $c ($text =~ /\[([\w\s\<\>\@\.\-]+)\]/g) {
+            $self->{contributers}->{$c}->{$self->{year}} = 1;
+        }
+    }
+    return;
+}
+
+1;
+package main;
+my $parser = ChangesPodFormatter->new;
+$parser->parse_file('Apache-Test/Changes');
+$parser->parse_file('Changes');
+foreach my $c (keys %{$parser->{contributers}}) {
+    my %years = %{$parser->{contributers}->{$c}};
+    print join ", ", sort keys %years;
+    print ", $c\n";
+}
+exit 0;

Propchange: trunk/libapache2-mod-perl2/debian/parse_apache_changes.pl
------------------------------------------------------------------------------
    svn:executable = *




More information about the Pkg-perl-cvs-commits mailing list