forked from cloudant/CDTDatastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCDTDatastore.podspec
118 lines (87 loc) · 4.4 KB
/
CDTDatastore.podspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
license = <<EOT
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
EOT
Pod::Spec.new do |s|
s.name = "CDTDatastore"
s.version = "0.17.1"
s.summary = "CDTDatastore is a document datastore which syncs."
s.description = <<-DESC
CDTDatastore is a JSON document datastore which speaks the
Apache CouchDB(tm) replication protocol.
* Replicates with Cloudant and CouchDB.
DESC
s.homepage = "http://cloudant.github.io/cloudant-sync-eap"
s.license = {:type => 'Apache', :text => license}
s.author = { "Cloudant, Inc." => "[email protected]" }
s.source = { :git => "https://github.com/cloudant/CDTDatastore.git", :tag => s.version.to_s }
s.ios.deployment_target = '6.0'
s.osx.deployment_target = '10.8'
s.requires_arc = true
s.default_subspec = 'standard'
s.subspec 'standard' do |sp|
# DUPLICATED CODE - Check subspec 'SQLCipher' - BEGIN
# CDTDatastore code depends on FMDB, without this dependency the code will
# not compile ('pod lib lint' will fail). FMDB can be compiled based on
# SQLite or SQLCipher and we want to offer both options. To do that, we have
# to define 2 subspecs and specify in both the CDTDatastore code and one of
# FMDB subspecs.
# If you try to make one of the subspecs to depend on the other to avoid the
# duplicated code, the resulting subspec will include at the same time
# SQLite and SQLCipher.
sp.prefix_header_contents = '#import "CollectionUtils.h"', '#import "Logging.h"', '#import "Test.h"', '#import "CDTMacros.h"'
sp.source_files = 'Classes/**/*.{h,m}'
sp.exclude_files = 'Classes/vendor/MYUtilities/*.{h,m}'
sp.ios.exclude_files = 'Classes/osx'
sp.osx.exclude_files = 'Classes/ios'
sp.dependency 'CDTDatastore/common-dependencies'
# DUPLICATED CODE - Check subspec 'SQLCipher' - END
sp.library = 'sqlite3', 'z'
sp.dependency 'FMDB', '= 2.3'
end
s.subspec 'SQLCipher' do |sp|
# DUPLICATED CODE - Check subspec 'standard' - BEGIN
# CDTDatastore code depends on FMDB, without this dependency the code will
# not compile ('pod lib lint' will fail). FMDB can be compiled based on
# SQLite or SQLCipher and we want to offer both options. To do that, we have
# to define 2 subspecs and specify in both the CDTDatastore code and one of
# FMDB subspecs.
# If you try to make one of the subspecs to depend on the other to avoid the
# duplicated code, the resulting subspec will include at the same time
# SQLite and SQLCipher.
sp.prefix_header_contents = '#import "CollectionUtils.h"', '#import "Logging.h"', '#import "Test.h"', '#import "CDTMacros.h"'
sp.source_files = 'Classes/**/*.{h,m}'
sp.exclude_files = 'Classes/vendor/MYUtilities/*.{h,m}'
sp.ios.exclude_files = 'Classes/osx'
sp.osx.exclude_files = 'Classes/ios'
sp.dependency 'CDTDatastore/common-dependencies'
# DUPLICATED CODE - Check subspec 'standard' - END
sp.xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DENCRYPT_DATABASE' }
sp.library = 'z'
sp.dependency 'FMDB/SQLCipher', '= 2.3'
# Some CDTDatastore classes use SQLite functions, therefore we have
# to include 'SQLCipher' although 'FMDB/SQLCipher' also depends on it
# or they will not compile (linker will not find some symbols).
# Also, we have to force cocoapods to configure SQLCipher with support
# for FTS.
sp.dependency 'SQLCipher/fts', '~> 3.1.0'
end
s.subspec 'common-dependencies' do |sp|
sp.frameworks = 'SystemConfiguration'
sp.dependency 'CDTDatastore/no-arc'
sp.dependency 'CocoaLumberjack', '~> 2.0'
end
s.subspec 'no-arc' do |sp|
sp.requires_arc = false
sp.prefix_header_contents = '#import "CollectionUtils.h"', '#import "Logging.h"', '#import "Test.h"'
sp.source_files = 'Classes/vendor/MYUtilities/*.{h,m}'
sp.ios.exclude_files = 'Classes/vendor/MYUtilities/MYURLHandler.{h,m}'
end
end