1 %define php_min_version 5.2.6
2 %define pkgname urbanairship
3 Summary: Urban Airship PHP library - web service API for iPhone push notifications
8 Group: Development/Languages/PHP
9 Source0: https://github.com/urbanairship/php-library/tarball/master/%{pkgname}-%{version}.tgz
10 # Source0-md5: 4c0f3befc41103e40b86835262180492
11 URL: https://github.com/urbanairship/php-library
12 BuildRequires: rpm-php-pearprov >= 4.4.2-11
13 BuildRequires: rpmbuild(macros) >= 1.461
14 Requires: php-common >= 4:%{php_min_version}
15 Requires: php-pear-HTTP_Request
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define _appdir %{php_data_dir}/%{pkgname}
22 This here is a PHP library for using the Urban Airship
23 <http://urbanairship.com/> web service API for iPhone push
26 The library handles these parts of the API:
27 - device token registration
29 - registering and pushing with tags
32 - device token deactivation (deregistration)
33 - device token listing
37 mv urbanairship-php-library-*/* .
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT%{php_data_dir}
42 cp -p urbanairship.php $RPM_BUILD_ROOT%{php_data_dir}
43 cp -p RESTClient.php $RPM_BUILD_ROOT%{php_data_dir}
45 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
46 cp -p sample.php $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
49 rm -rf $RPM_BUILD_ROOT
52 %defattr(644,root,root,755)
54 %{php_data_dir}/urbanairship.php
55 %{php_data_dir}/RESTClient.php
56 %{_examplesdir}/%{name}-%{version}