Skip to content

Commit e16e489

Browse files
authored
Merge pull request #5 from firebase/nc/add-podspec
[CocoaPods] Add podspec
2 parents 9d108e9 + ce029bb commit e16e489

File tree

3 files changed

+94
-13
lines changed

3 files changed

+94
-13
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
spm:
13+
runs-on: macOS-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Build
17+
run: swift build
18+
19+
cocoapods:
20+
strategy:
21+
matrix:
22+
platform: [ios, tvos, macos, watchos]
23+
runs-on: macOS-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Build
27+
# Some header files import C++ headers, which causes linting failures
28+
# (https://github.com/CocoaPods/CocoaPods/issues/5152). As a
29+
# workaround, the `--skip-import-validation` is used.
30+
run: |
31+
pod lib lint leveldb-library.podspec \
32+
--platforms=${{ matrix.platform }} \
33+
--skip-import-validation

.github/workflows/spm.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

leveldb-library.podspec

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'leveldb-library'
3+
s.version = '1.22.3'
4+
s.license = 'New BSD'
5+
s.summary = 'A fast key-value storage library '
6+
s.description = 'LevelDB is a fast key-value storage library written at Google that provides ' +
7+
'an ordered mapping from string keys to string values.'
8+
s.homepage = 'https://github.com/google/leveldb'
9+
s.authors = 'The LevelDB Authors'
10+
11+
s.ios.deployment_target = '11.0'
12+
s.osx.deployment_target = '10.13'
13+
s.tvos.deployment_target = '11.0'
14+
s.watchos.deployment_target = '6.0'
15+
16+
s.source = {
17+
:git => 'https://github.com/firebase/leveldb.git',
18+
:tag => 'CocoaPods-' + s.version.to_s
19+
}
20+
21+
s.requires_arc = false
22+
23+
s.pod_target_xcconfig = {
24+
'GCC_PREPROCESSOR_DEFINITIONS' => 'LEVELDB_IS_BIG_ENDIAN=0 ' +
25+
'LEVELDB_PLATFORM_POSIX ' +
26+
'HAVE_FULLFSYNC=1',
27+
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"',
28+
29+
# Disable warnings introduced by Xcode 8.3 and Xcode 9
30+
# The deprecated-declarations is for OSMemoryBarrier on tvOS
31+
'WARNING_CFLAGS' => '-Wno-shorten-64-to-32 -Wno-comma -Wno-unreachable-code ' +
32+
'-Wno-conditional-uninitialized -Wno-deprecated-declarations',
33+
34+
# Prevent naming conflicts between leveldb headers and system headers
35+
'USE_HEADERMAP' => 'No',
36+
}
37+
38+
s.header_dir = "leveldb"
39+
s.source_files = [
40+
"db/*.{cc,h}",
41+
"port/*.{cc,h}",
42+
"table/*.{cc,h}",
43+
"util/*.{cc,h}",
44+
"include/leveldb/*.h"
45+
]
46+
47+
s.public_header_files = [
48+
"include/leveldb/*.h"
49+
]
50+
51+
s.exclude_files = [
52+
"**/*_test.cc",
53+
"**/*_bench.cc",
54+
"db/leveldbutil.cc",
55+
"util/env_windows.cc",
56+
"util/testutil.cc"
57+
]
58+
59+
s.library = 'c++'
60+
end
61+

0 commit comments

Comments
 (0)