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.UTF-8): %{_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: 3afb9f4e38d9f129c05fbe1952f2d6ee
16 URL: http://pear.php.net/package/Services_Wheather/
17 BuildRequires: php-pear-PEAR
18 BuildRequires: rpm-php-pearprov >= 4.4.2-11
19 BuildRequires: rpmbuild(macros) >= 1.300
21 Requires: php-pear-HTTP_Request >= 1.2.0
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 # exclude optional dependencies
26 %define _noautoreq 'pear(Cache.*)' 'pear(DB.*)' 'pear(HTTP/Request.*)' 'pear(SOAP.*)' 'pear(XML/Serializer.*)' 'pear(Net/FTP.*)'
29 Services_Weather searches for given locations and retrieves current
30 weather data and, dependent on the used service, also forecasts. Up to
31 now, GlobalWeather from CapeScience, a XML service from weather.com
32 and METAR from noaa.gov are supported. Further services will get
33 included, if they become available, have a usable API and are properly
36 In PEAR status of this package is: %{_status}.
38 %description -l pl.UTF-8
39 Services_Weather wyszukuje pogodę, oraz w zależności od użytego
40 serwisu, także prognozę dla podanej lokalizacji. Jak do tej pory
41 obsługiwane są: GlobalWeather z CapeScience, usługa XML z weather.com
42 oraz METAR z noaa.gov. Wsparcie dla kolejnych serwisów zostanie
43 dodane, o ile będą one dostępne, będą miały użyteczne API i będą
44 odpowiednio udokumentowane.
46 Ta klasa ma w PEAR status: %{_status}.
50 sed -i -e '1s#/usr/local/bin/php#%{_bindir}/php#' ./%{php_pear_dir}/data/%{_pearname}/buildMetarDB.php
51 install -d docs/%{_pearname}
52 mv ./%{php_pear_dir}/data/%{_pearname}/buildMetarDB.php docs/%{_pearname}
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT%{php_pear_dir}
60 rm -rf $RPM_BUILD_ROOT
63 if [ -f %{_docdir}/%{name}-%{version}/optional-packages.txt ]; then
64 cat %{_docdir}/%{name}-%{version}/optional-packages.txt
68 %defattr(644,root,root,755)
70 %doc docs/%{_pearname}/*
71 %{php_pear_dir}/.registry/*.reg
72 %{php_pear_dir}/%{_class}/*.php
73 %{php_pear_dir}/%{_class}/%{_subclass}
75 %{php_pear_dir}/data/%{_pearname}