1 %include /usr/lib/rpm/macros.php
2 %define _class Services
3 %define _subclass Weather
5 %define _pearname %{_class}_%{_subclass}
7 Summary: %{_pearname} - an interface to various online weather-services
8 Summary(pl): %{_pearname} - interfejs do ró¿nych serwisów pogodowych
9 Name: php-pear-%{_pearname}
13 Group: Development/Languages/PHP
14 Source0: http://pear.php.net/get/%{_pearname}-%{version}.tgz
15 # Source0-md5: a84d8dc57e063e8fd615af92a99103c6
16 URL: http://pear.php.net/package/Services_Wheather/
17 BuildRequires: rpm-php-pearprov >= 4.4.2-11
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 # exclude optional dependencies
23 %define _noautoreq 'pear(Cache.*)' 'pear(DB.*)' 'pear(HTTP/Request.*)' 'pear(SOAP.*)' 'pear(XML/Serializer.*)'
26 Services_Weather searches for given locations and retrieves current
27 weather data and, dependent on the used service, also forecasts. Up to
28 now, GlobalWeather from CapeScience, a XML service from weather.com
29 and METAR from noaa.gov are supported. Further services will get
30 included, if they become available, have a usable API and are properly
33 In PEAR status of this package is: %{_status}.
36 Services_Weather wyszukuje pogodê, oraz w zale¿no¶ci od u¿ytego
37 serwisu, tak¿e prognozê dla podanej lokalizacji. Jak do tej pory
38 obs³ugiwane s±: GlobalWeather z CapeScience, us³uga XML z weather.com
39 oraz METAR z noaa.gov. Wsparcie dla kolejnych serwisów zostanie
40 dodane, o ile bêd± one dostêpne, bêd± mia³y u¿yteczne API i bêd±
41 odpowiednio udokumentowane.
43 Ta klasa ma w PEAR status: %{_status}.
47 sed -i -e '1s#/usr/local/bin/php#%{_bindir}/php#' ./%{php_pear_dir}/data/%{_pearname}/buildMetarDB.php
48 install -d docs/%{_pearname}
49 mv ./%{php_pear_dir}/data/%{_pearname}/buildMetarDB.php docs/%{_pearname}
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT%{php_pear_dir}
57 rm -rf $RPM_BUILD_ROOT
60 if [ -f %{_docdir}/%{name}-%{version}/optional-packages.txt ]; then
61 cat %{_docdir}/%{name}-%{version}/optional-packages.txt
65 %defattr(644,root,root,755)
67 %doc docs/%{_pearname}/*
68 %{php_pear_dir}/.registry/*.reg
69 %{php_pear_dir}/%{_class}/*.php
70 %{php_pear_dir}/%{_class}/%{_subclass}
72 %{php_pear_dir}/data/%{_pearname}