r8868 - in /trunk/libdatetime-astro-sunrise-perl: Sunrise.pm debian/ debian/changelog debian/compat debian/control debian/copyright debian/rules debian/watch

joeyh at users.alioth.debian.org joeyh at users.alioth.debian.org
Sun Nov 4 23:46:58 UTC 2007


Author: joeyh
Date: Sun Nov  4 23:46:58 2007
New Revision: 8868

URL: http://svn.debian.org/wsvn/?sc=1&rev=8868
Log:
* Initial upload to Debian.
  (Note: There are several similar modules in CPAN. I chose to package
   this one because it returns a simple DateTime object. Astro::Sunrise
   returns a hard to manipulate time string, and the newer
   DateTime::Event::Sunrise returns a DateTime::Set that is not compatible
   with the current 0.25 release of DateTime::Set.)
* Upstream version number munge 0.01_01 -> 0.01.01.
* Fixed missing whitespace in pod doc that caused the man page to be
  broken in several ways.
* Fix it not to pass hour values out of range to DateTime->new. It seemed
  to rely on DateTime normalising them to the 0-23 range, but DateTime now
  crashes instead. Take the hour value mod 24 to avoid this, and the test
  suite passes now.
* Fix redefinition warnings under use strict that were caused by POSIX
  and Math::Trig defining some of the same functions.

Added:
    trunk/libdatetime-astro-sunrise-perl/debian/
    trunk/libdatetime-astro-sunrise-perl/debian/changelog
    trunk/libdatetime-astro-sunrise-perl/debian/compat
    trunk/libdatetime-astro-sunrise-perl/debian/control
    trunk/libdatetime-astro-sunrise-perl/debian/copyright
    trunk/libdatetime-astro-sunrise-perl/debian/rules   (with props)
    trunk/libdatetime-astro-sunrise-perl/debian/watch
Modified:
    trunk/libdatetime-astro-sunrise-perl/Sunrise.pm

Modified: trunk/libdatetime-astro-sunrise-perl/Sunrise.pm
URL: http://svn.debian.org/wsvn/trunk/libdatetime-astro-sunrise-perl/Sunrise.pm?rev=8868&op=diff
==============================================================================
--- trunk/libdatetime-astro-sunrise-perl/Sunrise.pm (original)
+++ trunk/libdatetime-astro-sunrise-perl/Sunrise.pm Sun Nov  4 23:46:58 2007
@@ -2,7 +2,7 @@
 
 use strict;
 require Exporter;
-use POSIX;
+use POSIX qw(floor);
 use Math::Trig;
 use Carp;
 use DateTime;
@@ -101,11 +101,12 @@
         }
 
         my ( $hour_rise, $min_rise, $hour_set, $min_set ) = convert_hour($tmp_rise_3,$tmp_set_3);
+	print STDERR "me\n";
         my $rise_time = DateTime->new(
           year      => $dt->year,
           month     => $dt->month,
           day       => $dt->day,
-          hour      => $hour_rise,
+          hour      => $hour_rise % 24,
           minute    => $min_rise,
           time_zone => 'UTC'
         );
@@ -113,7 +114,7 @@
           year      => $dt->year,
           month     => $dt->month,
           day       => $dt->day,
-          hour      => $hour_set,
+          hour      => $hour_set % 24,
           minute    => $min_set,
           time_zone => 'UTC'
         );
@@ -132,7 +133,7 @@
           year      => $dt->year,
           month     => $dt->month,
           day       => $dt->day,
-          hour      => $hour_rise,
+          hour      => $hour_rise % 24,
           minute    => $min_rise,
           time_zone => 'UTC'
         );
@@ -140,7 +141,7 @@
           year      => $dt->year,
           month     => $dt->month,
           day       => $dt->day,
-          hour      => $hour_set,
+          hour      => $hour_set % 24,
           minute    => $min_set,
           time_zone => 'UTC'
         );
@@ -477,11 +478,13 @@
 
     return ( $hour_rise, $min_rise, $hour_set, $min_set );
 }
+
 =head1 NAME
 
 DateTime::Astro::Sunrise - Perl DateTime extension for computing the sunrise/sunset on a given day
 
 =head1 SYNOPSIS
+
  use DateTime;
  use DateTime::Astro::Sunrise;
  
@@ -506,6 +509,7 @@
 =item B<my $sunrise = DateTime::Astro::Sunrise ->new(longitutide,latatude,ALT,Iteration);>
 
 =over
+
  Eastern longitude is entered as a positive number
  Western longitude is entered as a negative number
  Northern latitude is entered as a positive number

Added: trunk/libdatetime-astro-sunrise-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libdatetime-astro-sunrise-perl/debian/changelog?rev=8868&op=file
==============================================================================
--- trunk/libdatetime-astro-sunrise-perl/debian/changelog (added)
+++ trunk/libdatetime-astro-sunrise-perl/debian/changelog Sun Nov  4 23:46:58 2007
@@ -1,0 +1,19 @@
+libdatetime-astro-sunrise-perl (0.01.01-1) unstable; urgency=low
+
+  * Initial upload to Debian.
+    (Note: There are several similar modules in CPAN. I chose to package
+     this one because it returns a simple DateTime object. Astro::Sunrise
+     returns a hard to manipulate time string, and the newer
+     DateTime::Event::Sunrise returns a DateTime::Set that is not compatible
+     with the current 0.25 release of DateTime::Set.)
+  * Upstream version number munge 0.01_01 -> 0.01.01.
+  * Fixed missing whitespace in pod doc that caused the man page to be
+    broken in several ways.
+  * Fix it not to pass hour values out of range to DateTime->new. It seemed
+    to rely on DateTime normalising them to the 0-23 range, but DateTime now
+    crashes instead. Take the hour value mod 24 to avoid this, and the test
+    suite passes now.
+  * Fix redefinition warnings under use strict that were caused by POSIX
+    and Math::Trig defining some of the same functions.
+
+ -- Joey Hess <joeyh at debian.org>  Sun, 04 Nov 2007 17:33:33 -0500

Added: trunk/libdatetime-astro-sunrise-perl/debian/compat
URL: http://svn.debian.org/wsvn/trunk/libdatetime-astro-sunrise-perl/debian/compat?rev=8868&op=file
==============================================================================
--- trunk/libdatetime-astro-sunrise-perl/debian/compat (added)
+++ trunk/libdatetime-astro-sunrise-perl/debian/compat Sun Nov  4 23:46:58 2007
@@ -1,0 +1,1 @@
+5

Added: trunk/libdatetime-astro-sunrise-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/libdatetime-astro-sunrise-perl/debian/control?rev=8868&op=file
==============================================================================
--- trunk/libdatetime-astro-sunrise-perl/debian/control (added)
+++ trunk/libdatetime-astro-sunrise-perl/debian/control Sun Nov  4 23:46:58 2007
@@ -1,0 +1,18 @@
+Source: libdatetime-astro-sunrise-perl
+Section: perl
+Priority: optional
+Build-Depends: debhelper (>= 5)
+Build-Depends-Indep: perl (>= 5.8.0-7), libdatetime-perl
+Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
+Uploaders: Joey Hess <joeyh at debian.org>
+Standards-Version: 3.7.2
+Homepage: http://search.cpan.org/dist/DateTime-Astro-Sunrise/
+Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libdatetime-astro-sunrise-perl/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetime-astro-sunrise-perl/
+
+Package: libdatetime-astro-sunrise-perl
+Architecture: all
+Depends: ${perl:Depends}, ${misc:Depends}, libdatetime-perl
+Description: compute the time of sunrise and sunset
+ This perl module returns DateTime objects for sunrise and sunset for a
+ given day.

Added: trunk/libdatetime-astro-sunrise-perl/debian/copyright
URL: http://svn.debian.org/wsvn/trunk/libdatetime-astro-sunrise-perl/debian/copyright?rev=8868&op=file
==============================================================================
--- trunk/libdatetime-astro-sunrise-perl/debian/copyright (added)
+++ trunk/libdatetime-astro-sunrise-perl/debian/copyright Sun Nov  4 23:46:58 2007
@@ -1,0 +1,22 @@
+Files: *
+Copyright: (c) Paul Schlyter, 1989, 1992
+License: other
+ Released to the public domain by Paul Schlyter, December 1992
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.

Added: trunk/libdatetime-astro-sunrise-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libdatetime-astro-sunrise-perl/debian/rules?rev=8868&op=file
==============================================================================
--- trunk/libdatetime-astro-sunrise-perl/debian/rules (added)
+++ trunk/libdatetime-astro-sunrise-perl/debian/rules Sun Nov  4 23:46:58 2007
@@ -1,0 +1,39 @@
+#!/usr/bin/make -f
+
+build:
+	dh_testdir
+
+	perl Makefile.PL INSTALLDIRS=vendor
+	$(MAKE) test
+
+clean:
+	dh_testdir
+	dh_testroot
+	if [ -e Makefile ]; then $(MAKE) distclean; fi
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+
+	$(MAKE) install DESTDIR=debian/libdatetime-astro-sunrise-perl PREFIX=/usr
+
+binary-arch:
+
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs README
+	dh_installchangelogs Changes
+	dh_perl
+	dh_link
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary

Propchange: trunk/libdatetime-astro-sunrise-perl/debian/rules
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/libdatetime-astro-sunrise-perl/debian/watch
URL: http://svn.debian.org/wsvn/trunk/libdatetime-astro-sunrise-perl/debian/watch?rev=8868&op=file
==============================================================================
--- trunk/libdatetime-astro-sunrise-perl/debian/watch (added)
+++ trunk/libdatetime-astro-sunrise-perl/debian/watch Sun Nov  4 23:46:58 2007
@@ -1,0 +1,3 @@
+version=3
+opts="uversionmangle=s/_/./" \
+http://www.perl.com/CPAN/authors/id/R/RK/RKHILL/DateTime-Astro-Sunrise-([\d_\.]+)\.tar\.gz




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