3 %bcond_with tests # build with tests
5 %define php_min_version 5.2.0
6 %include /usr/lib/rpm/macros.php
7 Summary: PHP SDK for the Facebook API
12 Group: Development/Languages/PHP
13 Source0: https://github.com/facebook/facebook-php-sdk/tarball/v%{version}#/%{name}-%{version}.tgz
14 # Source0-md5: 3e23cbda87e68f95f3b222cbb868e5d1
15 Patch0: class-nps.patch
16 URL: https://github.com/facebook/facebook-php-sdk
17 BuildRequires: rpm-php-pearprov >= 4.4.2-11
18 BuildRequires: rpmbuild(macros) >= 1.461
20 BuildRequires: php-PHPUnit >= 3.5
21 BuildRequires: php-curl
22 BuildRequires: php-hash
23 BuildRequires: php-json
24 BuildRequires: php-pecl-xdebug
25 BuildRequires: php-session
27 Requires: php(core) >= %{php_min_version}
31 Suggests: php(session)
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define _noautopear pear(base_facebook.php)
36 %define _noautoreq %{?_noautophpreq} %{?_noautopear}
39 Open Source PHP SDK that allows you to utilize the The Facebook
40 Platform which is a set of APIs that make your application more
45 mv facebook-facebook-php-sdk-*/* .
46 cp src/facebook.php src/facebook.nps.php
51 phpunit --colors --coverage-html coverage --verbose --stderr --bootstrap tests/bootstrap.php tests/tests.php
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT%{php_data_dir}
57 cp -a src/*facebook*.php $RPM_BUILD_ROOT%{php_data_dir}
59 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
60 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
63 rm -rf $RPM_BUILD_ROOT
66 %defattr(644,root,root,755)
67 %doc readme.md changelog.md
68 %{php_data_dir}/facebook.php
69 %{php_data_dir}/facebook.nps.php
70 %{php_data_dir}/base_facebook.php
71 %{_examplesdir}/%{name}-%{version}