]> git.pld-linux.org Git - packages/php-google-api.git/blob - php-google-api.spec
2de96d8f39de840dd4fa3668dc72fb489bbc9604
[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.2
9 Release:        1
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:  86db4e431096c9c32637842e214c6e26
14 Patch0:         php52.patch
15 URL:            https://code.google.com/p/google-api-php-client/
16 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
17 BuildRequires:  rpmbuild(macros) >= 1.461
18 BuildRequires:  sed >= 4.0
19 Requires:       php-common >= 4:%{php_min_version}
20 Requires:       php-curl
21 Requires:       php-date
22 Requires:       php-hash
23 Requires:       php-json
24 Requires:       php-openssl
25 Requires:       php-pcre
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _appdir         %{php_data_dir}/google-api
30 %define         _noautopear     pear
31 %define         _noautoreq      %{?_noautophpreq} %{?_noautopear}
32
33 %description
34 The Google API Client Library enables you to work with Google APIs
35 such as Analytics, Adsense, Google+, Calendar, Moderator, Tasks, or
36 Latitude on your server.
37
38 %prep
39 %setup -qc
40 mv google-api-php-client/* .
41 %patch0 -p1
42
43 grep -rl require_once examples | xargs %{__sed} -i -e '
44         # fixup paths to source
45         /require_once/ s,\.\./\.\./src/,google-api/,
46         /require_once/ s,\.\./src/,google-api/,
47
48         # lower php requirement to 5.2
49         s,__DIR__,dirname(__FILE__),
50 '
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT%{_appdir}
55 cp -a src/* $RPM_BUILD_ROOT%{_appdir}
56
57 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
58 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %files
64 %defattr(644,root,root,755)
65 %doc NOTICE README
66 %{_appdir}
67 %{_examplesdir}/%{name}-%{version}
This page took 0.056999 seconds and 2 git commands to generate.