r10177 - in /trunk/libgeo-metar-perl: METAR.pm debian/ debian/README.Debian debian/changelog debian/compat debian/control debian/copyright debian/docs debian/libgeo-metar-perl.examples debian/rules debian/watch t/metar.t
vdanjean at users.alioth.debian.org
vdanjean at users.alioth.debian.org
Sat Dec 1 11:57:34 UTC 2007
Author: vdanjean
Date: Sat Dec 1 11:57:34 2007
New Revision: 10177
URL: http://svn.debian.org/wsvn/?sc=1&rev=10177
Log:
[svn-inject] Applying Debian modifications to trunk
Added:
trunk/libgeo-metar-perl/debian/
trunk/libgeo-metar-perl/debian/README.Debian
trunk/libgeo-metar-perl/debian/changelog
trunk/libgeo-metar-perl/debian/compat
trunk/libgeo-metar-perl/debian/control
trunk/libgeo-metar-perl/debian/copyright
trunk/libgeo-metar-perl/debian/docs
trunk/libgeo-metar-perl/debian/libgeo-metar-perl.examples
trunk/libgeo-metar-perl/debian/rules (with props)
trunk/libgeo-metar-perl/debian/watch
Modified:
trunk/libgeo-metar-perl/METAR.pm
trunk/libgeo-metar-perl/t/metar.t
Modified: trunk/libgeo-metar-perl/METAR.pm
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/METAR.pm?rev=10177&op=diff
==============================================================================
--- trunk/libgeo-metar-perl/METAR.pm (original)
+++ trunk/libgeo-metar-perl/METAR.pm Sat Dec 1 11:57:34 2007
@@ -95,9 +95,13 @@
# PRESSURE
#
-# The pressure, or altimeter setting, at the reporting site recorded in
-# inches of mercury (Hg) minus the decimal point. It should always look
-# like (A\d\d\d\d).
+# The pressure, or altimeter setting, at the reporting site recorded in inches
+# of mercury (Hg) minus the decimal point. It should always look like
+# (A\d\d\d\d).
+#
+# Note: The WMO standard is to report the altimeter in whole hectopascals. In
+# this case, the altimeter setting group will be begin with a Q instead of an
+# A.
# REMARKS
#
@@ -199,6 +203,8 @@
$self->{WIND_GUST_KTS} = undef; # wind gusts (knots)
$self->{WIND_MPH} = undef; # wind speed (MPH)
$self->{WIND_GUST_MPH} = undef; # wind gusts (MPH)
+ $self->{WIND_VAR_DEG} = undef; # wind variation in degrees
+ $self->{WIND_VAR_ENG} = undef; # wind variation in english
$self->{VISIBILITY} = undef; # visibility info
$self->{RUNWAY} = undef; # runyway vis.
$self->{WEATHER} = [ ]; # current weather
@@ -213,7 +219,8 @@
$self->{HOURLY_DEW_F} = undef; # hourly dew point, celcius
$self->{HOURLY_DEW_C} = undef; # hourly dew point, farenheit
$self->{HOURLY_PRECIP} = undef; # hourly precipitation
- $self->{ALT} = undef; # altimeter setting [pressure]
+ $self->{ALT} = undef; # altimeter setting (Hg)
+ $self->{ALT_HP} = undef; # altimeter setting (hPa)
$self->{SLP} = undef; # sea level pressure
$self->{REMARKS} = undef; # remarks and such
@@ -222,15 +229,16 @@
# default=METAR
$self->{site} = undef; # the site code (4 chars)
$self->{date_time} = undef; # date/time
- $self->{modifier} = "AUTO"; # the AUTO/COR modifier (if
- # any) default=AUTO
+ $self->{modifier} = undef; # the AUTO/COR modifier
$self->{wind} = undef; # the wind information
+ $self->{vrbwind} = undef; # variable wind information
$self->{visibility} = undef; # visibility information
$self->{runway} = undef; # runway visibility
$self->{weather} = [ ]; # current weather conditions
$self->{sky} = [ ]; # sky conditions (cloud cover)
$self->{temp_dew} = undef; # temp and dew pt.
- $self->{alt} = undef; # altimeter setting
+ $self->{alt} = undef; # altimeter setting (Hg)
+ $self->{alt_hp} = undef; # altimeter setting (hPa)
$self->{slp} = undef; # sea level pressure
$self->{remarks} = [ ]; # remarks
@@ -394,7 +402,7 @@
## is is a site ID?
##
- elsif ($tok =~ /K[A-Z]{3,3}/)
+ elsif ($tok =~ /^[A-Z]{4,4}$/ && !$self->{site})
{
$self->{site} = $tok;
print "[$tok] is a site ID.\n" if $self->{debug};
@@ -437,6 +445,17 @@
}
##
+ ## is it variable wind information?
+ ##
+
+ elsif ($tok =~ /^\d\d\dV\d\d\d$/i)
+ {
+ $self->{vrbwind} = $tok;
+ print "[$tok] is variable wind information.\n" if $self->{debug};
+ next;
+ }
+
+ ##
## is it visibility information?
##
@@ -446,6 +465,17 @@
print "[$tok] is visibility information.\n" if $self->{debug};
next;
}
+
+ ##
+ ## does it say CAVOK? (ceiling and visibility ok)
+ ##
+
+ elsif ($tok =~ /^CAVOK/i)
+ {
+ $self->{visibility} = $tok;
+ print "[$tok] is visibility information, too.\n" if $self->{debug};
+ next;
+ }
##
## is it visibility information with a leading digit?
@@ -585,7 +615,7 @@
}
##
- ## is it an altimeter setting?
+ ## is it an altimeter setting? (inches in mercury)
##
elsif (!$in_remarks && $tok =~ /^A(\d\d)(\d\d)$/i)
@@ -595,6 +625,18 @@
print "[$tok] is an altimeter setting.\n" if $self->{debug};
next;
}
+
+ ##
+ ## is it an altimeter setting? (hectopascals)
+
+ elsif (!$in_remarks && $tok =~ /^Q(\d\d\d\d)$/i)
+ {
+ $self->{alt_hp} = $tok;
+ $self->{ALT_HP} = $1;
+ print "[$tok] is an altimeter setting in hectopascals.\n"
+ if $self->{debug};
+ next;
+ }
##
## automatic station type?
@@ -833,18 +875,95 @@
}
##
+ ## Variable wind information
+ ##
+
+ {
+ if ($self->{vrbwind}) {
+ my $vrbwind = $self->{vrbwind};
+ my $vrbwind_deg_1 = substr($vrbwind,0,3);
+ my $vrbwind_deg_2 = substr($vrbwind,4,3);
+ my $vrbwind_eng_1 = "";
+ my $vrbwind_eng_2 = "";
+
+ if ($vrbwind_deg_1 < 15) { $vrbwind_eng_1 = "North"; }
+ elsif ($vrbwind_deg_1 < 30) { $vrbwind_eng_1 = "North/Northeast"; }
+ elsif ($vrbwind_deg_1 < 60) { $vrbwind_eng_1 = "Northeast"; }
+ elsif ($vrbwind_deg_1 < 75) { $vrbwind_eng_1 = "East/Northeast"; }
+ elsif ($vrbwind_deg_1 < 105) { $vrbwind_eng_1 = "East"; }
+ elsif ($vrbwind_deg_1 < 120) { $vrbwind_eng_1 = "East/Southeast"; }
+ elsif ($vrbwind_deg_1 < 150) { $vrbwind_eng_1 = "Southeast"; }
+ elsif ($vrbwind_deg_1 < 165) { $vrbwind_eng_1 = "South/Southeast"; }
+ elsif ($vrbwind_deg_1 < 195) { $vrbwind_eng_1 = "South"; }
+ elsif ($vrbwind_deg_1 < 210) { $vrbwind_eng_1 = "South/Southwest"; }
+ elsif ($vrbwind_deg_1 < 240) { $vrbwind_eng_1 = "Southwest"; }
+ elsif ($vrbwind_deg_1 < 265) { $vrbwind_eng_1 = "West/Southwest"; }
+ elsif ($vrbwind_deg_1 < 285) { $vrbwind_eng_1 = "West"; }
+ elsif ($vrbwind_deg_1 < 300) { $vrbwind_eng_1 = "West/Northwest"; }
+ elsif ($vrbwind_deg_1 < 330) { $vrbwind_eng_1 = "Northwest"; }
+ elsif ($vrbwind_deg_1 < 345) { $vrbwind_eng_1 = "North/Northwest"; }
+ else { $vrbwind_eng_1 = "North"; }
+
+ if ($vrbwind_deg_2 < 15) { $vrbwind_eng_2 = "North"; }
+ elsif ($vrbwind_deg_2 < 30) { $vrbwind_eng_2 = "North/Northeast"; }
+ elsif ($vrbwind_deg_2 < 60) { $vrbwind_eng_2 = "Northeast"; }
+ elsif ($vrbwind_deg_2 < 75) { $vrbwind_eng_2 = "East/Northeast"; }
+ elsif ($vrbwind_deg_2 < 105) { $vrbwind_eng_2 = "East"; }
+ elsif ($vrbwind_deg_2 < 120) { $vrbwind_eng_2 = "East/Southeast"; }
+ elsif ($vrbwind_deg_2 < 150) { $vrbwind_eng_2 = "Southeast"; }
+ elsif ($vrbwind_deg_2 < 165) { $vrbwind_eng_2 = "South/Southeast"; }
+ elsif ($vrbwind_deg_2 < 195) { $vrbwind_eng_2 = "South"; }
+ elsif ($vrbwind_deg_2 < 210) { $vrbwind_eng_2 = "South/Southwest"; }
+ elsif ($vrbwind_deg_2 < 240) { $vrbwind_eng_2 = "Southwest"; }
+ elsif ($vrbwind_deg_2 < 265) { $vrbwind_eng_2 = "West/Southwest"; }
+ elsif ($vrbwind_deg_2 < 285) { $vrbwind_eng_2 = "West"; }
+ elsif ($vrbwind_deg_2 < 300) { $vrbwind_eng_2 = "West/Northwest"; }
+ elsif ($vrbwind_deg_2 < 330) { $vrbwind_eng_2 = "Northwest"; }
+ elsif ($vrbwind_deg_2 < 345) { $vrbwind_eng_2 = "North/Northwest"; }
+ else { $vrbwind_eng_2 = "North"; }
+
+ push @{$self->{WIND_VAR_DEG}}, $vrbwind_deg_1;
+ push @{$self->{WIND_VAR_DEG}}, $vrbwind_deg_2;
+ push @{$self->{WIND_VAR_ENG}}, $vrbwind_eng_1;
+ push @{$self->{WIND_VAR_ENG}}, $vrbwind_eng_2;
+ }
+ }
+
+ ##
## Visibility.
##
{
- my $vis = $self->{visibility};
- $vis =~ s/SM$//oi; # nuke the "SM"
- if ($vis =~ /M(\d\/\d)/o) {
- $self->{VISIBILITY} = "Less than $1 statute miles";
- } else {
- $self->{VISIBILITY} = $vis . " Statute Miles";
- } # end if
+ if ($self->{visibility}) {
+ my $vis = $self->{visibility};
+ $vis =~ s/SM$//oi; # nuke the "SM"
+ if ($vis =~ /^CAVOK$/i) {
+ $self->{VISIBILITY} = "Ceiling and visibility OK";
+ }
+ elsif ($vis =~ /M(\d\/\d)/o) {
+ $self->{VISIBILITY} = "Less than $1 statute miles";
+ } else {
+ $self->{VISIBILITY} = $vis . " Statute Miles";
+ } # end if
+ }
}
+
+ ##
+ ## Convert ALT to ALT_HP or vice versa
+ ##
+
+ {
+ if ($self->{ALT} && !$self->{ALT_HP}) {
+ my $alt = $self->{ALT};
+ $alt = $alt * 1.33; # mmHg to hPa
+ $self->{ALT_HP} = $alt;
+ }
+ elsif (!$self->{ALT} && $self->{ALT_HP}) {
+ my $alt = $self->{ALT_HP};
+ $alt = $alt * 0.75; # hPa to mmHg
+ $self->{ALT} = $alt;
+ }
+ }
##
## Calculate F temps for all C temps
@@ -910,12 +1029,14 @@
print "date_time: $self->{date_time}\n";
print "modifier: $self->{modifier}\n";
print "wind: $self->{wind}\n";
+ print "variable wind: $self->{vrbwind}\n";
print "visibility: $self->{visibility}\n";
print "runway: $self->{runway}\n";
print "weather: " . join(', ', @{$self->{weather}}) . "\n";
print "sky: " . join(', ', @{$self->{sky}}) . "\n";
print "temp_dew: $self->{temp_dew}\n";
print "alt: $self->{alt}\n";
+ print "alt_hp: $self->{alt_hp}\n";
print "slp: $self->{slp}\n";
print "remarks: " . join (', ', @{$self->{remarks}}) . "\n";
print "\n";
@@ -968,10 +1089,12 @@
Here is how you I<might> use the Geo::METAR module.
One use that I have had for this module is to query the NWS METAR page
-(using the LWP modules) at
-http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=KFDY to get an
-up-to-date METAR. Then, I scan thru the output, looking for what looks
-like a METAR string (that's not hard in Perl). Oh, KFDY can be any site
+(using the LWP modules) at:
+
+I<http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=KFDY>
+
+to get an up-to-date METAR. Then, I scan thru the output, looking for what
+looks like a METAR string (that's not hard in Perl). Oh, KFDY can be any site
location code where there is a reporting station.
I then pass the METAR into this module and get the info I want. I can
@@ -1086,12 +1209,20 @@
=item WIND_DIR_ENG
-The current wind direction in english (Southwest, East, North, etc.)
+The current wind direction in English (Southwest, East, North, etc.)
=item WIND_DIR_DEG
The current wind direction in degrees.
+=item WIND_VAR_ENG
+
+Variable wind direction in English.
+
+=item WIND_VAR_DEG
+
+Variable wind direction in degrees.
+
=item WIND_KTS
The current wind speed in Knots.
@@ -1147,6 +1278,10 @@
=item ALT
Altimeter setting (barometric pressure).
+
+=item ALT_HP
+
+Altimeter setting in hectopascals.
=item REMARKS
Added: trunk/libgeo-metar-perl/debian/README.Debian
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/debian/README.Debian?rev=10177&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/README.Debian (added)
+++ trunk/libgeo-metar-perl/debian/README.Debian Sat Dec 1 11:57:34 2007
@@ -1,0 +1,24 @@
+This package differs slightly from the Geo::METAR distribution available at
+CPAN. We've applied several patches to make it easier to use, develop, and
+test.
+
+We are accepting more fixes for the module, and you are free to use these
+fixes under the same terms as the module itself. Please submit them to the
+Debian BTS:
+ http://bugs.debian.org/libgeo-metar-perl
+
+Contributors:
+ Timo Hietanen <thietanen at iki.fi> (#262397)
+ - also grabs the altimeter setting if it's reported in hectopascals (Q\d\d\d\d instead of A\d\d\d\d)
+ - dont's set $self->{MOD} to "AUTO" by default
+ - tries a bit harder not to mix up weather groups with station identifiers
+ - recognizes the visibility setting "CAVOK" (ceiling and visibility OK)
+ - Doesn't recognize the METAR tag dddVddd (d = digit), which defines wind direction's variation.
+ - Assumes that station ID begins with the letter 'K' (matches /K[A-Z]{3,3}/), while it should match /[A-Z]{4,4}/
+ - Tries to find the visibility information even though $self->{visibility} isn't defined (information
+ missing from the METAR report). This leads to a couple of warnings about uninitalized variables.
+
+
+ --Jay Bonci
+ <jaybonci at debian.org>
+
Added: trunk/libgeo-metar-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/debian/changelog?rev=10177&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/changelog (added)
+++ trunk/libgeo-metar-perl/debian/changelog Sat Dec 1 11:57:34 2007
@@ -1,0 +1,73 @@
+libgeo-metar-perl (1.14-5) unstable; urgency=low
+
+ * Change to POD formatting so URL doesn't break oddly (Closes: #272910)
+ * Make examples executable (Closes: #273082)
+
+ -- Jay Bonci <jaybonci at debian.org> Wed, 27 Oct 2004 14:39:56 -0400
+
+libgeo-metar-perl (1.14-4) unstable; urgency=low
+
+ * Adds debian/watch so uscan will actually work
+
+ -- Jay Bonci <jaybonci at debian.org> Sun, 12 Sep 2004 03:11:04 -0400
+
+libgeo-metar-perl (1.14-3) unstable; urgency=low
+
+ * Applied final version of Timo Hietanen's patch (Closes: #262397)
+ - also grabs the altimeter setting if it's reported in hectopascals (Q\d\d\d\d instead of A\d\d\d\d)
+ - dont's set $self->{MOD} to "AUTO" by default
+ - tries a bit harder not to mix up weather groups with station identifiers
+ - recognizes the visibility setting "CAVOK" (ceiling and visibility OK)
+ * Time Hietanen also submitted a fix to clean up code warnings (Closes: #181407)
+ - Doesn't recognize the METAR tag dddVddd (d = digit), which defines wind direction's variation.
+ - Assumes that station ID begins with the letter 'K' (matches /K[A-Z]{3,3}/), while it should match /[A-Z]{4,4}/
+ - Tries to find the visibility information even though $self->{visibility} isn't defined (information missing from the METAR report). This leads to a couple of warnings about uninitalized variables.
+ * Updated test suite to use Test::More instead of Test
+
+ -- Jay Bonci <jaybonci at debian.org> Wed, 11 Aug 2004 01:34:18 -0400
+
+libgeo-metar-perl (1.14-2) unstable; urgency=low
+
+ * Updated maintainer address
+ * Added compat file per debhelper best practices
+ * Updated rules file to my standard build template
+ * Updated url in copyright file
+ * Updated to policy version 3.6.1.0 (No changes, ver. bump only)
+
+ -- Jay Bonci <jaybonci at debian.org> Fri, 10 Oct 2003 16:56:27 -0400
+
+libgeo-metar-perl (1.14-1) unstable; urgency=low
+
+ * New Maintainer
+ * New rules file
+ * New upstream version
+ * Updated dependancies to be more in line with policy
+ * Fixed numerous lintian errors with paths and policy versions
+ * Un-orphans package. Closes #190193
+ * Changed section to perl, now that there is one
+
+ -- Jay Bonci <jay at bonci.com> Mon, 28 Apr 2003 15:43:14 -0400
+
+libgeo-metar-perl (1.13-2) unstable; urgency=low
+
+ * Fixed a bug with perl 5.6. (Closes: #77299)
+
+ -- Remi Lefebvre <remi at debian.org> Fri, 17 Nov 2000 22:08:17 -0500
+
+libgeo-metar-perl (1.13-1) unstable; urgency=low
+
+ * Conform to new policy.
+ * Fixed a few typos.
+ * New upstream version.
+
+ -- Remi Lefebvre <remi at debian.org> Fri, 16 Jun 2000 21:46:14 -0400
+
+libgeo-metar-perl (1.12-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Remi Lefebvre <remi at debian.org> Sun, 14 Nov 1999 15:11:57 -0500
+
+Local variables:
+mode: debian-changelog
+End:
Added: trunk/libgeo-metar-perl/debian/compat
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/debian/compat?rev=10177&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/compat (added)
+++ trunk/libgeo-metar-perl/debian/compat Sat Dec 1 11:57:34 2007
@@ -1,0 +1,1 @@
+4
Added: trunk/libgeo-metar-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/debian/control?rev=10177&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/control (added)
+++ trunk/libgeo-metar-perl/debian/control Sat Dec 1 11:57:34 2007
@@ -1,0 +1,18 @@
+Source: libgeo-metar-perl
+Section: perl
+Priority: optional
+Maintainer: Jay Bonci <jaybonci at debian.org>
+Build-Depends-Indep: debhelper (>= 4.1.40), perl (>= 5.6.0-16)
+Standards-Version: 3.6.1.0
+
+Package: libgeo-metar-perl
+Architecture: all
+Depends: ${perl:Depends}
+Description: Geo::METAR, Accessing Aviation Weather Information with Perl
+ libgeo-metar-perl (Geo::METAR) is a set of Perl modules which allow
+ accessing of aviation weather information with Perl.
+ The Geo::METAR home page is located at:
+ http://www.wcnet.org/~jzawodn/perl/Geo-METAR/
+ This is a perl module to allow accessing weather info.
+ Note: This version differs slightly from the version in CPAN. See the file
+ README.Debian for specific changes
Added: trunk/libgeo-metar-perl/debian/copyright
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/debian/copyright?rev=10177&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/copyright (added)
+++ trunk/libgeo-metar-perl/debian/copyright Sat Dec 1 11:57:34 2007
@@ -1,0 +1,18 @@
+This package was debianized by Remi Lefebvre <remi at debian.org> on
+Sun, 14 Nov 1999 15:11:57 -0500.
+
+It was updated by Jay Bonci <jay at bonci.com> on 4/28/2003
+
+The main website is at: http://www.wcnet.org/~jzawodn/perl/Geo-METAR/
+also:
+http://search.cpan.org/dist/Geo-METAR
+
+Upstream Author: Jeremy D. Zawodny <jzawodn at wcnet.org>
+
+Copyright:
+
+You are free to distribute this software under the terms of
+the GNU General Public License.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in /usr/share/common-licenses/GPL file.
Added: trunk/libgeo-metar-perl/debian/docs
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/debian/docs?rev=10177&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/docs (added)
+++ trunk/libgeo-metar-perl/debian/docs Sat Dec 1 11:57:34 2007
@@ -1,0 +1,4 @@
+debian/README.Debian
+README
+TODO
+HACKING
Added: trunk/libgeo-metar-perl/debian/libgeo-metar-perl.examples
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/debian/libgeo-metar-perl.examples?rev=10177&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/libgeo-metar-perl.examples (added)
+++ trunk/libgeo-metar-perl/debian/libgeo-metar-perl.examples Sat Dec 1 11:57:34 2007
@@ -1,0 +1,2 @@
+examples/fetch_temp.pl
+examples/simple_dump.pl
Added: trunk/libgeo-metar-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/debian/rules?rev=10177&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/rules (added)
+++ trunk/libgeo-metar-perl/debian/rules Sat Dec 1 11:57:34 2007
@@ -1,0 +1,55 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+# export DH_COMPAT=4
+
+PACKAGE=`pwd | sed -e "s/.*\/\\(.*\\)-.*/\\1/"`
+
+
+build:
+ dh_testdir
+ # Add here commands to compile the package.
+ perl Makefile.PL verbose INSTALLDIRS=vendor
+clean:
+ dh_testdir
+ dh_testroot
+
+ -$(MAKE) clean
+ rm -f Makefile.old
+ dh_clean
+
+install:
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ $(MAKE) PREFIX=$(CURDIR)/debian/$(PACKAGE)/usr OPTIMIZE="-O2 -g -Wall" test install
+ -find $(CURDIR)/debian -type d | xargs rmdir -p --ignore-fail-on-non-empty
+ -find $(CURDIR)/examples/ -exec chmod 755 {} \;
+
+binary-arch:;
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installdocs
+ dh_installman
+ dh_installchangelogs
+ dh_installexamples
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_perl
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
Propchange: trunk/libgeo-metar-perl/debian/rules
------------------------------------------------------------------------------
svn:executable = *
Added: trunk/libgeo-metar-perl/debian/watch
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/debian/watch?rev=10177&op=file
==============================================================================
--- trunk/libgeo-metar-perl/debian/watch (added)
+++ trunk/libgeo-metar-perl/debian/watch Sat Dec 1 11:57:34 2007
@@ -1,0 +1,2 @@
+version=2
+http://www.cpan.org/modules/by-module/Geo/Geo-METAR-([0-9].*)\.tar.gz
Modified: trunk/libgeo-metar-perl/t/metar.t
URL: http://svn.debian.org/wsvn/trunk/libgeo-metar-perl/t/metar.t?rev=10177&op=diff
==============================================================================
--- trunk/libgeo-metar-perl/t/metar.t (original)
+++ trunk/libgeo-metar-perl/t/metar.t Sat Dec 1 11:57:34 2007
@@ -5,59 +5,19 @@
# Test script for METAR installation.
use strict;
-use Test;
+use Test::More tests => 7;
-BEGIN { plan tests => 6 }
+my $modname = "Geo::METAR";
+my $m;
-use Geo::METAR;
+use_ok($modname);
+ok($m = $modname->new());
+ok(ref $m eq $modname);
-my %tally = (passed => 0, failed => 0, skipped => 0);
-
-print "Testing METAR.\n";
-
-my $m = new Geo::METAR;
-
-# Create a new instance.
-
-if (ref $m eq 'Geo::METAR') {
- ok(1);
-} else {
- ok(0);
-}
-
-##
-## Try out one hard-coded example. We need many more of these.
-##
-
-if ($m->metar("KFDY 251450Z 21012G21KT 8SM OVC065 04/M01 A3010 RMK 57014")) {
- ok(1);
-} else {
- ok(0);
-}
-
-if ($m->SITE eq "KFDY") {
- ok(1);
-} else {
- ok(0);
-}
-
-if ($m->DATE eq "25") {
- ok(1);
-} else {
- ok(0);
-}
-
-if ($m->MOD eq "AUTO") {
- ok(1);
-} else {
- ok(0);
-}
-
-if ($m->TEMP_F eq "39.2") {
- ok(1);
-} else {
- ok(0);
-}
+ok($m->metar("KFDY 251450Z 21012G21KT 8SM OVC065 04/M01 A3010 RMK 57014"));
+ok($m->SITE eq "KFDY");
+ok($m->DATE eq "25");
+ok($m->TEMP_F eq "39.2");
exit;
More information about the Pkg-perl-cvs-commits
mailing list