debian/0000755000000000000000000000000011741307763007177 5ustar debian/patches/0000755000000000000000000000000011716713765010633 5ustar debian/patches/20-weather.pl.patch0000755000000000000000000001000311716712770014134 0ustar From: Jari Aalto Subject: Fix Perl warnings, array subscript, test directory diff --git a/Src/weather.pl b/Src/weather.pl index 27a4f88..247e02c 100755 --- a/Src/weather.pl +++ b/Src/weather.pl @@ -2,18 +2,15 @@ #Thibaut Colar: http://www.colar.net/ #2002/05 -#The Weather data can be retrieved through http of ftp. -#Http is faster, however this might get broken if NOAA change their webpage layout +#The Weather data can be retrived through http of ftp. +#Http is faster, however this might get broken if NOAA change theyr webpage layout #in wich case you should choose ftp. $mode="http"; # html || ftp - ######################################## # Start: ######################################## -($station,$tmpfolder)=@ARGV; - -mkdir($tmpfolder); +($station,$tmpfolder, $debug)=@ARGV; $html="http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=${station}"; $ftp="ftp://weather.noaa.gov/data/observations/metar/stations/${station}.TXT"; @@ -28,7 +25,7 @@ if($mode eq "ftp") $line=""; $file="${tmpfolder}/${station}_dat"; open(DATA,"<$file"); -$allGood=0; +# $allGood=0; if($mode eq "http") { while((! ($line=~m/START BODY OF TEXT HERE/)) && !eof(DATA)) @@ -51,7 +48,7 @@ exit(0); } $line=; chomp $line; -($crap,$time)=split(/\ /,$line); +(undef,$time)=split(/\ /,$line); ($hour,$minute)=split(/:/,$time); $line=""; if($mode eq "http") @@ -72,45 +69,45 @@ close DATA; chomp $line; @args=split(/\ /,$line); -if(debug) +if ($debug) { - #print "@args\n"; + print "@args\n"; } $i=0; -$station=@args[$i]; +$station=$args[$i]; if(($station eq 'METAR') or ($station eq 'SPECI')) { - $station=@args[$i+1]; + $station=$args[$i+1]; $i++; } $i++; $i++;#time -$wind=@args[$i]; +$wind=$args[$i]; if($wind eq 'AUTO') { - $wind=@args[$i+1]; + $wind=$args[$i+1]; $i++; } $i++; -$visibility=@args[$i]; +$visibility=$args[$i]; $i++;#Visibility if( ! ($visibility=~m/SM/ || ($visibility eq "CAVOK")) ) { #print "Visibility fraction\n"; $i++; # visibility with fractions, ignoring } -$next=@args[$i]; +$next=$args[$i]; if($next=~m/FT/) { #print "Visibility feet\n"; $i++; # visibility in feet, ignoring } -$tmp=""; +# $tmp=""; $weather=""; $clouds=""; -while((! (@args[$i]=~/\//)) && ($i<@args)) +while((! ($args[$i]=~/\//)) && ($i<@args)) { $intensity=""; @@ -119,7 +116,7 @@ while((! (@args[$i]=~/\//)) && ($i<@args)) $obsc=""; $misc=""; $j=0; - $curent=@args[$i]; + $curent=$args[$i]; $wasCloud="no"; if($curent=~/^CAVOK/) @@ -130,7 +127,7 @@ while((! (@args[$i]=~/\//)) && ($i<@args)) if($curent=~/^VV/) { $clouds.="VV,".substr($curent,2,3).";"; - $wasNotCloud="yes"; + # $wasNotCloud="yes"; } if(($curent=~/^CLR/) or ($curent=~/^SCK/) or ($curent=~/^FEW/) or ($curent=~/^SCT/) or ($curent=~/^BKN/) or ($curent=~/^OVC/)) { @@ -183,7 +180,7 @@ if(($wasCloud ne "yes")) } $i++; } -($temp,$dew)=split(/\//,@args[$i]); +($temp,$dew)=split(/\//,$args[$i]); $dir=substr($wind,0,3); @@ -242,32 +239,37 @@ if($dew eq "") } #check for ok temperature -open(GREP, "grep Temp $tmpfolder/${station} | "); -$templine=; -$templine=~m/^Temp:(.*)$/; + +if ( -d "$tmpfolder/$station" ) { - $lattemp=$1; - if($temp>-50 && $temp<150) - { - if($lasttemp>-50 && $lasttemp<150) - { - if($temp>-2 && $temp<2) - { - if($lasttemp>7 || $lasttemp<-7) - { - #probably invalid - $station=""; - } - } - } - } - else - { - #invalid - $station=""; - } + open(GREP, "grep Temp $tmpfolder/${station} | "); + $templine=; + + $templine=~m/^Temp:(.*)$/; + { + # $lattemp=$1; + if($temp>-50 && $temp<150) + { + if($lasttemp>-50 && $lasttemp<150) + { + if($temp>-2 && $temp<2) + { + if($lasttemp>7 || $lasttemp<-7) + { + #probably invalid + $station=""; + } + } + } + } + else + { + #invalid + $station=""; + } + } + close GREP; } -close GREP; #print "$$station\n"; if(length($station)==4) debian/patches/30-wmfrog.c-no-output.patch0000644000000000000000000000260511716713735015566 0ustar From: Jari Aalto Subject: Src/wmFrog.c: (main): No output @DPATCH@ --- Src/wmFrog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/Src/wmFrog.c +++ b/Src/wmFrog.c @@ -214,7 +214,7 @@ dt2 = 0; sprintf(FileName, "%s/%s", folder, StationID); - fprintf(stderr,"%s\n\n",FileName); + /* fprintf(stderr,"%s\n\n",FileName); */ if ((fp = fopen(FileName, "r")) != NULL){ fscanf(fp, "Hour:%d", &hour); fgets(Line, 512, fp);//h @@ -615,7 +615,7 @@ } else if(sscanf(argv[i+1], "%d", &maxWind) != 1) { - fprintf(stderr,"Dont understand the max wind value have entered (%s).\n", argv[i+1]); + fprintf(stderr,"Don't understand the max wind value have entered (%s).\n", argv[i+1]); print_usage(); exit(-1); @@ -630,7 +630,7 @@ } else if(sscanf(argv[i+1], "%d", &timeOffset) != 1) { - fprintf(stderr,"Dont understand the time offset value have entered (%s).\n", argv[i+1]); + fprintf(stderr,"Don't understand the time offset value have entered (%s).\n", argv[i+1]); print_usage(); exit(-1); @@ -666,7 +666,7 @@ } else if(sscanf(argv[i+1], "%ld", &UpdateDelay) != 1) { - fprintf(stderr,"Dont understand the delay time you have entered (%s).\n", argv[i+1]); + fprintf(stderr,"Don't understand the delay time you have entered (%s).\n", argv[i+1]); print_usage(); exit(-1); debian/patches/series0000644000000000000000000000006011716713765012044 0ustar 20-weather.pl.patch 30-wmfrog.c-no-output.patch debian/compat0000644000000000000000000000000211733265025010370 0ustar 9 debian/control0000644000000000000000000000175511733265030010601 0ustar Source: wmfrog Section: x11 Priority: optional Maintainer: Jari Aalto Build-Depends: debhelper (>= 9), libxpm-dev, x11proto-xext-dev, libxext-dev Standards-Version: 3.9.3.1 Vcs-Browser: http://git.debian.org/?p=collab-maint/wmfrog.git Vcs-Git: git://git.debian.org/git/collab-maint/wmfrog.git Homepage: http://freshmeat.net/projects/wmfrog Package: wmfrog Architecture: any Depends: wget, libxext6, ${shlibs:Depends}, ${misc:Depends} Description: dockapp for graphically indicating the weather This package provides a dockapp for weather reports. It shows: . - Cloud cover: clear, few, scattered, broken, overcast etc. - Precipitation: light, moderate, or heavy rain, hail, or snow. - Humidity as a percentage. - Wind speed, average and gusting, and direction. - Temperature: Celsius or Fahrenheit. - Special conditions such as gales, thunderstorms, or tornadoes. . The name of the reporting station can be configured and the time of the last update is displayed. debian/changelog0000644000000000000000000000263111741113306011037 0ustar wmfrog (0.2.0-4) unstable; urgency=low * debian/rules - Enable CPPFLAGS hardened build flags (Closes: #668303). Patch thanks to Simon Ruderich -- Jari Aalto Tue, 10 Apr 2012 23:23:34 +0300 wmfrog (0.2.0-3) unstable; urgency=low * debian/control - (Description): Rewrite. Patch thanks to Justin B Rye in followup to bug #612927. * debian/rules - Use DEB_*_MAINT_* variables. -- Jari Aalto Sat, 24 Mar 2012 02:30:33 -0400 wmfrog (0.2.0-2) unstable; urgency=low * debian/compat - Update to 9. * debian/control - (Build-Depends): Update to debhelper 9, remove dpatch. - (Description): Fix typo (Closes: #612927). - (standards-Version): 3.9.3.1. * debian/copyright - Update to format 1.0. * debian/manpages - New file. * debian/patches - Convert to Quilt. * debian/rules - Update to dh(1). - Use hardened build flags. http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags * debian/source/format - New. Update to format "3.0 (quilt)". * debian/wmfrog.1.pod - Move from manual page from section 1x to 1. -- Jari Aalto Wed, 21 Mar 2012 03:45:02 -0400 wmfrog (0.2.0-1) unstable; urgency=low * Initial release (RFP/ITP; Closes: #504786). -- Jari Aalto Fri, 07 Nov 2008 09:57:30 +0000 debian/watch0000644000000000000000000000006011716705760010225 0ustar version=3 http://sf.net/wmfrog/wmfrog-(.+)\.tgz debian/rules0000755000000000000000000000122111741113450010237 0ustar #!/usr/bin/make -f PACKAGE = wmfrog MAKEOPT = -C Src export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed man: # convert *.pod to manual page $(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) makeman override_dh_auto_build: man # CFLAGS is the only variable that we can utilize to pass flags. $(MAKE) $(MAKEOPT) CFLAGS="$(CFLAGS) $(CPPFLAGS) $(LDFLAGS)" override_dh_auto_clean: [ ! Src/Makefile ] || $(MAKE) $(MAKEOPT) clean override_dh_auto_install: $(MAKE) $(MAKEOPT) install DESTDIR=$(CURDIR)/debian/wmfrog %: dh $@ .PHONY = man # End of file debian/wmfrog.10000644000000000000000000001103211716714002010545 0ustar .\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" ======================================================================== .\" .IX Title "wmfrog 1" .TH wmfrog 1 "2012-02-15" "wmfrog" "User Commands" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" wmfrog \- a dockapp for showing weather in graphical way .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& wmfrog [options] \-stattion .Ve .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-delay minutes\fR" 4 .IX Item "-delay minutes" Override time (in minutes) between updates. Default is 15. .IP "\fB\-m, \-metric\fR" 4 .IX Item "-m, -metric" Display Temperature in metric unit: Celcius. .IP "\fB\-o offset\fR" 4 .IX Item "-o offset" Time offset of location from \s-1UTC\s0. Positive or negative integer expressed in hours, like +1 or \-7. .IP "\fB\-s, \-station\fR" 4 .IX Item "-s, -station" Required option. The 4\-character \s-1METAR\s0 Station \s-1ID\s0. See http://en.wikipedia.org/wiki/METAR .IP "\fB\-w knots\fR" 4 .IX Item "-w knots" Set the maximum wind in \s-1KNOTS\s0 for percentage of max / scaling. Default is 50 Knots. .IP "\fB\-tmp directory\fR" 4 .IX Item "-tmp directory" Set the temporary directory where the \s-1METAR\s0 data files are downloaded Default is \f(CW\*(C`/tmp\*(C'\fR. .IP "\fB\-l label\fR" 4 .IX Item "-l label" Set displayed text to 4 character (max) label to replace the \s-1METAR\s0 station id. .SH "DESCRIPTION" .IX Header "DESCRIPTION" A dockapp for wheather reports. Includes clouds (clear, few, scattered, broken, overcast ...); Precipitations (drizzle, rain, snow, ice christals: light/moderate or heavy); Special weather (Blowing wind / Freezing / Thunderstorm, funnel cloud...); Humidity perentage; Wind speed (average & gust); Wind Direction; Temperature (Celcius or Fareinheit); Station name can be configured and weather report time is displayed. .PP To find out more about the \s-1METAR/TAF\s0 system, see \&\fIFrequently Asked Questions about \s-1METAR/SPECI\s0 and \s-1TAF\s0\fR at http://www.nws.noaa.gov/oso/oso1/oso12/faq.htm .PP To find your city Metar code go to \s-1NOAA\s0's Meteorological Station Information Lookup page \fIMeteorological Products Processed At The \&\s-1NWSTG\s0\fR at at http://www.nws.noaa.gov/tg/siteloc.shtml .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" None. .SH "FILES" .IX Header "FILES" .IP "/tmp//" 4 .IX Item "/tmp//" Stored data files. The directory can be changed with option \fB\-tmp\fR .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIwmweather\fR\|(1) wmweather+(1) .SH "AUTHORS" .IX Header "AUTHORS" program was written by Thibaut Colar .PP This manual page is based on 0.1.6 version of the program. Updated by Jari Aalto . Released under license \s-1GNU\s0 \s-1GPL\s0 v2 or (at your option) any later version. For more information about license, visit . debian/wmfrog.1.pod0000644000000000000000000000466111716705760011353 0ustar Rxu# This is manual page in Perl POD format. Read more at # http://perldoc.perl.org/perlpod.html or run command: # # perldoc perlpod | less # # To check the syntax: # # podchecker *.pod # # Create manual page with command: # # pod2man PAGE.N.pod > PAGE.N =pod =head1 NAME wmfrog - a dockapp for showing weather in graphical way =head1 SYNOPSIS wmfrog [options] -stattion =head1 OPTIONS =over 4 =item B<-delay minutes> Override time (in minutes) between updates. Default is 15. =item B<-m, -metric> Display Temperature in metric unit: Celcius. =item B<-o offset> Time offset of location from UTC. Positive or negative integer expressed in hours, like +1 or -7. =item B<-s, -station> Required option. The 4-character METAR Station ID. See http://en.wikipedia.org/wiki/METAR =item B<-w knots> Set the maximum wind in KNOTS for percentage of max / scaling. Default is 50 Knots. =item B<-tmp directory> Set the temporary directory where the METAR data files are downloaded Default is C. =item B<-l label> Set displayed text to 4 character (max) label to replace the METAR station id. =back =head1 DESCRIPTION A dockapp for wheather reports. Includes clouds (clear, few, scattered, broken, overcast ...); Precipitations (drizzle, rain, snow, ice christals: light/moderate or heavy); Special weather (Blowing wind / Freezing / Thunderstorm, funnel cloud...); Humidity perentage; Wind speed (average & gust); Wind Direction; Temperature (Celcius or Fareinheit); Station name can be configured and weather report time is displayed. To find out more about the METAR/TAF system, see I at http://www.nws.noaa.gov/oso/oso1/oso12/faq.htm To find your city Metar code go to NOAA's Meteorological Station Information Lookup page I at at http://www.nws.noaa.gov/tg/siteloc.shtml =head1 ENVIRONMENT None. =head1 FILES =over 4 =item /tmp// Stored data files. The directory can be changed with option B<-tmp> =back =head1 SEE ALSO wmweather(1) wmweather+(1) =head1 AUTHORS program was written by Thibaut Colar This manual page is based on 0.1.6 version of the program. Updated by Jari Aalto . Released under license GNU GPL v2 or (at your option) any later version. For more information about license, visit . =cut debian/copyright0000644000000000000000000000301111726405603011120 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 X-Format: http://dep.debian.net/deps/dep5 Upstream-Name: wmfrog Upstream-Contact: Thibaut Colar Source: http://freshmeat.net/projects/wmfrog X-Upstream-Bugs: https://bitbucket.org/tcolar/wmfrog/issues X-Vcs: hg clone https://bitbucket.org/tcolar/wmfrog X-Source: http://wiki.colar.net/wmfrog_dockapp https://sourceforge.net/projects/wmfrog http://dockapps.org/file.php/id/92 Files: * Copyright: 2002-2007 Thibaut Colar , License: GPL-2+ Files: Src/xutils.c Copyright: 2002-2007 Martijn Pieterse License: GPL-2+ Files: debian/* Copyright: 2008-2012 Jari Aalto License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". debian/source/0000755000000000000000000000000011716707240010473 5ustar debian/source/format0000644000000000000000000000001411716707244011705 0ustar 3.0 (quilt) debian/pod2man.mk0000644000000000000000000000345311716712031011063 0ustar # pod2man.mk -- Makefile portion to convert *.pod files to manual pages # # Copyright information # # Copyright (C) 2008-2010 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Description # # Convert *.pod files to manual pages. Add this to Makefile: # # PACKAGE = package # # man: # make -f pod2man.mk PACKAGE=$(PACKAGE) makeman # # build: man ifneq (,) This makefile requires GNU Make. endif # This variable *must* be set when called PACKAGE ?= package # Optional variables to set MANSECT ?= 1 PODCENTER ?= User Commands PODDATE ?= $$(date "+%Y-%m-%d") # Directories MANSRC ?= MANDEST ?= $(MANSRC) MANPOD ?= $(MANSRC)$(PACKAGE).$(MANSECT).pod MANPAGE ?= $(MANDEST)$(PACKAGE).$(MANSECT) POD2MAN ?= pod2man POD2MAN_FLAGS ?= --utf8 makeman: $(MANPAGE) $(MANPAGE): $(MANPOD) # make target - create manual page from a *.pod page podchecker $(MANPOD) LC_ALL= LANG=C $(POD2MAN) $(POD2MAN_FLAGS) \ --center="$(PODCENTER)" \ --date="$(PODDATE)" \ --name="$(PACKAGE)" \ --section="$(MANSECT)" \ $(MANPOD) \ | sed 's,[Pp]erl v[0-9.]\+,$(PACKAGE),' \ > $(MANPAGE) && \ rm -f pod*.tmp # End of of Makefile part debian/manpages0000644000000000000000000000001311716713134010702 0ustar debian/*.1