diff options
author | Stanley Cheung <stanley.cheung@gmail.com> | 2016-02-24 07:38:39 -0800 |
---|---|---|
committer | Stanley Cheung <stanley.cheung@gmail.com> | 2016-02-24 07:38:39 -0800 |
commit | 91edc13bf8a83dd024f9ce4e0ad2246202545a38 (patch) | |
tree | d93f9c8f7faf8167f0db13a0d3358276ceded8bd /templates | |
parent | c95bfefa5ecd38fdbb8d3a14d425cf5cd7337fe6 (diff) | |
parent | bf74d69ed601796fca2d6e737519cc1c2de7c60c (diff) |
Merge pull request #5249 from stanley-cheung/php-build-template
PHP: simplify installation
Diffstat (limited to 'templates')
-rw-r--r-- | templates/config.m4.template | 44 | ||||
-rw-r--r-- | templates/package.xml.template | 159 |
2 files changed, 203 insertions, 0 deletions
diff --git a/templates/config.m4.template b/templates/config.m4.template new file mode 100644 index 0000000000..dbc12188dc --- /dev/null +++ b/templates/config.m4.template @@ -0,0 +1,44 @@ +%YAML 1.2 +--- | + PHP_ARG_ENABLE(grpc, whether to enable grpc support, + [ --enable-grpc Enable grpc support]) + + if test "$PHP_GRPC" != "no"; then + dnl Write more examples of tests here... + + dnl # --with-grpc -> add include path + PHP_ADD_INCLUDE(../../grpc/include) + PHP_ADD_INCLUDE(../../grpc/src/php/ext/grpc) + PHP_ADD_INCLUDE(../../grpc/third_party/boringssl/include) + + LIBS="-lpthread $LIBS" + + GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD" + PHP_ADD_LIBRARY(pthread) + + PHP_ADD_LIBRARY(dl,,GRPC_SHARED_LIBADD) + PHP_ADD_LIBRARY(dl) + + case $host in + *darwin*) ;; + *) + PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD) + PHP_ADD_LIBRARY(rt) + ;; + esac + + PHP_NEW_EXTENSION(grpc, + % for source in php_config_m4.src: + ${source} ${"\\"} + % endfor + % for lib in libs: + % if lib.name in php_config_m4.get('deps', []): + % for source in lib.src: + ${source} ${"\\"} + % endfor + % endif + % endfor + , $ext_shared, , -Wall -Werror -std=c11 ${"\\"} + -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN ${"\\"} + -D_HAS_EXCEPTIONS=0 -DNOMINMAX) + fi diff --git a/templates/package.xml.template b/templates/package.xml.template new file mode 100644 index 0000000000..455b002e64 --- /dev/null +++ b/templates/package.xml.template @@ -0,0 +1,159 @@ +%YAML 1.2 +--- | + <?xml version="1.0" encoding="UTF-8"?> + <package packagerversion="1.9.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> + <name>grpc</name> + <channel>pecl.php.net</channel> + <summary>A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.</summary> + <description>Remote Procedure Calls (RPCs) provide a useful abstraction for building distributed applications and services. The libraries in this repository provide a concrete implementation of the gRPC protocol, layered over HTTP/2. These libraries enable communication between clients and servers using any combination of the supported languages.</description> + <lead> + <name>Stanley Cheung</name> + <user>stanleycheung</user> + <email>grpc-packages@google.com</email> + <active>yes</active> + </lead> + <%! from time import strftime %><date>${"%Y-%m-%d" | strftime}</date> + <time>16:06:07</time> + <version> + <release>0.8.0</release> + <api>0.8.0</api> + </version> + <stability> + <release>beta</release> + <api>beta</api> + </stability> + <license>BSD</license> + <notes> + - Simplify gRPC PHP installation #4517 + </notes> + <contents> + <dir baseinstalldir="/" name="/"> + <file baseinstalldir="/" name="config.m4" role="src" /> + <file baseinstalldir="/" name="src/php/ext/grpc/CREDITS" role="src" /> + <file baseinstalldir="/" name="src/php/ext/grpc/LICENSE" role="src" /> + <file baseinstalldir="/" name="src/php/ext/grpc/README.md" role="src" /> + % for source in php_config_m4.src + php_config_m4.headers: + <file baseinstalldir="/" name="${source}" role="src" /> + % endfor + % for lib in libs: + % if lib.name in php_config_m4.get('deps', []): + % for source in lib.get('public_headers', []) + lib.headers + lib.src: + <file baseinstalldir="/" name="${source}" role="src" /> + % endfor + % endif + % endfor + </dir> + </contents> + <dependencies> + <required> + <php> + <min>5.5.0</min> + </php> + <pearinstaller> + <min>1.4.0</min> + </pearinstaller> + </required> + </dependencies> + <providesextension>grpc</providesextension> + <extsrcrelease /> + <changelog> + <release> + <version> + <release>0.5.0</release> + <api>0.5.0</api> + </version> + <stability> + <release>alpha</release> + <api>alpha</api> + </stability> + <date>2015-06-16</date> + <license>BSD</license> + <notes> + First alpha release + </notes> + </release> + <release> + <version> + <release>0.5.1</release> + <api>0.5.1</api> + </version> + <stability> + <release>alpha</release> + <api>alpha</api> + </stability> + <date>2015-07-09</date> + <license>BSD</license> + <notes> + Update to wrap gRPC C Core version 0.10.0 + </notes> + </release> + <release> + <version> + <release>0.6.0</release> + <api>0.6.0</api> + </version> + <stability> + <release>beta</release> + <api>beta</api> + </stability> + <date>2015-09-24</date> + <license>BSD</license> + <notes> + - support per message compression disable + - expose per-call host override option + - expose connectivity API + - expose channel target and call peer + - add user-agent + - update to wrap gRPC C core library beta version 0.11.0 + </notes> + </release> + <release> + <version> + <release>0.6.1</release> + <api>0.6.0</api> + </version> + <stability> + <release>beta</release> + <api>beta</api> + </stability> + <date>2015-10-21</date> + <license>BSD</license> + <notes> + - fixed undefined constant fatal error when run with apache/nginx #2275 + </notes> + </release> + <release> + <version> + <release>0.7.0</release> + <api>0.7.0</api> + </version> + <stability> + <release>beta</release> + <api>beta</api> + </stability> + <date>2016-01-13</date> + <license>BSD</license> + <notes> + - Breaking change to Credentials class (removed) #3765 + - Replaced by ChannelCredentials and CallCredentials class #3765 + - New plugin based metadata auth API #4394 + - Explicit ChannelCredentials::createInsecure() call + </notes> + </release> + <release> + <version> + <release>0.8.0</release> + <api>0.8.0</api> + </version> + <stability> + <release>beta</release> + <api>beta</api> + </stability> + <date>${"%Y-%m-%d" | strftime}</date> + <license>BSD</license> + <notes> + - Simplify gRPC PHP installation #4517 + </notes> + </release> + </changelog> + </package> |