OLD | NEW |
(Empty) | |
| 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 |
| 8 |
| 9 # Copyright 2015, 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 <%! |
| 39 def grpc_files(libs): |
| 40 out = [] |
| 41 for lib in libs: |
| 42 if lib.name in ("grpc", "gpr"): |
| 43 out += lib.get('headers', []) |
| 44 out += lib.get('public_headers', []) |
| 45 out += lib.get('src', []) |
| 46 return out; |
| 47 |
| 48 def grpc_private_headers(libs): |
| 49 out = [] |
| 50 for lib in libs: |
| 51 if lib.name in ("grpc", "gpr"): |
| 52 out += lib.get('headers', []) |
| 53 return out |
| 54 %> |
| 55 Pod::Spec.new do |s| |
| 56 s.name = 'gRPC' |
| 57 version = '0.12.0' |
| 58 s.version = version |
| 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' } |
| 63 |
| 64 s.source = { :git => 'https://github.com/grpc/grpc.git', |
| 65 :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{versio
n}" } |
| 66 |
| 67 |
| 68 s.ios.deployment_target = '7.1' |
| 69 s.osx.deployment_target = '10.9' |
| 70 s.requires_arc = true |
| 71 |
| 72 objc_dir = 'src/objective-c' |
| 73 |
| 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 |
| 81 |
| 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))} |
| 85 |
| 86 ss.private_header_files = ${(',\n' + 30*' ').join('\'%s\'' % f for f in gr
pc_private_headers(libs))} |
| 87 |
| 88 ss.header_mappings_dir = '.' |
| 89 # This isn't officially supported in Cocoapods. We've asked for an alterna
tive: |
| 90 # https://github.com/CocoaPods/CocoaPods/issues/4386 |
| 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 } |
| 97 |
| 98 ss.requires_arc = false |
| 99 ss.libraries = 'z' |
| 100 ss.dependency 'BoringSSL', '~> 2.0' |
| 101 |
| 102 # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' |
| 103 end |
| 104 |
| 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}" |
| 111 |
| 112 ss.dependency 'gRPC/C-Core' |
| 113 ss.dependency 'gRPC/RxLibrary' |
| 114 |
| 115 # Certificates, to be able to establish TLS connections: |
| 116 ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] } |
| 117 end |
| 118 |
| 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}" |
| 124 |
| 125 ss.dependency 'gRPC/GRPCClient' |
| 126 ss.dependency 'gRPC/RxLibrary' |
| 127 ss.dependency 'Protobuf', '~> 3.0.0-alpha-4' |
| 128 end |
| 129 end |
OLD | NEW |