2 # NOTE: This SDK is deprecated. Use v4 (not yet packaged in pld)
5 %bcond_without tests # build with tests
7 %if "%(cat /etc/resolv.conf >/dev/null 2>/dev/null; echo $?)" != "0"
11 %define php_min_version 5.2.0
12 Summary: PHP SDK for the Facebook API
13 Name: php-facebook-sdk
17 Group: Development/Languages/PHP
18 Source0: https://github.com/facebookarchive/facebook-php-sdk/archive/v%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: fc8edc0afea0cbe8e64b539f491f5a19
20 Patch0: class-nps.patch
21 URL: https://github.com/facebookarchive/facebook-php-sdk
22 BuildRequires: rpm-php-pearprov >= 4.4.2-11
23 BuildRequires: rpmbuild(macros) >= 1.654
25 BuildRequires: %{php_name}-curl
26 BuildRequires: %{php_name}-hash
27 BuildRequires: %{php_name}-json
28 BuildRequires: %{php_name}-pecl-xdebug
29 BuildRequires: %{php_name}-session
30 BuildRequires: php-PHPUnit >= 3.5
32 Requires: php(core) >= %{php_min_version}
36 Suggests: php(session)
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %define _noautoreq_pear base_facebook.php
43 Open Source PHP SDK that allows you to utilize the The Facebook
44 Platform which is a set of APIs that make your application more
48 %setup -qn facebook-php-sdk-%{version}
49 cp -p src/facebook.php src/facebook.nps.php
55 -d session.save_handler="files" \
56 -d session.save_path="$(pwd)" \
57 -d include_path=".:$(pwd):%{php_pear_dir}" \
59 --coverage-html coverage \
62 --bootstrap tests/bootstrap.php \
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{php_data_dir}
69 cp -a src/*facebook*.php $RPM_BUILD_ROOT%{php_data_dir}
71 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
75 rm -rf $RPM_BUILD_ROOT
78 %defattr(644,root,root,755)
79 %doc readme.md changelog.md
80 %{php_data_dir}/facebook.php
81 %{php_data_dir}/facebook.nps.php
82 %{php_data_dir}/base_facebook.php
83 %{_examplesdir}/%{name}-%{version}