forked from CocoaPods/Specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Analyzed 1 podspec. TouchDB.podspec passed validation.
- Loading branch information
1 parent
acdf552
commit e8c60ec
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
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| | ||
version = '1.0' | ||
|
||
|
||
s.name = 'TouchDB' | ||
s.version = version | ||
s.license = {:type => 'Apache', :text => license} | ||
s.summary = 'CouchDB-compatible mobile database; Objective-C version.' | ||
s.homepage = 'https://github.com/couchbaselabs/TouchDB-iOS' | ||
s.author = { 'Jens Alfke' => 'jens@couchbase.com' } | ||
|
||
s.source = { :git => 'https://github.com/couchbaselabs/TouchDB-iOS.git', | ||
:tag => "v#{version}", | ||
:submodules => "true" } | ||
|
||
s.platform = :ios, '5.0' | ||
|
||
|
||
s.source_files = FileList['Source/**/*.{h,m}'].exclude(/GNUstep/).exclude(/_Tests/), | ||
FileList['vendor/oauthconsumer/**/*.{h,m,c}'].exclude(/OAHMAC_SHA1SignatureProvider\.m/), | ||
FileList['vendor/fmdb/src/**/*.{h,m}'] | ||
|
||
s.header_dir = 'TouchDB' | ||
|
||
def s.post_install(target) | ||
src = config.project_pods_root.to_s() + '/TouchDB/Source' | ||
|
||
# Prepend some headers manually. The regular build does this with a prefix header, but | ||
# that pollutes the global namespace. (and conflicts with CouchCocoa) | ||
Dir.glob(src + '/**/*.m').each { |path| | ||
File.open( path, 'r+') { |f| | ||
firstLine = f.readline() | ||
if firstLine =~ /patched/ | ||
next | ||
end | ||
f.rewind | ||
|
||
content = f.readlines() | ||
f.rewind | ||
|
||
f.puts '// patched during Pod install' | ||
f.puts '#import "TDJSON.h"' | ||
f.puts '#import "CollectionUtils.h"' | ||
f.puts '#import "Logging.h"' | ||
f.puts '#import "Test.h"' | ||
|
||
# add the version symbols to an arbitrary .m file | ||
if path =~ /TDServer\.m/ | ||
f.puts "const unsigned char TouchDBVersionString[] __attribute__ ((used)) = \"@(#)PROGRAM:TouchDB PROJECT:TouchDB-#{version}\";" | ||
f.puts "const double TouchDBVersionNumber __attribute__ ((used)) = (double)#{version};" | ||
end | ||
|
||
f.puts | ||
f.puts content | ||
} | ||
} | ||
end | ||
|
||
s.dependency 'CocoaHTTPServer' | ||
s.dependency 'MYUtilities' | ||
s.dependency 'JSONKit' | ||
|
||
s.framework = 'SystemConfiguration' | ||
s.library = 'sqlite3' | ||
end |