r25384 - in /trunk/libclass-singleton-perl: Changes MANIFEST META.yml Makefile.PL README Singleton.pm debian/changelog debian/compat debian/control debian/copyright debian/packages debian/rules debian/watch lib/ t/ test.pl
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Fri Sep 19 16:50:48 UTC 2008
Author: ansgar-guest
Date: Fri Sep 19 16:50:45 2008
New Revision: 25384
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=25384
Log:
* New upstream release (Closes: #492139)
* debian/watch: Use dist-based URL
* Use debhelper instead of yada
* debian/control: Add Vcs-* fields, add Homepage field,
set Maintainer to Debian Perl Group, add myself to Uploaders,
bump Standards Version to 3.8.0
* debian/control: Change description slightly
* Convert debian/copyright to proposed machine-readable format
Added:
trunk/libclass-singleton-perl/META.yml
- copied unchanged from r25382, branches/upstream/libclass-singleton-perl/current/META.yml
trunk/libclass-singleton-perl/debian/compat
trunk/libclass-singleton-perl/debian/copyright
trunk/libclass-singleton-perl/lib/
- copied from r25382, branches/upstream/libclass-singleton-perl/current/lib/
trunk/libclass-singleton-perl/t/
- copied from r25382, branches/upstream/libclass-singleton-perl/current/t/
Removed:
trunk/libclass-singleton-perl/Singleton.pm
trunk/libclass-singleton-perl/debian/packages
trunk/libclass-singleton-perl/test.pl
Modified:
trunk/libclass-singleton-perl/Changes
trunk/libclass-singleton-perl/MANIFEST
trunk/libclass-singleton-perl/Makefile.PL
trunk/libclass-singleton-perl/README
trunk/libclass-singleton-perl/debian/changelog
trunk/libclass-singleton-perl/debian/control
trunk/libclass-singleton-perl/debian/rules
trunk/libclass-singleton-perl/debian/watch
Modified: trunk/libclass-singleton-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/Changes?rev=25384&op=diff
==============================================================================
--- trunk/libclass-singleton-perl/Changes (original)
+++ trunk/libclass-singleton-perl/Changes Fri Sep 19 16:50:45 2008
@@ -1,26 +1,17 @@
#------------------------------------------------------------------------
-# Version 1.00 Date: 1998/02/10 09:26:44
+# Version 1.04 Date: 2007/09/28
#------------------------------------------------------------------------
-* Initial revision
+* Added the has_instance() method to return an existing instance without
+ creating a new one.
+* General cleanup of code, documentation and tests.
+
+* Changed licence from Perl Artistic to the same terms as Perl itself
+ (e.g. Artistic 2.0/GPL)
#------------------------------------------------------------------------
-# Version 1.01 Date: 1998/02/10 09:40:40
-#------------------------------------------------------------------------
-
-* Minor documentation changes
-
-
-#------------------------------------------------------------------------
-# Version 1.02 Date: 1998/04/16 14:10:16
-#------------------------------------------------------------------------
-
-* Fixed minor typos and corrected example in documentation.
-
-
-#------------------------------------------------------------------------
-# Version 1.03 Date: 1999/01/19 15:57:43
+# Version 1.03 Date: 1999/01/19
#------------------------------------------------------------------------
* Incorporated patches from Andreas Koenig to inline calculation of
@@ -33,8 +24,23 @@
* Updated documentation accordingly.
+#------------------------------------------------------------------------
+# Version 1.02 Date: 1998/04/16
+#------------------------------------------------------------------------
+
+* Fixed minor typos and corrected example in documentation.
+#------------------------------------------------------------------------
+# Version 1.01 Date: 1998/02/10
+#------------------------------------------------------------------------
+
+* Minor documentation changes
+#------------------------------------------------------------------------
+# Version 1.00 Date: 1998/02/10
+#------------------------------------------------------------------------
+* Initial revision
+
Modified: trunk/libclass-singleton-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/MANIFEST?rev=25384&op=diff
==============================================================================
--- trunk/libclass-singleton-perl/MANIFEST (original)
+++ trunk/libclass-singleton-perl/MANIFEST Fri Sep 19 16:50:45 2008
@@ -2,5 +2,6 @@
MANIFEST
Makefile.PL
README
-Singleton.pm
-test.pl
+lib/Class/Singleton.pm
+t/singleton.t
+META.yml Module meta-data (added by MakeMaker)
Modified: trunk/libclass-singleton-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/Makefile.PL?rev=25384&op=diff
==============================================================================
--- trunk/libclass-singleton-perl/Makefile.PL (original)
+++ trunk/libclass-singleton-perl/Makefile.PL Fri Sep 19 16:50:45 2008
@@ -1,7 +1,19 @@
use ExtUtils::MakeMaker;
-WriteMakefile(
- 'NAME' => 'Class::Singleton',
- 'VERSION_FROM' => 'Singleton.pm', # finds $VERSION
- 'dist' => { 'COMPRESS' => 'gzip', 'SUFFIX' => 'gz' },
+my %opts = (
+ 'NAME' => 'Class::Singleton',
+ 'VERSION_FROM' => 'lib/Class/Singleton.pm', # finds $VERSION
+ 'PMLIBDIRS' => [ 'lib' ],
+ 'dist' => {
+ 'COMPRESS' => 'gzip',
+ 'SUFFIX' => 'gz',
+ },
);
+
+if ($ExtUtils::MakeMaker::VERSION >= 5.43) {
+ $opts{ AUTHOR } = 'Andy Wardley <abw at wardley.org>';
+ $opts{ ABSTRACT } = 'Base class for creating singleton objects',
+}
+
+WriteMakefile( %opts );
+
Modified: trunk/libclass-singleton-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/README?rev=25384&op=diff
==============================================================================
--- trunk/libclass-singleton-perl/README (original)
+++ trunk/libclass-singleton-perl/README Fri Sep 19 16:50:45 2008
@@ -3,42 +3,38 @@
SYNOPSIS
use Class::Singleton;
-
+
my $one = Class::Singleton->instance(); # returns a new instance
my $two = Class::Singleton->instance(); # returns same instance
DESCRIPTION
- This is the Class::Singleton module. A Singleton describes an
- object class that can have only one instance in any system. An
- example of a Singleton might be a print spooler or system
- registry. This module implements a Singleton class from which
- other classes can be derived. By itself, the Class::Singleton
- module does very little other than manage the instantiation of a
- single object. In deriving a class from Class::Singleton, your
- module will inherit the Singleton instantiation method and can
- implement whatever specific functionality is required.
-
- For a description and discussion of the Singleton class, see
- "Design Patterns", Gamma et al, Addison-Wesley, 1995, ISBN 0-
- 201-63361-2.
+ This is the "Class::Singleton" module. A Singleton describes an object
+ class that can have only one instance in any system. An example of a
+ Singleton might be a print spooler or system registry. This module
+ implements a Singleton class from which other classes can be derived. By
+ itself, the "Class::Singleton" module does very little other than manage
+ the instantiation of a single object. In deriving a class from
+ "Class::Singleton", your module will inherit the Singleton instantiation
+ method and can implement whatever specific functionality is required.
+
+ For a description and discussion of the Singleton class, see "Design
+ Patterns", Gamma et al, Addison-Wesley, 1995, ISBN 0-201-63361-2.
PREREQUISITES
- Class::Singleton requires Perl version 5.004 or later. If you
- have an older version of Perl, please upgrade to latest version.
- Perl 5.004 is known to be stable and includes new features and
- bug fixes over previous versions. Perl itself is available from
+ "Class::Singleton" requires Perl version 5.004 or later. If you have an
+ older version of Perl, please upgrade to latest version, available from
your nearest CPAN site (see INSTALLATION below).
INSTALLATION
- The Class::Singleton module is available from CPAN. As the
- 'perlmod' man page explains:
+ The "Class::Singleton" module is available from CPAN. As the 'perlmod'
+ man page explains:
CPAN stands for the Comprehensive Perl Archive Network.
This is a globally replicated collection of all known Perl
materials, including hundreds of unbunded modules.
-
+
[...]
-
+
For an up-to-date listing of CPAN sites, see
http://www.perl.com/perl/ or ftp://ftp.perl.com/perl/ .
@@ -47,20 +43,13 @@
/modules/by-module/Class/Class-Singleton-<version>.tar.gz
/authors/id/ABW/Class-Singleton-<version>.tar.gz
- For the latest information on Class-Singleton or to download the
- latest pre-release/beta version of the module, consult the
- definitive reference:
-
- http://www.kfs.org/~abw/perl/
-
- Class::Singleton is distributed as a single gzipped tar archive
- file:
+ "Class::Singleton" is distributed as a single gzipped tar archive file:
Class-Singleton-<version>.tar.gz
- Note that "<version>" represents the current version number, of
- the form "1.23". See the REVISION manpage below to determine the
- current version number for Class::Singleton.
+ Note that "<version>" represents the current version number, of the form
+ "1.23". See VERSION below to determine the current version number for
+ "Class::Singleton".
Unpack the archive to create an installation directory:
@@ -75,177 +64,205 @@
make test
make install
- The 'make install' will install the module on your system. You
- may need root access to perform this task. If you install the
- module in a local directory (for example, by executing "perl
- Makefile.PL LIB=~/lib" in the above - see `perldoc MakeMaker'
- for full details), you will need to ensure that the PERL5LIB
- environment variable is set to include the location, or add a
- line to your scripts explicitly naming the library location:
+ The '"make install"' will install the module on your system. You may
+ need root access to perform this task. If you install the module in a
+ local directory (for example, by executing ""perl Makefile.PL
+ LIB=~/lib"" in the above - see "perldoc MakeMaker" for full details),
+ you will need to ensure that the "PERL5LIB" environment variable is set
+ to include the location, or add a line to your scripts explicitly naming
+ the library location:
use lib '/local/path/to/lib';
USING THE CLASS::SINGLETON MODULE
- To import and use the Class::Singleton module the following line
- should appear in your Perl script:
+ To import and use the "Class::Singleton" module the following line
+ should appear in your Perl program:
use Class::Singleton;
- The instance() method is used to create a new Class::Singleton
- instance, or return a reference to an existing instance. Using
- this method, it is only possible to have a single instance of
- the class in any system.
+ The instance() method is used to create a new "Class::Singleton"
+ instance, or return a reference to an existing instance. Using this
+ method, it is only possible to have a single instance of the class in
+ any system.
my $highlander = Class::Singleton->instance();
- Assuming that no Class::Singleton object currently exists, this
- first call to instance() will create a new Class::Singleton and
- return a reference to it. Future invocations of instance() will
- return the same reference.
+ Assuming that no "Class::Singleton" object currently exists, this first
+ call to instance() will create a new "Class::Singleton" and return a
+ reference to it. Future invocations of instance() will return the same
+ reference.
my $macleod = Class::Singleton->instance();
- In the above example, both $highlander and $macleod contain the
- same reference to a Class::Singleton instance. There can be only
- one.
+ In the above example, both $highlander and $macleod contain the same
+ reference to a "Class::Singleton" instance. There can be only one.
DERIVING SINGLETON CLASSES
- A module class may be derived from Class::Singleton and will
- inherit the instance() method that correctly instantiates only
- one object.
+ A module class may be derived from "Class::Singleton" and will inherit
+ the instance() method that correctly instantiates only one object.
package PrintSpooler;
- use vars qw(@ISA);
- @ISA = qw(Class::Singleton);
-
+ use base 'Class::Singleton';
+
# derived class specific code
sub submit_job {
...
}
-
+
sub cancel_job {
...
}
- The PrintSpooler class defined above could be used as follows:
+ The "PrintSpooler" class defined above could be used as follows:
use PrintSpooler;
-
+
my $spooler = PrintSpooler->instance();
-
+
$spooler->submit_job(...);
- The instance() method calls the _new_instance() constructor
- method the first and only time a new instance is created. All
- parameters passed to the instance() method are forwarded to
- _new_instance(). In the base class this method returns a blessed
- reference to an empty hash array. Derived classes may redefine
- it to provide specific object initialisation or change the
- underlying object type (to a list reference, for example).
+ The instance() method calls the _new_instance() constructor method the
+ first and only time a new instance is created. All parameters passed to
+ the instance() method are forwarded to _new_instance(). In the base
+ class the _new_instance() method returns a blessed reference to a hash
+ array containing any arguments passed as either a hash reference or list
+ of named parameters.
+
+ package MyConfig;
+ use base 'Class::Singleton';
+
+ sub foo {
+ shift->{ foo };
+ }
+
+ sub bar {
+ shift->{ bar };
+ }
+
+ package main;
+
+ # either: hash reference of named parameters
+ my $config = MyConfig->instance({ foo => 10, bar => 20 });
+
+ # or: list of named parameters
+ my $config = MyConfig->instance( foo => 10, bar => 20 );
+
+ print $config->foo(); # 10
+ print $config->bar(); # 20
+
+ Derived classes may redefine the _new_instance() method to provide more
+ specific object initialisation or change the underlying object type (to
+ a list reference, for example).
package MyApp::Database;
- use vars qw( $ERROR );
- use base qw( Class::Singleton );
+ use base 'Class::Singleton';
use DBI;
-
- $ERROR = '';
-
+
# this only gets called the first time instance() is called
sub _new_instance {
my $class = shift;
my $self = bless { }, $class;
my $db = shift || "myappdb";
my $host = shift || "localhost";
-
- unless (defined ($self->{ DB }
- = DBI->connect("DBI:mSQL:$db:$host"))) {
- $ERROR = "Cannot connect to database: $DBI::errstr\n";
- # return failure;
- return undef;
- }
-
+
+ $self->{ DB } = DBI->connect("DBI:mSQL:$db:$host")
+ || die "Cannot connect to database: $DBI::errstr";
+
# any other initialisation...
-
- # return sucess
- $self;
+
+ return $self;
}
The above example might be used as follows:
use MyApp::Database;
-
+
# first use - database gets initialised
my $database = MyApp::Database->instance();
- die $MyApp::Database::ERROR unless defined $database;
Some time later on in a module far, far away...
package MyApp::FooBar
use MyApp::Database;
-
+
+ # this FooBar object needs access to the database; the Singleton
+ # approach gives a nice wrapper around global variables.
+
sub new {
- # usual stuff...
-
- # this FooBar object needs access to the database; the Singleton
- # approach gives a nice wrapper around global variables.
-
- # subsequent use - existing instance gets returned
- my $database = MyApp::Database->instance();
-
- # the new() isn't called if an instance already exists,
- # so the above constructor shouldn't fail, but we check
- # anyway. One day things might change and this could be the
- # first call to instance()...
- die $MyAppDatabase::ERROR unless defined $database;
-
- # more stuff...
- }
-
- The Class::Singleton instance() method uses a package variable
- to store a reference to any existing instance of the object.
- This variable, "_instance", is coerced into the derived class
- package rather than the base class package.
-
- Thus, in the MyApp::Database example above, the instance
- variable would be:
+ my $class = shift;
+ bless {
+ database => MyApp::Database->instance(),
+ }, $class;
+ }
+
+ The "Class::Singleton" instance() method uses a package variable to
+ store a reference to any existing instance of the object. This variable,
+ ""_instance"", is coerced into the derived class package rather than the
+ base class package.
+
+ Thus, in the "MyApp::Database" example above, the instance variable
+ would be:
$MyApp::Database::_instance;
- This allows different classes to be derived from
- Class::Singleton that can co-exist in the same system, while
- still allowing only one instance of any one class to exists. For
- example, it would be possible to derive both 'PrintSpooler' and
- 'MyApp::Database' from Class::Singleton and have a single
- instance of *each* in a system, rather than a single instance of
- *either*.
+ This allows different classes to be derived from "Class::Singleton" that
+ can co-exist in the same system, while still allowing only one instance
+ of any one class to exists. For example, it would be possible to derive
+ both '"PrintSpooler"' and '"MyApp::Database"' from "Class::Singleton"
+ and have a single instance of *each* in a system, rather than a single
+ instance of *either*.
+
+ You can use the has_instance() method to find out if a particular class
+ already has an instance defined. A reference to the instance is returned
+ or "undef" if none is currently defined.
+
+ my $instance = MyApp::Database->has_instance()
+ || warn "No instance is defined yet";
+
+METHODS
+ instance()
+ This method is called to return a current object instance or create a
+ new one by calling _new_instance().
+
+ has_instance()
+ This method returns a reference to any existing instance or "undef" if
+ none is defined.
+
+ my $testing = MySingleton1->has_instance()
+ || warn "No instance defined for MySingleton1";
+
+ _new_instance()
+ This "private" method is called by instance() to create a new object
+ instance if one doesn't already exist. It is not intended to be called
+ directly (although there's nothing to stop you from calling it if you're
+ really determined to do so).
+
+ It creates a blessed hash reference containing any arguments passed to
+ the method as either a hash reference or list of named parameters.
+
+ # either: hash reference of named parameters
+ my $example1 = MySingleton1->new({ pi => 3.14, e => 2.718 });
+
+ # or: list of named parameters
+ my $example2 = MySingleton2->new( pi => 3.14, e => 2.718 );
+
+ It is important to remember that the instance() method will *only* call
+ the *_new_instance()* method once, so any arguments you pass may be
+ silently ignored if an instance already exists. You can use the
+ has_instance() method to determine if an instance is already defined.
AUTHOR
- Andy Wardley, `<abw at cre.canon.co.uk>'
-
- Web Technology Group, Canon Research Centre Europe Ltd.
-
- Thanks to Andreas Koenig `<andreas.koenig at anima.de>' for
- providing some significant speedup patches and other ideas.
-
-REVISION
- $Revision: 1.3 $
+ Andy Wardley <abw at wardley.org> <http://wardley.org/>
+
+ Thanks to Andreas Koenig for providing some significant speedup patches
+ and other ideas.
+
+VERSION
+ This is version 1.4, released September 2007
COPYRIGHT
- Copyright (C) 1998 Canon Research Centre Europe Ltd. All Rights
- Reserved.
-
- This module is free software; you can redistribute it and/or
- modify it under the term of the Perl Artistic License.
-
-SEE ALSO
- Canon Research Centre Europe Perl Pages
- http://www.cre.canon.co.uk/perl/
-
- The Author's Home Page
- http://www.kfs.org/~abw/
-
- Design Patterns
- Class::Singleton is an implementation of the Singleton class
- described in "Design Patterns", Gamma et al, Addison-Wesley,
- 1995, ISBN 0-201-63361-2
-
+ Copyright Andy Wardley 1998-2007. All Rights Reserved.
+
+ This module is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
+
Modified: trunk/libclass-singleton-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/debian/changelog?rev=25384&op=diff
==============================================================================
--- trunk/libclass-singleton-perl/debian/changelog (original)
+++ trunk/libclass-singleton-perl/debian/changelog Fri Sep 19 16:50:45 2008
@@ -1,9 +1,20 @@
-libclass-singleton-perl (1.03-8) UNRELEASED; urgency=low
+libclass-singleton-perl (1.4-1) unstable; urgency=low
+ [ Damyan Ivanov ]
* Take over for the Debian Perl Group on maintainer's request
(http://lists.debian.org/debian-perl/2008/09/msg00111.html)
- -- Damyan Ivanov <dmn at debian.org> Wed, 17 Sep 2008 22:24:47 +0300
+ [ Ansgar Burchardt ]
+ * New upstream release (Closes: #492139)
+ * debian/watch: Use dist-based URL
+ * Use debhelper instead of yada
+ * debian/control: Add Vcs-* fields, add Homepage field,
+ set Maintainer to Debian Perl Group, add myself to Uploaders,
+ bump Standards Version to 3.8.0
+ * debian/control: Change description slightly
+ * Convert debian/copyright to proposed machine-readable format
+
+ -- Ansgar Burchardt <ansgar at 43-1.org> Fri, 19 Sep 2008 18:50:38 +0200
libclass-singleton-perl (1.03-7) unstable; urgency=low
Added: trunk/libclass-singleton-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/debian/compat?rev=25384&op=file
==============================================================================
--- trunk/libclass-singleton-perl/debian/compat (added)
+++ trunk/libclass-singleton-perl/debian/compat Fri Sep 19 16:50:45 2008
@@ -1,0 +1,1 @@
+7
Modified: trunk/libclass-singleton-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/debian/control?rev=25384&op=diff
==============================================================================
--- trunk/libclass-singleton-perl/debian/control (original)
+++ trunk/libclass-singleton-perl/debian/control Fri Sep 19 16:50:45 2008
@@ -1,23 +1,28 @@
Source: libclass-singleton-perl
-Maintainer: Piotr Roszatycki <dexter at debian.org>
+Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
+Uploaders: Ansgar Burchardt <ansgar at 43-1.org>
Section: perl
Priority: optional
-Standards-Version: 3.6.2
-Build-Depends: yada (>= 0.54)
+Standards-Version: 3.8.0
+Build-Depends: debhelper (>= 7)
Build-Depends-Indep: perl (>= 5.8)
+Homepage: http://search.cpan.org/dist/Class-Singleton/
+Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libclass-singleton-perl/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/
Package: libclass-singleton-perl
Architecture: all
-Depends: ${libclass-singleton-perl:Depends}
-Description: perl Class::Singleton - Implementation of a "Singleton" class
- This is the Class::Singleton module. A Singleton describes an object class
- that can have only one instance in any system. An example of a Singleton
- might be a print spooler or system registry. This module implements a
- Singleton class from which other classes can be derived. By itself, the
- Class::Singleton module does very little other than manage the instantiation
- of a single object. In deriving a class from Class::Singleton, your module
- will inherit the Singleton instantiation method and can implement whatever
- specific functionality is required.
+Depends: ${perl:Depends}, ${misc:Depends}
+Description: implementation of a "Singleton" class
+ The Class::Singleton module implements a Singleton class from which other
+ classes can be derived. A Singleton describes an object class that can have
+ only one instance in any system. An example of a Singleton might be a print
+ spooler or system registry.
+ .
+ By itself, the Class::Singleton module does very little other than manage the
+ instantiation of a single object. In deriving a class from Class::Singleton,
+ your module will inherit the Singleton instantiation method and can implement
+ whatever specific functionality is required.
.
For a description and discussion of the Singleton class, see
"Design Patterns", Gamma et al, Addison-Wesley, 1995, ISBN 0-201-63361-2.
Added: trunk/libclass-singleton-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/debian/copyright?rev=25384&op=file
==============================================================================
--- trunk/libclass-singleton-perl/debian/copyright (added)
+++ trunk/libclass-singleton-perl/debian/copyright Fri Sep 19 16:50:45 2008
@@ -1,0 +1,25 @@
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=228
+Upstream-Name: Class-Singleton
+Upstream-Maintainer: Andy Wardley <abw at wardley.org>
+Upstream-Source: http://search.cpan.org/dist/Class-Singleton/
+
+Files: *
+Copyright: © 1998-2007, Andy Wardley <abw at wardley.org>
+License: GPL-1+ | Artistic
+ This module is free software; you can redistribute it and/or modify
+ it under the same terms as Perl itself.
+ .
+ Perl is distributed under your choice of the GNU General Public License or
+ the Artistic License. On Debian GNU/Linux systems, the complete text of the
+ GNU General Public License can be found in `/usr/share/common-licenses/GPL'
+ and the Artistic Licence in `/usr/share/common-licenses/Artistic'.
+
+Files: debian/*
+Copyright:
+ © 2002-2003, Brian Nelson <pyro at debian.org>
+ © 2005, Piotr Roszatycki <dexter at debian.org>
+ © 2008, Ansgar Burchardt <ansgar at 43-1.org>
+License: GPL-1+ | Artistic
+ It is assumed that all contributors put their work under the same license
+ as the module itself.
+
Modified: trunk/libclass-singleton-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/debian/rules?rev=25384&op=diff
==============================================================================
--- trunk/libclass-singleton-perl/debian/rules (original)
+++ trunk/libclass-singleton-perl/debian/rules Fri Sep 19 16:50:45 2008
@@ -1,244 +1,23 @@
#!/usr/bin/make -f
-# Generated automatically from debian/packages
-# by yada v0.54, of Sun, 28 Oct 2007
-DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
-DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
-DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
-DEB_HOST_GNU_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU 2>/dev/null)
-DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE 2>/dev/null)
-DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM 2>/dev/null)
+build: build-stamp
+build-stamp:
+ dh build
+ touch $@
-DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH 2>/dev/null)
-DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS 2>/dev/null)
-DEB_BUILD_ARCH_CPU := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null)
-DEB_BUILD_GNU_CPU := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU 2>/dev/null)
-DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE 2>/dev/null)
-DEB_BUILD_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM 2>/dev/null)
+clean:
+ dh $@
-# Take account of old dpkg-architecture output.
-ifeq ($(DEB_HOST_ARCH_CPU),)
- DEB_HOST_ARCH_CPU := $(DEB_HOST_GNU_CPU))
- ifeq ($(DEB_HOST_ARCH_CPU),i486)
- DEB_HOST_ARCH_OS := i386
- else
- ifeq ($(DEB_HOST_ARCH_CPU),x86_64)
- DEB_HOST_ARCH_OS := amd64
- endif
- endif
-endif
-ifeq ($(DEB_HOST_ARCH_OS),)
- DEB_HOST_ARCH_OS := $(subst -gnu,,$(DEB_HOST_GNU_SYSTEM))
- ifeq ($(DEB_HOST_ARCH_OS),gnu)
- DEB_HOST_ARCH_OS := hurd
- endif
-endif
-ifeq ($(DEB_BUILD_ARCH_CPU),)
- DEB_BUILD_ARCH_CPU := $(DEB_BUILD_GNU_CPU))
- ifeq ($(DEB_BUILD_ARCH_CPU),i486)
- DEB_BUILD_ARCH_OS := i386
- else
- ifeq ($(DEB_BUILD_ARCH_CPU),x86_64)
- DEB_BUILD_ARCH_OS := amd64
- endif
- endif
-endif
-ifeq ($(DEB_BUILD_ARCH_OS),)
- DEB_BUILD_ARCH_OS := $(subst -gnu,,$(DEB_BUILD_GNU_SYSTEM))
- ifeq ($(DEB_BUILD_ARCH_OS),gnu)
- DEB_BUILD_ARCH_OS := hurd
- endif
-endif
+install: install-stamp
+install-stamp: build-stamp
+ dh install
+ touch $@
-LEFT_PARENTHESIS:=(
-VERSION:=$(shell head -n1 debian/changelog | sed -e "s/^[0-9a-zA-Z.-]* $(LEFT_PARENTHESIS)//" -e "s/[^0-9a-zA-Z.:+~-].*//")
+binary-arch:
-SHELL=/bin/bash
+binary-indep: install
+ dh $@
-.PHONY: default
-default:
- @echo "Specify a target:"; \
- echo " build compile the package"; \
- echo " build-arch compile the architecture-dependent package"; \
- echo " build-indep compile the architecture-independent package"; \
- echo " binary make all binary packages"; \
- echo " binary-arch make all architecture-dependent binary packages"; \
- echo " binary-indep make all architecture-independent binary packages"; \
- echo " clean clean up the source package"; \
- echo; \
- echo " clean-install-tree clean up only under debian/"; \
- echo
+binary: binary-arch binary-indep
-# Build the package and prepare the install tree
-
-.PHONY: build-only build
-build-only: debian/build-stamp
-build: build-only
-
-.PHONY: build-arch-only build-arch
-build-arch-only: debian/build-arch-stamp
-build-arch: build-arch-only
-
-.PHONY: build-indep-only build-indep
-build-indep-only: debian/build-indep-stamp
-build-indep: build-indep-only
-
-# Make sure these rules and the control file are up-to-date
-
-.PHONY: rules control templates
-rules: debian/rules
-debian/rules: $(shell which yada) debian/packages-tmp
- yada rebuild rules
-
-control: debian/control
-debian/control: $(shell which yada) debian/packages-tmp
- yada rebuild control
-
-templates: debian/templates debian/po/POTFILES.in
-debian/templates: $(shell which yada) debian/packages-tmp
- yada rebuild templates
-debian/po/POTFILES.in: $(shell which yada) debian/packages-tmp
- yada rebuild templates
-
-debian/build-stamp: debian/build-arch-stamp debian/build-indep-stamp
- @[ -f $(shell which yada) -a -f debian/rules ]
- @umask 022 \
- && export pwd="$$(pwd)" \
- && export TMPROOT="$$(pwd)/debian/tmp" \
- && export SOURCE="libclass-singleton-perl" \
- && export VERSION="$(VERSION)" \
- && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
- && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
- && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
- && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
- && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
- && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
- echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
- echo -E 'PERL=$${PERL:-/usr/bin/perl}';\
- echo -E '$$PERL Makefile.PL INSTALLDIRS=vendor';\
- echo -E 'make';\
- echo -E 'make test') | /bin/sh
- touch debian/build-stamp
-
-debian/build-arch-stamp:
- @[ -f $(shell which yada) -a -f debian/rules ]
- touch debian/build-arch-stamp
-
-debian/build-indep-stamp: debian/build-arch-stamp
- @[ -f $(shell which yada) -a -f debian/rules ]
- touch debian/build-indep-stamp
-
-.PHONY: install-tree
-install-tree: install-tree-any
-install-tree-any: \
- debian/tmp-libclass-singleton-perl/DEBIAN/control
-
-debian/tmp-libclass-singleton-perl/DEBIAN/control: debian/build-stamp debian/control
- rm -rf debian/tmp-libclass-singleton-perl
- umask 022 && install -d debian/tmp-libclass-singleton-perl/DEBIAN
- install -d debian/tmp-libclass-singleton-perl/usr/share/doc/libclass-singleton-perl
- umask 022; yada generate copyright libclass-singleton-perl \
- > debian/tmp-libclass-singleton-perl/usr/share/doc/libclass-singleton-perl/copyright
- install -m 644 -p debian/changelog \
- debian/tmp-libclass-singleton-perl/usr/share/doc/libclass-singleton-perl/changelog.Debian
- @umask 022 \
- && export pwd="$$(pwd)" \
- && export ROOT="$$(pwd)/debian/tmp-libclass-singleton-perl" \
- && export TMPROOT="$$(pwd)/debian/tmp" \
- && export CONTROL="$$(pwd)/debian/tmp-libclass-singleton-perl/DEBIAN" \
- && export PACKAGE="libclass-singleton-perl" \
- && export SOURCE="libclass-singleton-perl" \
- && export VERSION="$(VERSION)" \
- && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
- && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
- && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
- && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
- && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
- && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
- echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
- echo -E 'PERL=$${PERL:-/usr/bin/perl}';\
- echo -E 'make install PREFIX=$$ROOT/usr';\
- echo -E 'find $$ROOT/usr/share -type f | xargs chmod -x';\
- echo -E 'yada install -doc README';\
- echo -E 'yada install -doc -as changelog Changes') | /bin/sh
- @umask 022 \
- && export pwd="$$(pwd)" \
- && export ROOT="$$(pwd)/debian/tmp-libclass-singleton-perl" \
- && export TMPROOT="$$(pwd)/debian/tmp" \
- && export CONTROL="$$(pwd)/debian/tmp-libclass-singleton-perl/DEBIAN" \
- && export PACKAGE="libclass-singleton-perl" \
- && export SOURCE="libclass-singleton-perl" \
- && export VERSION="$(VERSION)" && (\
- echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
- echo -E 'yada perl';\
- echo -E 'yada python';\
- echo -E 'yada strip';\
- echo -E 'yada shlibdeps') | /bin/sh
- yada compress libclass-singleton-perl
- yada generate maintscripts libclass-singleton-perl
- find debian/tmp-libclass-singleton-perl -type f -print \
- | sed -n 's/^debian\/tmp-libclass-singleton-perl\(\/etc\/.*\)$$/\1/p' \
- > debian/tmp-libclass-singleton-perl/DEBIAN/conffiles
- test -s debian/tmp-libclass-singleton-perl/DEBIAN/conffiles || rm -f debian/tmp-libclass-singleton-perl/DEBIAN/conffiles
- yada rebuild control
- yada generate substvars libclass-singleton-perl
- umask 022 && dpkg-gencontrol -isp -plibclass-singleton-perl -Pdebian/tmp-libclass-singleton-perl
-
-# Build package files
-
-.PHONY: binary binary-arch binary-indep
-binary: binary-arch binary-indep
-binary-arch: binary-arch-any
-
-.PHONY: binary-arch-any
-binary-arch-any:
-binary-indep: \
- binary-package-libclass-singleton-perl
-
-.PHONY: binary-package-libclass-singleton-perl
-binary-package-libclass-singleton-perl: check-root debian/tmp-libclass-singleton-perl/DEBIAN/control
- @[ -f $(shell which yada) -a -f debian/rules ]
- chown -R 0.0 debian/tmp-libclass-singleton-perl
- chmod -R u=rwX,go=rX debian/tmp-libclass-singleton-perl
- @if [ -d debian/tmp-libclass-singleton-perl/usr/doc/libclass-singleton-perl ]; then \
- echo "*** Yada warning: /usr/doc/libclass-singleton-perl should be /usr/share/doc/libclass-singleton-perl";\
- fi
- dpkg-deb --build debian/tmp-libclass-singleton-perl ..
-
-.PHONY: check-root
-check-root:
- @[ `id -u` = 0 ] || (echo "You must be root to do this!"; false)
-
-debian/packages-tmp: debian/packages
- yada rebuild packages
-
-## Clean up afterwards
-
-.PHONY: clean clean-install-tree clean-build
-
-clean: clean-install-tree clean-build debian/control debian/rules
- rm -f debian/packages-tmp debian/packages-tmp-new debian/packages-tmp-include
-
-clean-build:
- @[ -f $(shell which yada) -a -f debian/rules ]
- rm -f debian/build-stamp debian/build-arch-stamp debian/build-indep-stamp
- @umask 022 \
- && export pwd="$$(pwd)" \
- && export TMPROOT="$$(pwd)/debian/tmp" \
- && export SOURCE="libclass-singleton-perl" \
- && export VERSION="$(VERSION)" \
- && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
- && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
- && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
- && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
- && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
- && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
- echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
- echo -E 'test -f Makefile && touch Makefile && make distclean || true') | /bin/sh
- yada unpatch
- rm -rf debian/tmp
-
-clean-install-tree: debian/rules
- @[ -f $(shell which yada) -a -f debian/rules ]
- rm -f debian/install-tree-stamp
- rm -rf debian/tmp-* debian/files* debian/substvars debian/shlibs.local debian/ucf
+.PHONY: binary binary-arch binary-indep install clean build
Modified: trunk/libclass-singleton-perl/debian/watch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-singleton-perl/debian/watch?rev=25384&op=diff
==============================================================================
--- trunk/libclass-singleton-perl/debian/watch (original)
+++ trunk/libclass-singleton-perl/debian/watch Fri Sep 19 16:50:45 2008
@@ -1,5 +1,3 @@
-# format version number, currently 2; this line is compulsory!
-version=2
+version=3
+http://search.cpan.org/dist/Class-Singleton/ .*/Class-Singleton-v?(\d[\d_.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$
-# Automatically generated by cvsdebuscan at Tue, 19 Jul 2005 13:31:10 +0200
-http://www.cpan.org/modules/by-module/Class/Class-Singleton-([0-9.]*)\.tar.gz
More information about the Pkg-perl-cvs-commits
mailing list