Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 1 | %YAML 1.2 |
| 2 | --- | |
| 3 | # GRPC CocoaPods podspec |
| 4 | # This file has been automatically generated from a template file. |
| 5 | # Please look at the templates directory instead. |
| 6 | # This file can be regenerated from the template by running |
| 7 | # tools/buildgen/generate_projects.sh |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 8 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 9 | # Copyright 2015, Google Inc. |
| 10 | # All rights reserved. |
Nicolas "Pixel" Noble | b4f35c0 | 2015-06-15 22:32:00 +0200 | [diff] [blame] | 11 | # |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 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. |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 37 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 38 | <%! |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 39 | def grpc_files(libs): |
| 40 | out = [] |
| 41 | for lib in libs: |
Craig Tiller | da179ce | 2016-02-09 12:01:53 -0800 | [diff] [blame] | 42 | if lib.name in ("grpc", "gpr"): |
Jorge Canizales | 0c8a3d8 | 2015-10-13 13:04:54 -0700 | [diff] [blame] | 43 | out += lib.get('headers', []) |
| 44 | out += lib.get('public_headers', []) |
| 45 | out += lib.get('src', []) |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 46 | return out; |
| 47 | |
| 48 | def grpc_private_headers(libs): |
| 49 | out = [] |
| 50 | for lib in libs: |
Craig Tiller | da179ce | 2016-02-09 12:01:53 -0800 | [diff] [blame] | 51 | if lib.name in ("grpc", "gpr"): |
Jorge Canizales | 0c8a3d8 | 2015-10-13 13:04:54 -0700 | [diff] [blame] | 52 | out += lib.get('headers', []) |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 53 | return out |
| 54 | %> |
| 55 | Pod::Spec.new do |s| |
| 56 | s.name = 'gRPC' |
Jorge Canizales | 42fe14a | 2015-12-01 09:34:46 -0800 | [diff] [blame] | 57 | version = '0.12.0' |
Jorge Canizales | 423f412 | 2015-09-29 14:11:44 -0700 | [diff] [blame] | 58 | s.version = version |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 59 | s.summary = 'gRPC client library for iOS/OSX' |
| 60 | s.homepage = 'http://www.grpc.io' |
| 61 | s.license = 'New BSD' |
| 62 | s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } |
Jorge Canizales | 423f412 | 2015-09-29 14:11:44 -0700 | [diff] [blame] | 63 | |
| 64 | s.source = { :git => 'https://github.com/grpc/grpc.git', |
| 65 | :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}" } |
| 66 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 67 | |
Craig Tiller | a32cd49 | 2015-09-11 12:28:10 -0700 | [diff] [blame] | 68 | s.ios.deployment_target = '7.1' |
| 69 | s.osx.deployment_target = '10.9' |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 70 | s.requires_arc = true |
| 71 | |
| 72 | objc_dir = 'src/objective-c' |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 73 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 74 | # Reactive Extensions library for iOS. |
| 75 | s.subspec 'RxLibrary' do |ss| |
| 76 | src_dir = "#{objc_dir}/RxLibrary" |
| 77 | ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" |
| 78 | ss.private_header_files = "#{src_dir}/private/*.h" |
| 79 | ss.header_mappings_dir = "#{objc_dir}" |
| 80 | end |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 81 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 82 | # Core cross-platform gRPC library, written in C. |
| 83 | s.subspec 'C-Core' do |ss| |
| 84 | ss.source_files = ${(',\n' + 22*' ').join('\'%s\'' % f for f in grpc_files(libs))} |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 85 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 86 | ss.private_header_files = ${(',\n' + 30*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 87 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 88 | ss.header_mappings_dir = '.' |
Jorge Canizales | 56482bc | 2015-10-13 19:09:25 -0700 | [diff] [blame] | 89 | # This isn't officially supported in Cocoapods. We've asked for an alternative: |
| 90 | # https://github.com/CocoaPods/CocoaPods/issues/4386 |
Jorge Canizales | 10622a8 | 2015-10-28 07:10:47 -0700 | [diff] [blame] | 91 | ss.xcconfig = { |
| 92 | 'USE_HEADERMAP' => 'NO', |
| 93 | 'ALWAYS_SEARCH_USER_PATHS' => 'NO', |
| 94 | 'USER_HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC"', |
| 95 | 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC/include"' |
| 96 | } |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 97 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 98 | ss.requires_arc = false |
| 99 | ss.libraries = 'z' |
Jorge Canizales | 38cc4a4 | 2016-01-25 15:53:03 -0800 | [diff] [blame] | 100 | ss.dependency 'BoringSSL', '~> 2.0' |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 101 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 102 | # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' |
| 103 | end |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 104 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 105 | # Objective-C wrapper around the core gRPC library. |
| 106 | s.subspec 'GRPCClient' do |ss| |
| 107 | src_dir = "#{objc_dir}/GRPCClient" |
| 108 | ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" |
| 109 | ss.private_header_files = "#{src_dir}/private/*.h" |
| 110 | ss.header_mappings_dir = "#{objc_dir}" |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 111 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 112 | ss.dependency 'gRPC/C-Core' |
| 113 | ss.dependency 'gRPC/RxLibrary' |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 114 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 115 | # Certificates, to be able to establish TLS connections: |
| 116 | ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] } |
| 117 | end |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 118 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 119 | # RPC library for ProtocolBuffers, based on gRPC |
| 120 | s.subspec 'ProtoRPC' do |ss| |
| 121 | src_dir = "#{objc_dir}/ProtoRPC" |
| 122 | ss.source_files = "#{src_dir}/*.{h,m}" |
| 123 | ss.header_mappings_dir = "#{objc_dir}" |
Jorge Canizales | aff5664 | 2015-10-12 19:31:25 -0700 | [diff] [blame] | 124 | |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 125 | ss.dependency 'gRPC/GRPCClient' |
| 126 | ss.dependency 'gRPC/RxLibrary' |
Craig Tiller | a32cd49 | 2015-09-11 12:28:10 -0700 | [diff] [blame] | 127 | ss.dependency 'Protobuf', '~> 3.0.0-alpha-4' |
Craig Tiller | 1ebb7c8 | 2015-08-31 15:53:36 -0700 | [diff] [blame] | 128 | end |
Nicolas "Pixel" Noble | b4f35c0 | 2015-06-15 22:32:00 +0200 | [diff] [blame] | 129 | end |