forked from yapstudios/YapDatabase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathYapDatabase.podspec
More file actions
332 lines (270 loc) · 13.1 KB
/
YapDatabase.podspec
File metadata and controls
332 lines (270 loc) · 13.1 KB
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
Pod::Spec.new do |s|
s.name = "YapDatabase"
s.version = "3.1.4"
s.summary = "A key/value store built atop sqlite for iOS & Mac."
s.homepage = "https://github.com/yapstudios/YapDatabase"
s.license = 'MIT'
s.author = {
"Robbie Hanson" => "robbiehanson@deusty.com"
}
s.source = {
:git => "https://github.com/yapstudios/YapDatabase.git",
:tag => s.version.to_s
}
s.osx.deployment_target = '10.10'
s.ios.deployment_target = '8.2'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '3.0'
s.libraries = 'c++'
s.default_subspecs = 'Standard'
#s.osx.module_map = 'Framework/Mac/module.modulemap'
#s.ios.module_map = 'Framework/iOS/module.modulemap'
#s.tvos.module_map = 'Framework/tvOS/module.modulemap'
#s.watchos.module_map = 'Framework/watchOS/module.modulemap'
# There are 2 primary flavors you can choose from:
#
# - "Standard" uses the builtin version of sqlite3
# - "SQLCipher" uses a version of sqlite3 compiled with SQLCipher included
#
# If you want to encrypt your database, you should choose "SQLCipher".
# For more information about setting up encryption, see the wiki article:
# https://github.com/yapstudios/YapDatabase/wiki/Encryption
#
# So if you wanted to import ALL of YapDatabase, you'd use one of these
#
# pod 'YapDatabase' <- Uses Standard
# pod 'YapDatabase/Standard'
# pod 'YapDatbaase/SQLCipher'
#
# In addition to this, you can optionally import ONLY the 'Core' of YapDatabase,
# and then pick-and-choose which individual extensions you want.
# This is helpful if you only use a few extensions,
# of if you're concerned about app-size or additional imports.
#
# To do so, you just need to be more explicit in your Podfile:
#
# // pod 'YapDatabase/Standard' <- This would import EVERYTHING
# pod 'YapDatabase/Standard/Core' <- Only the YapDatabase core
# pod 'YapDatabase/Standard/Extensions/AutoView' <- Just AutoView
# pod 'YapDatabase/Standard/Extensions/ConnectionPool' <- Just ConnectionPool
#
# This works exactly the same way if you're using the SQLCipher flavor:
#
# // pod 'YapDatabase/SQLCipher' <- This would import EVERYTHING
# pod 'YapDatabase/SQLCipher/Core' <- Only the YapDatabase core
# pod 'YapDatabase/SQLCipher/Extensions/AutoView' <- Just AutoView
# pod 'YapDatabase/SQLCipher/Extensions/ConnectionPool' <- Just ConnectionPool
#
# Enjoy, and remember to check the wiki for more information / documentation:
# https://github.com/yapstudios/YapDatabase/wiki
s.subspec 'Standard' do |ss|
ss.subspec 'Core' do |ssc|
ssc.xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DYAP_STANDARD_SQLITE' }
ssc.library = 'sqlite3'
ssc.dependency 'CocoaLumberjack'
ssc.source_files = 'YapDatabase/*.{h,m,mm,c}', 'YapDatabase/{Internal,Utilities}/*.{h,m,mm,c}', 'YapDatabase/Extensions/Protocol/**/*.{h,m,mm,c}'
ssc.private_header_files = 'YapDatabase/Internal/*.h'
end
ss.subspec 'Extensions' do |sse|
sse.dependency 'YapDatabase/Standard/Core'
sse.subspec 'View' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/View/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/View/Internal/*.h'
end
sse.subspec 'AutoView' do |ssee|
ssee.dependency 'YapDatabase/Standard/Extensions/View'
ssee.source_files = 'YapDatabase/Extensions/AutoView/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/AutoView/Internal/*.h'
end
sse.subspec 'ManualView' do |ssee|
ssee.dependency 'YapDatabase/Standard/Extensions/View'
ssee.source_files = 'YapDatabase/Extensions/ManualView/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/ManualView/Internal/*.h'
end
sse.subspec 'SecondaryIndex' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/SecondaryIndex/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/SecondaryIndex/Internal/*.h'
end
sse.subspec 'CrossProcessNotification' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/CrossProcessNotification/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/CrossProcessNotification/Internal/*.h'
end
sse.subspec 'Relationships' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/Relationships/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/Relationships/Internal/*.h'
end
sse.subspec 'FullTextSearch' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/FullTextSearch/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/FullTextSearch/Internal/*.h'
end
sse.subspec 'Hooks' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/Hooks/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/Hooks/Internal/*.h'
end
sse.subspec 'FilteredView' do |ssee|
ssee.dependency 'YapDatabase/Standard/Extensions/View'
ssee.source_files = 'YapDatabase/Extensions/FilteredView/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/FilteredView/Internal/*.h'
end
sse.subspec 'SearchResultsView' do |ssee|
ssee.dependency 'YapDatabase/Standard/Extensions/AutoView'
ssee.dependency 'YapDatabase/Standard/Extensions/FullTextSearch'
ssee.source_files = 'YapDatabase/Extensions/SearchResultsView/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/SearchResultsView/Internal/*.h'
end
sse.subspec 'CloudKit' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/CloudKit/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/CloudKit/Internal/*.h'
end
sse.subspec 'RTreeIndex' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/RTreeIndex/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/RTreeIndex/Internal/*.h'
end
sse.subspec 'ConnectionProxy' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/ConnectionProxy/**/*.{h,m,mm,c}'
end
sse.subspec 'ConnectionPool' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/ConnectionPool/**/*.{h,m,mm,c}'
end
sse.subspec 'ActionManager' do |ssee|
ssee.osx.framework = 'SystemConfiguration'
ssee.ios.framework = 'SystemConfiguration'
ssee.tvos.framework = 'SystemConfiguration'
ssee.dependency 'YapDatabase/Standard/Extensions/AutoView'
ssee.source_files = 'YapDatabase/Extensions/ActionManager/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/ActionManager/Internal/*.h'
end
sse.subspec 'CloudCore' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/CloudCore/**/*.{h,m,mm,c}'
end
end # Extensions
end #Standard
####################################################################################################
# The ModuleMap option is a workaround for Issue #479:
# https://github.com/yapstudios/YapDatabase/pull/479
#
# You may need to use this if:
# - You're using Swift
# - And you need to subclass YapDatabaseCloudCore (need access to private header files)
#
s.subspec 'Standard+ModuleMap' do |ss|
ss.osx.module_map = 'Framework/Mac/module.modulemap'
ss.ios.module_map = 'Framework/iOS/module.modulemap'
ss.tvos.module_map = 'Framework/tvOS/module.modulemap'
ss.watchos.module_map = 'Framework/watchOS/module.modulemap'
ss.xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DYAP_STANDARD_SQLITE' }
ss.library = 'sqlite3'
ss.dependency 'CocoaLumberjack'
ss.source_files = 'YapDatabase/*.{h,m,mm,c}', 'YapDatabase/{Internal,Utilities}/*.{h,m,mm,c}', 'YapDatabase/Extensions/**/*.{h,m,mm,c}'
ss.private_header_files = 'YapDatabase/Internal/*.h', 'YapDatabase/Extensions/**/Internal/*.h'
ss.osx.framework = 'SystemConfiguration'
ss.ios.framework = 'SystemConfiguration'
ss.tvos.framework = 'SystemConfiguration'
end #Standard+ModuleMap
####################################################################################################
# use SQLCipher and enable -DSQLITE_HAS_CODEC flag
s.subspec 'SQLCipher' do |ss|
ss.subspec 'Core' do |ssc|
ssc.xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_HAS_CODEC' }
ssc.dependency 'SQLCipher', '>= 3.4.0'
ssc.dependency 'CocoaLumberjack'
ssc.source_files = 'YapDatabase/*.{h,m,mm,c}', 'YapDatabase/{Internal,Utilities}/*.{h,m,mm,c}', 'YapDatabase/Extensions/Protocol/**/*.{h,m,mm,c}'
ssc.private_header_files = 'YapDatabase/Internal/*.h'
end
ss.subspec 'Extensions' do |sse|
sse.dependency 'YapDatabase/SQLCipher/Core'
sse.subspec 'View' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/View/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/View/Internal/*.h'
end
sse.subspec 'AutoView' do |ssee|
ssee.dependency 'YapDatabase/SQLCipher/Extensions/View'
ssee.source_files = 'YapDatabase/Extensions/AutoView/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/AutoView/Internal/*.h'
end
sse.subspec 'ManualView' do |ssee|
ssee.dependency 'YapDatabase/SQLCipher/Extensions/View'
ssee.source_files = 'YapDatabase/Extensions/ManualView/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/ManualView/Internal/*.h'
end
sse.subspec 'SecondaryIndex' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/SecondaryIndex/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/SecondaryIndex/Internal/*.h'
end
sse.subspec 'CrossProcessNotification' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/CrossProcessNotification/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/CrossProcessNotification/Internal/*.h'
end
sse.subspec 'Relationships' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/Relationships/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/Relationships/Internal/*.h'
end
sse.subspec 'FullTextSearch' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/FullTextSearch/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/FullTextSearch/Internal/*.h'
end
sse.subspec 'Hooks' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/Hooks/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/Hooks/Internal/*.h'
end
sse.subspec 'FilteredView' do |ssee|
ssee.dependency 'YapDatabase/SQLCipher/Extensions/View'
ssee.source_files = 'YapDatabase/Extensions/FilteredView/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/FilteredView/Internal/*.h'
end
sse.subspec 'SearchResultsView' do |ssee|
ssee.dependency 'YapDatabase/SQLCipher/Extensions/AutoView'
ssee.dependency 'YapDatabase/SQLCipher/Extensions/FullTextSearch'
ssee.source_files = 'YapDatabase/Extensions/SearchResultsView/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/SearchResultsView/Internal/*.h'
end
sse.subspec 'CloudKit' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/CloudKit/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/CloudKit/Internal/*.h'
end
sse.subspec 'RTreeIndex' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/RTreeIndex/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/RTreeIndex/Internal/*.h'
end
sse.subspec 'ConnectionProxy' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/ConnectionProxy/**/*.{h,m,mm,c}'
end
sse.subspec 'ConnectionPool' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/ConnectionPool/**/*.{h,m,mm,c}'
end
sse.subspec 'ActionManager' do |ssee|
ssee.osx.framework = 'SystemConfiguration'
ssee.ios.framework = 'SystemConfiguration'
ssee.tvos.framework = 'SystemConfiguration'
ssee.dependency 'YapDatabase/SQLCipher/Extensions/AutoView'
ssee.source_files = 'YapDatabase/Extensions/ActionManager/**/*.{h,m,mm,c}'
ssee.private_header_files = 'YapDatabase/Extensions/ActionManager/Internal/*.h'
end
sse.subspec 'CloudCore' do |ssee|
ssee.source_files = 'YapDatabase/Extensions/CloudCore/**/*.{h,m,mm,c}'
end
end # Extensions
end # SQLCipher
####################################################################################################
# The ModuleMap option is a workaround for Issue #479:
# https://github.com/yapstudios/YapDatabase/pull/479
#
# You may need to use this if:
# - You're using Swift
# - And you need to subclass YapDatabaseCloudCore (need access to private header files)
#
s.subspec 'SQLCipher+ModuleMap' do |ss|
ss.osx.module_map = 'Framework/Mac/module.modulemap'
ss.ios.module_map = 'Framework/iOS/module.modulemap'
ss.tvos.module_map = 'Framework/tvOS/module.modulemap'
ss.watchos.module_map = 'Framework/watchOS/module.modulemap'
ss.xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_HAS_CODEC' }
ss.dependency 'SQLCipher', '>= 3.4.0'
ss.dependency 'CocoaLumberjack'
ss.source_files = 'YapDatabase/*.{h,m,mm,c}', 'YapDatabase/{Internal,Utilities}/*.{h,m,mm,c}', 'YapDatabase/Extensions/**/*.{h,m,mm,c}'
ss.private_header_files = 'YapDatabase/Internal/*.h', 'YapDatabase/Extensions/**/Internal/*.h'
ss.osx.framework = 'SystemConfiguration'
ss.ios.framework = 'SystemConfiguration'
ss.tvos.framework = 'SystemConfiguration'
end #SQLCipher+ModuleMap
end