]> git.pld-linux.org Git - packages/php-facebook-sdk.git/blame - php-facebook-sdk.spec
add deprecation note
[packages/php-facebook-sdk.git] / php-facebook-sdk.spec
CommitLineData
90ffbb78 1#
0bb79e1c
ER
2# NOTE: This SDK is deprecated. Use v4 (not yet packaged in pld)
3
90ffbb78 4# Conditional build:
e0b22171 5%bcond_without tests # build with tests
90ffbb78 6
588d9463
ER
7%if "%(cat /etc/resolv.conf >/dev/null 2>/dev/null; echo $?)" != "0"
8%undefine with_tests
9%endif
10
31caa3f0
ER
11%define php_min_version 5.2.0
12%include /usr/lib/rpm/macros.php
13Summary: PHP SDK for the Facebook API
14Name: php-facebook-sdk
101eb1a6
ER
15Version: 3.2.3
16Release: 1
31caa3f0
ER
17License: Apache v2.0
18Group: Development/Languages/PHP
101eb1a6
ER
19Source0: https://github.com/facebookarchive/facebook-php-sdk/archive/v%{version}/%{name}-%{version}.tar.gz
20# Source0-md5: fc8edc0afea0cbe8e64b539f491f5a19
8c6921be 21Patch0: class-nps.patch
101eb1a6 22URL: https://github.com/facebookarchive/facebook-php-sdk
31caa3f0 23BuildRequires: rpm-php-pearprov >= 4.4.2-11
e875abc8 24BuildRequires: rpmbuild(macros) >= 1.654
81dffb79 25%if %{with tests}
101eb1a6
ER
26BuildRequires: %{php_name}-curl
27BuildRequires: %{php_name}-hash
28BuildRequires: %{php_name}-json
29BuildRequires: %{php_name}-pecl-xdebug
30BuildRequires: %{php_name}-session
fba46ce0 31BuildRequires: php-PHPUnit >= 3.5
81dffb79 32%endif
a8907064 33Requires: php(core) >= %{php_min_version}
3bfa792a
ER
34Requires: php(curl)
35Requires: php(hash)
36Requires: php(json)
8c6921be 37Suggests: php(session)
31caa3f0
ER
38BuildArch: noarch
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
e875abc8 41%define _noautoreq_pear base_facebook.php
31caa3f0
ER
42
43%description
81dffb79
ER
44Open Source PHP SDK that allows you to utilize the The Facebook
45Platform which is a set of APIs that make your application more
46social.
31caa3f0
ER
47
48%prep
101eb1a6
ER
49%setup -qn facebook-php-sdk-%{version}
50cp -p src/facebook.php src/facebook.nps.php
8c6921be 51%patch0 -p1
31caa3f0 52
90ffbb78
ER
53%build
54%if %{with tests}
e0b22171
ER
55phpunit \
56 -d session.save_handler="files" \
57 -d session.save_path="$(pwd)" \
94f8ddf0 58 -d include_path=".:$(pwd):%{php_pear_dir}" \
e0b22171
ER
59 --colors \
60 --coverage-html coverage \
61 --verbose \
62 --stderr \
63 --bootstrap tests/bootstrap.php \
64 tests/tests.php
90ffbb78
ER
65%endif
66
31caa3f0
ER
67%install
68rm -rf $RPM_BUILD_ROOT
69install -d $RPM_BUILD_ROOT%{php_data_dir}
7224ef70 70cp -a src/*facebook*.php $RPM_BUILD_ROOT%{php_data_dir}
ac9d8f55
ER
71
72install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
31caa3f0
ER
74
75%clean
76rm -rf $RPM_BUILD_ROOT
77
78%files
79%defattr(644,root,root,755)
ac9d8f55 80%doc readme.md changelog.md
31caa3f0 81%{php_data_dir}/facebook.php
7224ef70 82%{php_data_dir}/facebook.nps.php
ac9d8f55
ER
83%{php_data_dir}/base_facebook.php
84%{_examplesdir}/%{name}-%{version}
This page took 0.148122 seconds and 4 git commands to generate.