Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b47d42a9c | ||
|
|
822923df43 |
4 changed files with 10 additions and 73 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
wmfrog-0.2.1.tgz
|
||||
/wmfrog-0.2.2.tgz
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
ad9a552cb6b802e7eca0a05d3a53151d wmfrog-0.2.1.tgz
|
||||
5732ea81317451462143bfd5ddba2b16 wmfrog-0.2.2.tgz
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
diff -Naur wmfrog-0.2.1/Src/weather.pl wmfrog-0.2.1-devel/Src/weather.pl
|
||||
--- wmfrog-0.2.1/Src/weather.pl 2010-08-04 20:43:34.000000000 +0200
|
||||
+++ wmfrog-0.2.1-devel/Src/weather.pl 2010-08-05 13:11:51.446572041 +0200
|
||||
@@ -5,6 +5,7 @@
|
||||
#The Weather data can be retrieved through http of ftp.
|
||||
#Http is faster, however this might get broken if NOAA change their webpage layout
|
||||
#in wich case you should choose ftp.
|
||||
+# See <http://weather.noaa.gov/weather/metar.shtml> for more details.
|
||||
$mode="http"; # html || ftp
|
||||
|
||||
|
||||
@@ -16,17 +17,17 @@
|
||||
mkdir($tmpfolder);
|
||||
|
||||
$html="http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=${station}";
|
||||
-$ftp="ftp://weather.noaa.gov/data/observations/metar/stations/${station}.TXT";
|
||||
+$ftp="ftp://tgftp.nws.noaa.gov/data/observations/metar/stations/${station}.TXT";
|
||||
$url=$html;
|
||||
if($mode eq "ftp")
|
||||
{
|
||||
$url=$ftp;
|
||||
}
|
||||
|
||||
+my $file="${tmpfolder}/${station}_dat";
|
||||
# change this line if wget isn't in your path:
|
||||
-`wget -q -O ${tmpfolder}/${station}_dat $url`;
|
||||
-$line="";
|
||||
-$file="${tmpfolder}/${station}_dat";
|
||||
+`wget -q -O ${file} $url`;
|
||||
+my $line="";
|
||||
open(DATA,"<$file");
|
||||
$allGood=0;
|
||||
if($mode eq "http")
|
||||
@@ -37,7 +38,7 @@
|
||||
$line=<DATA>;
|
||||
}
|
||||
$i=0;
|
||||
- while($i!=12 && !eof(DATA))
|
||||
+ while($i!=20 && !eof(DATA))
|
||||
{
|
||||
#print "*";
|
||||
$line=<DATA>;
|
||||
@@ -53,22 +54,10 @@
|
||||
chomp $line;
|
||||
($crap,$time)=split(/\ /,$line);
|
||||
($hour,$minute)=split(/:/,$time);
|
||||
-$line="";
|
||||
-if($mode eq "http")
|
||||
-{
|
||||
- $i=0;
|
||||
- while($i!=8)
|
||||
- {
|
||||
- $line=<DATA>;
|
||||
- $i++;
|
||||
- }
|
||||
-}
|
||||
-$newLine=<DATA>;
|
||||
-$line.=$newLine;
|
||||
-chomp $line;
|
||||
-$line=~s/<hr>//;
|
||||
-$line="METAR $station $line";
|
||||
+
|
||||
+$line=<DATA>;
|
||||
close DATA;
|
||||
+chomp $line;
|
||||
|
||||
chomp $line;
|
||||
@args=split(/\ /,$line);
|
||||
12
wmfrog.spec
12
wmfrog.spec
|
|
@ -1,14 +1,13 @@
|
|||
Name: wmfrog
|
||||
Version: 0.2.1
|
||||
Version: 0.2.2
|
||||
Release: 1%{?dist}
|
||||
Summary: A weather application, it shows the weather in a graphical way
|
||||
|
||||
Group: User Interface/X
|
||||
Group: Amusements/Graphics
|
||||
License: GPLv2+
|
||||
URL: http://wiki.colar.net/wmfrog_dockapp
|
||||
Source0: http://bitbucket.org/tcolar/%{name}/downloads/%{name}-%{version}.tgz
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
Patch0: %{name}-0.2.1-metar_parser.patch
|
||||
|
||||
BuildRequires: libX11-devel, libXext-devel, libXpm-devel
|
||||
Requires: wget
|
||||
|
|
@ -21,7 +20,6 @@ when I was 25, I'm a programmer not a designer :)
|
|||
|
||||
%prep
|
||||
%setup -q -c
|
||||
%patch0 -p1 -b .metar_parser
|
||||
sed -i -e 's|/lib/wmfrog|/libexec/wmfrog|' Src/Makefile
|
||||
sed -i 's|/usr/lib/|%{_libexecdir}/|' Src/wmFrog.c
|
||||
|
||||
|
|
@ -49,6 +47,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Sep 01 2010 Petr Pisar <ppisar@redhat.com> - 0.2.2-1
|
||||
- 0.2.2 bump
|
||||
|
||||
* Mon Aug 09 2010 Petr Pisar <ppisar@redhat.com> - 0.2.1-2
|
||||
- Change RPM group to Amusements/Graphics
|
||||
|
||||
* Thu Aug 05 2010 Petr Pisar <ppisar@redhat.com> - 0.2.1-1
|
||||
- 0.2.1 bump
|
||||
- Fix METAR parser
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue