Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 1 | Pod::Spec.new do |s| |
| 2 | s.name = 'gRPC' |
| 3 | s.version = '0.0.1' |
Vince Gatto | 167b972 | 2015-05-12 15:33:49 -0700 | [diff] [blame] | 4 | s.summary = 'Generic gRPC client library for iOS/OSX' |
Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 5 | s.homepage = 'https://www.grpc.io' |
| 6 | s.license = 'New BSD' |
murgatroid99 | 27c0bf4 | 2015-05-04 09:31:12 -0700 | [diff] [blame] | 7 | s.authors = { 'Jorge Canizales' => 'jcanizales@google.com', |
Jorge Canizales | 44fb295 | 2015-05-16 12:11:35 -0700 | [diff] [blame] | 8 | 'Michael Lumish' => 'mlumish@google.com' } |
Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 9 | |
| 10 | # s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => 'release-0_5_0' } |
Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 11 | |
Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 12 | s.ios.deployment_target = '6.0' |
Vince Gatto | 167b972 | 2015-05-12 15:33:49 -0700 | [diff] [blame] | 13 | s.osx.deployment_target = '10.8' |
Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 14 | s.requires_arc = true |
| 15 | |
Jorge Canizales | 045fabb | 2015-04-21 11:39:37 -0700 | [diff] [blame] | 16 | s.subspec 'RxLibrary' do |rs| |
Jorge Canizales | 8957cae | 2015-04-22 23:40:18 -0700 | [diff] [blame] | 17 | rs.summary = 'Reactive Extensions library for iOS.' |
Jorge Canizales | 045fabb | 2015-04-21 11:39:37 -0700 | [diff] [blame] | 18 | rs.authors = { 'Jorge Canizales' => 'jcanizales@google.com' } |
| 19 | |
Jorge Canizales | 146f177 | 2015-04-27 23:59:22 -0700 | [diff] [blame] | 20 | rs.source_files = 'src/objective-c/RxLibrary/*.{h,m}', |
| 21 | 'src/objective-c/RxLibrary/transformations/*.{h,m}', |
| 22 | 'src/objective-c/RxLibrary/private/*.{h,m}' |
Jorge Canizales | 045fabb | 2015-04-21 11:39:37 -0700 | [diff] [blame] | 23 | rs.private_header_files = 'src/objective-c/RxLibrary/private/*.h' |
| 24 | end |
| 25 | |
Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 26 | s.subspec 'C-Core' do |cs| |
Jorge Canizales | 8957cae | 2015-04-22 23:40:18 -0700 | [diff] [blame] | 27 | cs.summary = 'Core cross-platform gRPC library, written in C.' |
Jorge Canizales | ba37a3e | 2015-03-23 15:34:58 -0700 | [diff] [blame] | 28 | cs.authors = { 'Craig Tiller' => 'ctiller@google.com', |
| 29 | 'David Klempner' => 'klempner@google.com', |
| 30 | 'Nicolas Noble' => 'nnoble@google.com', |
Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 31 | 'Vijay Pai' => 'vpai@google.com', |
| 32 | 'Yang Gao' => 'yangg@google.com' } |
| 33 | |
| 34 | cs.source_files = 'src/core/**/*.{h,c}', 'include/grpc/*.h', 'include/grpc/**/*.h' |
| 35 | cs.private_header_files = 'src/core/**/*.h' |
| 36 | cs.header_mappings_dir = '.' |
| 37 | cs.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Build/gRPC" "$(PODS_ROOT)/Headers/Build/gRPC/include"' } |
| 38 | |
| 39 | cs.requires_arc = false |
| 40 | cs.libraries = 'z' |
| 41 | cs.dependency 'OpenSSL', '~> 1.0.200' |
| 42 | end |
| 43 | |
Jorge Canizales | 146f177 | 2015-04-27 23:59:22 -0700 | [diff] [blame] | 44 | # This is a workaround for Cocoapods Issue #1437. |
| 45 | # It renames time.h and string.h to grpc_time.h and grpc_string.h. |
| 46 | # It needs to be here (top-level) instead of in the C-Core subspec because Cocoapods doesn't run |
| 47 | # prepare_command's of subspecs. |
| 48 | s.prepare_command = <<-CMD |
| 49 | DIR_TIME="grpc/support" |
| 50 | BAD_TIME="$DIR_TIME/time.h" |
| 51 | GOOD_TIME="$DIR_TIME/grpc_time.h" |
| 52 | if [ -f "include/$BAD_TIME" ]; |
| 53 | then |
| 54 | grep -rl "$BAD_TIME" include/grpc src/core | xargs sed -i '' -e s@$BAD_TIME@$GOOD_TIME@g |
| 55 | mv "include/$BAD_TIME" "include/$GOOD_TIME" |
| 56 | fi |
| 57 | |
| 58 | DIR_STRING="src/core/support" |
| 59 | BAD_STRING="$DIR_STRING/string.h" |
| 60 | GOOD_STRING="$DIR_STRING/grpc_string.h" |
| 61 | if [ -f "$BAD_STRING" ]; |
| 62 | then |
| 63 | grep -rl "$BAD_STRING" include/grpc src/core | xargs sed -i '' -e s@$BAD_STRING@$GOOD_STRING@g |
| 64 | mv "$BAD_STRING" "$GOOD_STRING" |
| 65 | fi |
| 66 | CMD |
| 67 | |
Jorge Canizales | 8957cae | 2015-04-22 23:40:18 -0700 | [diff] [blame] | 68 | s.subspec 'GRPCClient' do |gs| |
| 69 | gs.summary = 'Objective-C wrapper around the core gRPC library.' |
Jorge Canizales | 44fb295 | 2015-05-16 12:11:35 -0700 | [diff] [blame] | 70 | gs.authors = { 'Jorge Canizales' => 'jcanizales@google.com', |
| 71 | 'Michael Lumish' => 'mlumish@google.com' } |
Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 72 | |
Jorge Canizales | 146f177 | 2015-04-27 23:59:22 -0700 | [diff] [blame] | 73 | gs.source_files = 'src/objective-c/GRPCClient/*.{h,m}', |
| 74 | 'src/objective-c/GRPCClient/private/*.{h,m}' |
Jorge Canizales | 8957cae | 2015-04-22 23:40:18 -0700 | [diff] [blame] | 75 | gs.private_header_files = 'src/objective-c/GRPCClient/private/*.h' |
Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 76 | |
Jorge Canizales | 8957cae | 2015-04-22 23:40:18 -0700 | [diff] [blame] | 77 | gs.dependency 'gRPC/C-Core' |
| 78 | # Is this needed in all dependents? |
| 79 | gs.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Public/gRPC/include"' } |
| 80 | gs.dependency 'gRPC/RxLibrary' |
Jorge Canizales | ba37a3e | 2015-03-23 15:34:58 -0700 | [diff] [blame] | 81 | |
Jorge Canizales | 8957cae | 2015-04-22 23:40:18 -0700 | [diff] [blame] | 82 | # Certificates, to be able to establish TLS connections: |
| 83 | gs.resource_bundles = { 'gRPC' => ['etc/roots.pem'] } |
| 84 | end |
| 85 | |
| 86 | s.subspec 'ProtoRPC' do |ps| |
| 87 | ps.summary = 'RPC library for ProtocolBuffers, based on gRPC' |
| 88 | ps.authors = { 'Jorge Canizales' => 'jcanizales@google.com' } |
| 89 | |
| 90 | ps.source_files = 'src/objective-c/ProtoRPC/*.{h,m}' |
| 91 | |
| 92 | ps.dependency 'gRPC/GRPCClient' |
| 93 | ps.dependency 'gRPC/RxLibrary' |
Jorge Canizales | 44fb295 | 2015-05-16 12:11:35 -0700 | [diff] [blame] | 94 | ps.dependency 'Protobuf', '~> 3.0' |
Jorge Canizales | 8957cae | 2015-04-22 23:40:18 -0700 | [diff] [blame] | 95 | end |
Jorge Canizales | c2d7ecb | 2015-02-27 01:22:41 -0800 | [diff] [blame] | 96 | end |