Muxi Yan | 27e9db4 | 2017-01-30 09:21:05 -0800 | [diff] [blame] | 1 | # This file has been automatically generated from a template file. |
| 2 | # Please make modifications to |
| 3 | # `templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template` |
| 4 | # instead. This file can be regenerated from the template by running |
| 5 | # `tools/buildgen/generate_projects.sh`. |
Jorge Canizales | 6eade6d | 2016-07-11 00:34:14 -0700 | [diff] [blame] | 6 | |
Muxi Yan | 27e9db4 | 2017-01-30 09:21:05 -0800 | [diff] [blame] | 7 | # CocoaPods podspec for the gRPC Proto Compiler Plugin |
| 8 | # |
Jorge Canizales | 6eade6d | 2016-07-11 00:34:14 -0700 | [diff] [blame] | 9 | # Copyright 2016, Google Inc. |
| 10 | # All rights reserved. |
| 11 | # |
| 12 | # Redistribution and use in source and binary forms, with or without |
| 13 | # modification, are permitted provided that the following conditions are |
| 14 | # met: |
| 15 | # |
| 16 | # * Redistributions of source code must retain the above copyright |
| 17 | # notice, this list of conditions and the following disclaimer. |
| 18 | # * Redistributions in binary form must reproduce the above |
| 19 | # copyright notice, this list of conditions and the following disclaimer |
| 20 | # in the documentation and/or other materials provided with the |
| 21 | # distribution. |
| 22 | # * Neither the name of Google Inc. nor the names of its |
| 23 | # contributors may be used to endorse or promote products derived from |
| 24 | # this software without specific prior written permission. |
| 25 | # |
| 26 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 27 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 28 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 29 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 30 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 31 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 32 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 33 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 34 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 35 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 36 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 37 | |
| 38 | Pod::Spec.new do |s| |
| 39 | # This pod is only a utility that will be used by other pods _at install time_ (not at compile |
| 40 | # time). Other pods can access it in their `prepare_command` script, under <pods_root>/<pod name>. |
| 41 | # Because CocoaPods installs pods in alphabetical order, beginning this pod's name with an |
| 42 | # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed |
| 43 | # before them. |
| 44 | s.name = '!ProtoCompiler-gRPCPlugin' |
Srini Polavarapu | 8c9af74 | 2018-07-19 09:52:56 -0700 | [diff] [blame] | 45 | v = '1.15.0-dev' |
Jorge Canizales | 4a18c67 | 2016-08-18 13:26:25 -0700 | [diff] [blame] | 46 | s.version = v |
Jorge Canizales | 6eade6d | 2016-07-11 00:34:14 -0700 | [diff] [blame] | 47 | s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.' |
| 48 | s.description = <<-DESC |
| 49 | This podspec only downloads the gRPC protoc plugin so that local pods generating protos can use |
| 50 | it in their invocation of protoc, as part of their prepare_command. |
| 51 | The generated code will have a dependency on the gRPC Objective-C Proto runtime of the same |
| 52 | version. The runtime can be obtained as the "gRPC-ProtoRPC" pod. |
| 53 | DESC |
Mehrdad Afshari | bb3d95b | 2017-07-10 22:24:28 +0000 | [diff] [blame] | 54 | s.homepage = 'https://grpc.io' |
Jorge Canizales | eb3ebc5 | 2016-07-11 10:15:46 -0700 | [diff] [blame] | 55 | s.license = { |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 56 | :type => 'Apache License, Version 2.0', |
Jorge Canizales | eb3ebc5 | 2016-07-11 10:15:46 -0700 | [diff] [blame] | 57 | :text => <<-LICENSE |
| 58 | Copyright 2015, Google Inc. |
| 59 | All rights reserved. |
| 60 | |
| 61 | Redistribution and use in source and binary forms, with or without |
| 62 | modification, are permitted provided that the following conditions are |
| 63 | met: |
| 64 | |
| 65 | * Redistributions of source code must retain the above copyright |
| 66 | notice, this list of conditions and the following disclaimer. |
| 67 | * Redistributions in binary form must reproduce the above |
| 68 | copyright notice, this list of conditions and the following disclaimer |
| 69 | in the documentation and/or other materials provided with the |
| 70 | distribution. |
| 71 | * Neither the name of Google Inc. nor the names of its |
| 72 | contributors may be used to endorse or promote products derived from |
| 73 | this software without specific prior written permission. |
| 74 | |
| 75 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 76 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 77 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 78 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 79 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 80 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 81 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 82 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 83 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 84 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 85 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 86 | LICENSE |
| 87 | } |
Jorge Canizales | 6eade6d | 2016-07-11 00:34:14 -0700 | [diff] [blame] | 88 | s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } |
| 89 | |
Muxi Yan | d54e1bc | 2016-10-24 12:54:54 -0700 | [diff] [blame] | 90 | repo = 'grpc/grpc' |
Jorge Canizales | 6eade6d | 2016-07-11 00:34:14 -0700 | [diff] [blame] | 91 | file = "grpc_objective_c_plugin-#{v}-macos-x86_64.zip" |
| 92 | s.source = { |
Muxi Yan | 690aee6 | 2017-01-27 02:52:47 +0000 | [diff] [blame] | 93 | :http => "https://github.com/#{repo}/releases/download/v#{v}/#{file}", |
Jorge Canizales | 6eade6d | 2016-07-11 00:34:14 -0700 | [diff] [blame] | 94 | # TODO(jcanizales): Add sha1 or sha256 |
| 95 | # :sha1 => '??', |
| 96 | } |
| 97 | |
| 98 | repo_root = '../..' |
| 99 | plugin = 'grpc_objective_c_plugin' |
| 100 | |
| 101 | s.preserve_paths = plugin |
| 102 | |
| 103 | # Restrict the protoc version to the one supported by this plugin. |
Muxi Yan | e641196 | 2017-11-29 18:22:01 -0800 | [diff] [blame] | 104 | s.dependency '!ProtoCompiler', '3.5.0' |
Jorge Canizales | eb3ebc5 | 2016-07-11 10:15:46 -0700 | [diff] [blame] | 105 | # For the Protobuf dependency not to complain: |
Muxi Yan | 37d3fba | 2017-02-28 16:14:40 -0800 | [diff] [blame] | 106 | s.ios.deployment_target = '7.0' |
Jorge Canizales | eb3ebc5 | 2016-07-11 10:15:46 -0700 | [diff] [blame] | 107 | s.osx.deployment_target = '10.9' |
Jorge Canizales | 6eade6d | 2016-07-11 00:34:14 -0700 | [diff] [blame] | 108 | # Restrict the gRPC runtime version to the one supported by this plugin. |
| 109 | s.dependency 'gRPC-ProtoRPC', v |
| 110 | |
| 111 | # This is only for local development of the plugin: If the Podfile brings this pod from a local |
| 112 | # directory using `:path`, CocoaPods won't download the zip file and so the plugin won't be |
| 113 | # present in this pod's directory. We use that knowledge to check for the existence of the file |
| 114 | # and, if absent, compile the plugin from the local sources. |
| 115 | s.prepare_command = <<-CMD |
| 116 | if [ ! -f #{plugin} ]; then |
| 117 | cd #{repo_root} |
| 118 | # This will build the plugin and put it in #{repo_root}/bins/opt. |
| 119 | # |
| 120 | # TODO(jcanizales): I reckon make will try to use locally-installed libprotoc (headers and |
| 121 | # library binary) if found, which _we do not want_. Find a way for this to always use the |
| 122 | # sources in the repo. |
| 123 | make #{plugin} |
| 124 | cd - |
| 125 | fi |
| 126 | CMD |
| 127 | end |