]> git.pld-linux.org Git - SPECS.git/blob - php-facebook-sdk.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / php-facebook-sdk.spec
1 #
2 # NOTE: This SDK is deprecated. Use v4 (not yet packaged in pld)
3
4 # Conditional build:
5 %bcond_without  tests           # build with tests
6
7 %if "%(cat /etc/resolv.conf >/dev/null 2>/dev/null; echo $?)" != "0"
8 %undefine       with_tests
9 %endif
10
11 %define         php_min_version 5.2.0
12 Summary:        PHP SDK for the Facebook API
13 Name:           php-facebook-sdk
14 Version:        3.2.3
15 Release:        1
16 License:        Apache v2.0
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
24 %if %{with tests}
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
31 %endif
32 Requires:       php(core) >= %{php_min_version}
33 Requires:       php(curl)
34 Requires:       php(hash)
35 Requires:       php(json)
36 Suggests:       php(session)
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         _noautoreq_pear base_facebook.php
41
42 %description
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
45 social.
46
47 %prep
48 %setup -qn facebook-php-sdk-%{version}
49 cp -p src/facebook.php src/facebook.nps.php
50 %patch0 -p1
51
52 %build
53 %if %{with tests}
54 phpunit \
55         -d session.save_handler="files" \
56         -d session.save_path="$(pwd)" \
57         -d include_path=".:$(pwd):%{php_pear_dir}" \
58         --colors \
59         --coverage-html coverage \
60         --verbose \
61         --stderr \
62         --bootstrap tests/bootstrap.php \
63         tests/tests.php
64 %endif
65
66 %install
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}
70
71 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %files
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}
This page took 0.04332 seconds and 3 git commands to generate.