]> git.pld-linux.org Git - packages/php-google-api.git/blob - php-google-api.spec
- use virtual php deps
[packages/php-google-api.git] / php-google-api.spec
1 # TODO
2 # - make it possible to use user config (via local_config.php path)
3
4 %define         php_min_version 5.2.2
5 %include        /usr/lib/rpm/macros.php
6 Summary:        Google APIs Client Library for PHP
7 Name:           php-google-api
8 Version:        0.6.7
9 Release:        2
10 License:        Apache v2.0
11 Group:          Development/Languages/PHP
12 Source0:        https://google-api-php-client.googlecode.com/files/google-api-php-client-%{version}.tar.gz
13 # Source0-md5:  4ea330e08f91963b7b78fab25314abee
14 Patch0:         php52.patch
15 Patch1:         gapi.patch
16 URL:            https://code.google.com/p/google-api-php-client/
17 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
18 BuildRequires:  rpmbuild(macros) >= 1.461
19 BuildRequires:  sed >= 4.0
20 Requires:       php(core) >= %{php_min_version}
21 Requires:       php(curl)
22 Requires:       php(date)
23 Requires:       php(hash)
24 Requires:       php(json)
25 Requires:       php(openssl)
26 Requires:       php(pcre)
27 Suggests:       php-seclib
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _appdir         %{php_data_dir}/google-api
32 %define         _noautopear     pear
33 %define         _noautoreq      %{?_noautophpreq} %{?_noautopear}
34
35 %description
36 The Google API Client Library enables you to work with Google APIs
37 such as Analytics, Adsense, Google+, Calendar, Moderator, Tasks, or
38 Latitude on your server.
39
40 %prep
41 %setup -qc
42 mv google-api-php-client/* .
43 %patch0 -p1
44 %patch1 -p8
45
46 grep -rl require_once examples | xargs %{__sed} -i -e '
47         # fixup paths to source
48         /require_once/ s,\.\./\.\./src/,google-api/,
49         /require_once/ s,\.\./src/,google-api/,
50
51         # lower php requirement to 5.2
52         s,__DIR__,dirname(__FILE__),
53 '
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT%{_appdir}
58 cp -a src/* $RPM_BUILD_ROOT%{_appdir}
59
60 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
61 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %files
67 %defattr(644,root,root,755)
68 %doc NOTICE README
69 %{_appdir}
70 %{_examplesdir}/%{name}-%{version}
This page took 0.066523 seconds and 3 git commands to generate.