forked from robbiehanson/XMPPFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXMPPFramework.podspec
More file actions
59 lines (51 loc) · 2.73 KB
/
XMPPFramework.podspec
File metadata and controls
59 lines (51 loc) · 2.73 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
Pod::Spec.new do |s|
s.name = 'XMPPFramework'
s.version = '3.7.2'
s.ios.deployment_target = '8.0'
s.license = { :type => 'BSD', :file => 'copying.txt' }
s.summary = 'An XMPP Framework in Objective-C for the Mac / iOS development community.'
s.homepage = 'https://github.com/robbiehanson/XMPPFramework'
s.author = { 'Robbie Hanson' => 'robbiehanson@deusty.com' }
s.source = { :git => 'https://github.com/GoodWorkApps/XMPPFramework.git', :tag => '3.7.2' }
s.resources = [ '**/*.{xcdatamodel,xcdatamodeld}']
s.description = 'XMPPFramework provides a core implementation of RFC-3920 (the xmpp standard), along with
the tools needed to read & write XML. It comes with multiple popular extensions (XEPs),
all built atop a modular architecture, allowing you to plug-in any code needed for the job.
Additionally the framework is massively parallel and thread-safe. Structured using GCD,
this framework performs well regardless of whether it\'s being run on an old iPhone, or
on a 12-core Mac Pro. (And it won\'t block the main thread... at all).'
s.requires_arc = true
# XMPPFramework.h is used internally in the framework to let modules know
# what other optional modules are available. Since we don't know yet which
# subspecs have been selected, include all of them wrapped in defines which
# will be set by the relevant subspecs.
s.prepare_command = <<-'END'
echo '#import "XMPP.h"' > XMPPFramework.h
grep '#define _XMPP_' -r Extensions \
| tr '-' '_' \
| perl -pe 's/Extensions\/([A-z0-9_]*)\/([A-z]*.h).*/\n#ifdef HAVE_XMPP_SUBSPEC_\U\1\n\E#import "\2"\n#endif/' \
>> XMPPFramework.h
END
s.subspec 'Core' do |core|
core.source_files = ['XMPPFramework.h', 'Core/**/*.{h,m}','Vendor/libidn/*.h', 'Authentication/**/*.{h,m}', 'Categories/**/*.{h,m}', 'Vendor/KissXML/**/*.{h,m}', 'Utilities/**/*.{h,m}', ]
core.vendored_libraries = 'Vendor/libidn/libidn.a'
core.libraries = 'xml2','resolv'
core.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2 $(SDKROOT)/usr/include/libresolv',
'LIBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/XMPPFramework/Vendor/libidn"'}
core.dependency 'CocoaLumberjack','~>1.6.2'
core.dependency 'CocoaAsyncSocket','~>7.3.1'
end
def s.xmpp_extension(name)
subspec name do |ss|
ss.source_files = "Extensions/#{name}/**/*.{h,m}"
ss.dependency 'XMPPFramework/Core'
ss.prefix_header_contents = "#define HAVE_XMPP_SUBSPEC_#{name.upcase.sub('-', '_')}"
yield ss if block_given?
end
end
s.xmpp_extension 'Reconnect' do |r|
r.framework = 'SystemConfiguration'
end
s.xmpp_extension 'XEP-0199'
s.xmpp_extension 'XEP-0198'
end