r36977 - in /trunk/libsyntax-highlight-engine-simple-languages-perl/debian: control.in copyright.head copyright.in copyright.tail make-copyright.pl refresh.pl

bremner-guest at users.alioth.debian.org bremner-guest at users.alioth.debian.org
Sun May 31 17:09:29 UTC 2009


Author: bremner-guest
Date: Sun May 31 17:09:24 2009
New Revision: 36977

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=36977
Log:
Iteration #2 of debian/* generator, now called refresh.pl. Currently
generates d/copyright and d/control.

Added:
    trunk/libsyntax-highlight-engine-simple-languages-perl/debian/control.in
    trunk/libsyntax-highlight-engine-simple-languages-perl/debian/copyright.in
      - copied, changed from r36920, trunk/libsyntax-highlight-engine-simple-languages-perl/debian/copyright.tail
    trunk/libsyntax-highlight-engine-simple-languages-perl/debian/refresh.pl
Removed:
    trunk/libsyntax-highlight-engine-simple-languages-perl/debian/copyright.head
    trunk/libsyntax-highlight-engine-simple-languages-perl/debian/copyright.tail
    trunk/libsyntax-highlight-engine-simple-languages-perl/debian/make-copyright.pl

Added: trunk/libsyntax-highlight-engine-simple-languages-perl/debian/control.in
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsyntax-highlight-engine-simple-languages-perl/debian/control.in?rev=36977&op=file
==============================================================================
--- trunk/libsyntax-highlight-engine-simple-languages-perl/debian/control.in (added)
+++ trunk/libsyntax-highlight-engine-simple-languages-perl/debian/control.in Sun May 31 17:09:24 2009
@@ -1,0 +1,24 @@
+Source: libsyntax-highlight-engine-simple-languages-perl
+Section: perl
+Priority: optional
+Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
+Uploaders: David Bremner <bremner at unb.ca>
+Build-Depends: debhelper (>= 7)
+Build-Depends-Indep: perl (>= 5.6.10-12), libuniversal-require-perl,
+  perl-modules (>= 5.10) | libversion-perl, libtest-perl-critic-perl,
+  libtest-pod-perl, libtest-pod-coverage-perl, libsyntax-highlight-engine-simple-perl
+Standards-Version: 3.8.1
+
+Package: libsyntax-highlight-engine-simple-languages-perl
+Architecture: all
+Depends: perl (>= 5.8.0-7)
+Enhances: libsyntax-highlight-engine-simple-perl
+Description: Perl module collection providing syntax highlighting
+ Syntax::Highlight::Engine::Simple provides a framework for generating coloured
+ HTML from source code and similar text using regular expressions, controlled
+ by cascading stylesheets (CSS). This package provides subclasses definining
+ syntax for concrete languages.
+ .
+ Currently, this package includes the following modules:
+ .
+#MODULE_LIST#

Copied: trunk/libsyntax-highlight-engine-simple-languages-perl/debian/copyright.in (from r36920, trunk/libsyntax-highlight-engine-simple-languages-perl/debian/copyright.tail)
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsyntax-highlight-engine-simple-languages-perl/debian/copyright.in?rev=36977&op=diff
==============================================================================
--- trunk/libsyntax-highlight-engine-simple-languages-perl/debian/copyright.tail (original)
+++ trunk/libsyntax-highlight-engine-simple-languages-perl/debian/copyright.in Sun May 31 17:09:24 2009
@@ -1,3 +1,9 @@
+This package contains several upstream packages; individual licenses are listed below.
+
+They are all downloaded from http://search.cpan.org/
+
+#COPYRIGHT_STANZAS#
+
 Files: debian/* 
 Copyright: © 2009, David Bremner <bremner at unb.ca>
 	   © 2009, Jonathan Yu <frequency at cpan.org>

Added: trunk/libsyntax-highlight-engine-simple-languages-perl/debian/refresh.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsyntax-highlight-engine-simple-languages-perl/debian/refresh.pl?rev=36977&op=file
==============================================================================
--- trunk/libsyntax-highlight-engine-simple-languages-perl/debian/refresh.pl (added)
+++ trunk/libsyntax-highlight-engine-simple-languages-perl/debian/refresh.pl Sun May 31 17:09:24 2009
@@ -1,0 +1,47 @@
+#!/usr/bin/perl
+# Copyright © 2009, David Bremner <bremner at unb.ca>
+# This file may be distributed under the same terms as Perl: Artistic license or GPL 1+
+use strict;
+use Parse::DebControl;
+use File::Slurp;
+
+my @infiles=qw(debian/copyright.in debian/control.in);
+
+my $parser=new Parse::DebControl;
+my $pkgconf=$parser->parse_file("debian/packages.cfg",
+				{useTieIxHash=>1,stripComments=>1}) || die "parser failed: $!";
+
+my $module_list=make_module_list($pkgconf);
+my $copyright_stanzas=make_copyright_stanzas($pkgconf);
+
+for my $file (@infiles) {
+    my $content=read_file($file);
+    my $outfile= $file;
+    $outfile =~ s/\.in$//;
+    
+    $content=~ s/#MODULE_LIST#/$module_list/;
+    $content=~ s/#COPYRIGHT_STANZAS#/$copyright_stanzas/;
+
+    write_file($outfile,$content);
+}
+
+sub short_desc($){
+  my $module=shift;
+  my $desc=$module->{Description};
+  $desc=~s/\n.*//;
+  return $desc;
+}
+sub make_copyright_stanzas($){
+  my $mref=shift;
+  my @modules=@{$mref};
+  my @list=map { $parser->write_mem($_); } @modules;
+  return join("\n\n", at list);
+}
+
+sub make_module_list($){
+  my $mref=shift;
+  my @modules=@{$mref};
+  my @list=map {"  * ". $_->{Module} . " (". short_desc($_) .")" } @modules;
+  return join("\n", at list);
+}
+




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