-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
139 lines (135 loc) · 4.12 KB
/
Package.swift
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
// swift-tools-version:6.0
import PackageDescription
extension Product.Library.LibraryType {
static var smart: Self {
#if os(Linux)
return .static
#else
return .dynamic
#endif
}
}
let package = Package(
name: "SuperchargeCore",
platforms: [
.iOS("14.0"),
.macOS("11.0"),
],
products: [
.library(
name: "Superutils",
type: .smart,
targets: ["Superutils"]
),
.library(
name: "SuperutilsTestSupport",
type: .smart,
targets: ["SuperutilsTestSupport"]
),
.library(
name: "ProtoCodable",
type: .smart,
targets: ["ProtoCodable"]
),
.library(
name: "SignerSupport",
type: .smart,
targets: ["SignerSupport"]
),
.library(name: "plist", targets: ["plist"]),
.library(name: "libimobiledeviceGlue", targets: ["libimobiledeviceGlue"]),
.library(name: "usbmuxd", targets: ["usbmuxd"]),
.library(name: "libimobiledevice", targets: ["libimobiledevice"]),
.library(name: "OpenSSL", targets: ["OpenSSL"]),
],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-concurrency-extras.git", from: "1.3.0"),
],
targets: [
.target(
name: "ProtoCodable",
dependencies: [
.product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"),
]
),
.target(name: "Superutils"),
.target(name: "SignerSupport"),
.target(name: "SuperutilsTestSupport"),
.testTarget(
name: "ProtoCodableTests",
dependencies: ["ProtoCodable", "SuperutilsTestSupport"]
),
]
)
#if os(Linux) || os(Windows)
package.targets += [
.systemLibrary(
name: "OpenSSL",
path: "Sources/OpenSSLSystem",
pkgConfig: "openssl",
providers: [
.apt(["libssl-dev"])
]
),
.systemLibrary(
name: "plist",
path: "Sources/plistSystem",
pkgConfig: "libplist-2.0",
providers: [
.apt(["libplist-dev"])
]
),
.systemLibrary(
name: "usbmuxd",
path: "Sources/usbmuxdSystem",
pkgConfig: "libusbmuxd-2.0",
providers: [
.apt(["libusbmuxd-dev"])
]
),
.systemLibrary(
name: "libimobiledeviceGlue",
path: "Sources/libimobiledeviceGlueSystem",
pkgConfig: "libimobiledevice-glue-1.0",
providers: [
.apt(["libimobiledevice-dev"])
]
),
.systemLibrary(
name: "libimobiledevice",
path: "Sources/libimobiledeviceSystem",
pkgConfig: "libimobiledevice-1.0",
providers: [
.apt(["libimobiledevice-dev"])
]
),
]
#else
package.targets += [
.binaryTarget(
name: "plist",
url: "https://github.com/SuperchargeApp/Superlibs/releases/download/1.0.0/plist.xcframework.zip",
checksum: "b71d1b2c86880cd2c8f353c6357c6d610849a2b461855ae782922720a0ecce3e"
),
.binaryTarget(
name: "libimobiledeviceGlue",
url: "https://github.com/SuperchargeApp/Superlibs/releases/download/1.0.0/libimobiledeviceGlue.xcframework.zip",
checksum: "227c43c1d7db213f3f75d8cdb0bba873321151ff80c2afd5217982642a2810e1"
),
.binaryTarget(
name: "usbmuxd",
url: "https://github.com/SuperchargeApp/Superlibs/releases/download/1.0.0/usbmuxd.xcframework.zip",
checksum: "9afdc82607c4339e19f31a487fe042ebee778040e805380704c5d89fb2a99081"
),
.binaryTarget(
name: "libimobiledevice",
url: "https://github.com/SuperchargeApp/Superlibs/releases/download/1.0.0/libimobiledevice.xcframework.zip",
checksum: "24c23d4ac43581e9bd6f3f198bade77d0ca928226b4a2230963162472828611f"
),
.binaryTarget(
name: "OpenSSL",
url: "https://github.com/krzyzanowskim/OpenSSL/releases/download/3.3.2000/OpenSSL.xcframework.zip",
checksum: "41d034ea1c075bfa74048e851358a550996c286de8230d1df39f137b06235c87"
),
]
#endif