]> git.pld-linux.org Git - packages/php-facebook-sdk.git/blob - php-facebook-sdk.spec
1780bc54c29d809f5f09d49fac07248480b93f07
[packages/php-facebook-sdk.git] / php-facebook-sdk.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build with tests
4
5 %define         php_min_version 5.2.0
6 %include        /usr/lib/rpm/macros.php
7 Summary:        PHP SDK for the Facebook API
8 Name:           php-facebook-sdk
9 Version:        3.1.1
10 Release:        6
11 License:        Apache v2.0
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
19 %if %{with tests}
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
26 %endif
27 Requires:       php(core) >= %{php_min_version}
28 Requires:       php(curl)
29 Requires:       php(hash)
30 Requires:       php(json)
31 Suggests:       php(session)
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         _noautopear     pear(base_facebook.php)
36 %define         _noautoreq      %{?_noautophpreq} %{?_noautopear}
37
38 %description
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
41 social.
42
43 %prep
44 %setup -qc
45 mv facebook-facebook-php-sdk-*/* .
46 cp src/facebook.php src/facebook.nps.php
47 %patch0 -p1
48
49 %build
50 %if %{with tests}
51 phpunit --colors --coverage-html coverage --verbose --stderr --bootstrap tests/bootstrap.php tests/tests.php
52 %endif
53
54 %install
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}
58
59 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
60 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %files
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}
This page took 0.037335 seconds and 2 git commands to generate.