1
+ %include metadata.inc
2
+
1
3
%global debug_package %{nil }
2
- %global linux_version fedora
3
- %global swifttag 5.5.3-RELEASE
4
- %global swiftbuild swift-source
5
- %global icu_version 65-1
6
- %global yams_version 4.0.2
7
- %global sap_version 0.4.3
8
- %global swift_crypto_version 1.1.5
9
- %global ninja_version 1.10.2
10
- %global package_version 5.5.3
11
-
12
- Name: swiftlang
13
- Version: 5.5.3
4
+
5
+ Name: %{package_name }
6
+ Version: %{package_version }
14
7
Release: 1%{?dist }
15
- Summary: The Swift programming language
16
- License: Apache 2.0
17
- URL: https://www.swift.org
18
-
19
- Source0: https://github.com/apple/swift/archive/swift-%{swifttag }.tar.gz#/swift.tar.gz
20
- Source1: https://github.com/apple/swift-corelibs-libdispatch/archive/swift-%{swifttag }.tar.gz#/corelibs-libdispatch.tar.gz
21
- Source2: https://github.com/apple/swift-corelibs-foundation/archive/swift-%{swifttag }.tar.gz#/corelibs-foundation.tar.gz
22
- Source3: https://github.com/apple/swift-integration-tests/archive/swift-%{swifttag }.tar.gz#/swift-integration-tests.tar.gz
23
- Source4: https://github.com/apple/swift-corelibs-xctest/archive/swift-%{swifttag }.tar.gz#/corelibs-xctest.tar.gz
24
- Source5: https://github.com/apple/swift-package-manager/archive/swift-%{swifttag }.tar.gz#/package-manager.tar.gz
25
- Source6: https://github.com/apple/swift-llbuild/archive/swift-%{swifttag }.tar.gz#/llbuild.tar.gz
26
- Source7: https://github.com/apple/swift-cmark/archive/swift-%{swifttag }.tar.gz#/cmark.tar.gz
27
- Source8: https://github.com/apple/swift-xcode-playground-support/archive/swift-%{swifttag }.tar.gz#/swift-xcode-playground-support.tar.gz
28
- Source9: https://github.com/apple/sourcekit-lsp/archive/swift-%{swifttag }.tar.gz#/sourcekit-lsp.tar.gz
29
- Source10: https://github.com/apple/indexstore-db/archive/swift-%{swifttag }.tar.gz#/indexstore-db.tar.gz
30
- Source11: https://github.com/apple/llvm-project/archive/swift-%{swifttag }.tar.gz#/llvm-project.tar.gz
31
- Source12: https://github.com/apple/swift-tools-support-core/archive/swift-%{swifttag }.tar.gz#/swift-tools-support-core.tar.gz
32
- Source13: https://github.com/apple/swift-argument-parser/archive/%{sap_version }.tar.gz
33
- Source14: https://github.com/apple/swift-driver/archive/swift-%{swifttag }.tar.gz#/swift-driver.tar.gz
8
+ Summary: %{ package_summary }
9
+ License: %{package_license}
10
+ URL: %{ package_url }
11
+
12
+ Source0: https://github.com/apple/swift/archive/swift-%{swift_version }.tar.gz#/swift.tar.gz
13
+ Source1: https://github.com/apple/swift-corelibs-libdispatch/archive/swift-%{swift_version }.tar.gz#/corelibs-libdispatch.tar.gz
14
+ Source2: https://github.com/apple/swift-corelibs-foundation/archive/swift-%{swift_version }.tar.gz#/corelibs-foundation.tar.gz
15
+ Source3: https://github.com/apple/swift-integration-tests/archive/swift-%{swift_version }.tar.gz#/swift-integration-tests.tar.gz
16
+ Source4: https://github.com/apple/swift-corelibs-xctest/archive/swift-%{swift_version }.tar.gz#/corelibs-xctest.tar.gz
17
+ Source5: https://github.com/apple/swift-package-manager/archive/swift-%{swift_version }.tar.gz#/package-manager.tar.gz
18
+ Source6: https://github.com/apple/swift-llbuild/archive/swift-%{swift_version }.tar.gz#/llbuild.tar.gz
19
+ Source7: https://github.com/apple/swift-cmark/archive/swift-%{swift_version }.tar.gz#/cmark.tar.gz
20
+ Source8: https://github.com/apple/swift-xcode-playground-support/archive/swift-%{swift_version }.tar.gz#/swift-xcode-playground-support.tar.gz
21
+ Source9: https://github.com/apple/sourcekit-lsp/archive/swift-%{swift_version }.tar.gz#/sourcekit-lsp.tar.gz
22
+ Source10: https://github.com/apple/indexstore-db/archive/swift-%{swift_version }.tar.gz#/indexstore-db.tar.gz
23
+ Source11: https://github.com/apple/llvm-project/archive/swift-%{swift_version }.tar.gz#/llvm-project.tar.gz
24
+ Source12: https://github.com/apple/swift-tools-support-core/archive/swift-%{swift_version }.tar.gz#/swift-tools-support-core.tar.gz
25
+ Source13: https://github.com/apple/swift-argument-parser/archive/%{swift_argument_parser_version }.tar.gz
26
+ Source14: https://github.com/apple/swift-driver/archive/swift-%{swift_version }.tar.gz#/swift-driver.tar.gz
34
27
Source15: https://github.com/unicode-org/icu/archive/release-%{icu_version }.tar.gz
35
- Source16: https://github.com/apple/swift-syntax/archive/swift-%{swifttag }.zip#/swift-syntax.tar.gz
36
- Source17: https://github.com/jpsim/Yams/archive/%{yams_version }.zip
28
+ Source16: https://github.com/apple/swift-syntax/archive/swift-%{swift_version }.zip#/swift-syntax.tar.gz
29
+ Source17: https://github.com/jpsim/Yams/archive/%{yams_version }.zip# /yams.tar.gz
37
30
Source18: https://github.com/apple/swift-crypto/archive/refs/tags/%{swift_crypto_version }.tar.gz
38
31
Source19: https://github.com/ninja-build/ninja/archive/refs/tags/v%{ninja_version }.tar.gz#/ninja.tar.gz
32
+ Source20: https://github.com/KitWare/CMake/archive/refs/tags/v%{cmake_version }.tar.gz#/cmake.tar.gz
39
33
40
34
Patch0: nocyclades.patch
41
- Patch1: unusedvariable.patch
42
-
35
+ Patch1: unusedvariable.patch
36
+
43
37
BuildRequires: clang
44
38
BuildRequires: swig
45
39
BuildRequires: rsync
@@ -69,78 +63,68 @@ Requires: gcc
69
63
Requires: ncurses-devel
70
64
Requires: ncurses-compat-libs
71
65
72
- ExclusiveArch: x86_64 aarch64
73
-
74
- Provides: swiftlang = %{version }-%{release }
66
+ ExclusiveArch: x86_64 aarch64
75
67
76
68
%description
77
- Swift is a general-purpose programming language built using
78
- a modern approach to safety, performance, and software design
69
+ Swift is a general-purpose programming language built using
70
+ a modern approach to safety, performance, and software design
79
71
patterns.
80
72
81
- The goal of the Swift project is to create the best available
82
- language for uses ranging from systems programming, to mobile
83
- and desktop apps, scaling up to cloud services. Most
84
- importantly, Swift is designed to make writing and maintaining
85
- correct programs easier for the developer.
86
-
73
+ The goal of the Swift project is to create the best available
74
+ language for uses ranging from systems programming, to mobile
75
+ and desktop apps, scaling up to cloud services. Most
76
+ importantly, Swift is designed to make writing and maintaining
77
+ correct programs easier for the developer.
87
78
88
79
%prep
89
- %setup -q -c -n %{swiftbuild } -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19
80
+ %setup -q -c -n %{swift_source_location } -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20
90
81
# The Swift build script requires directories to be named
91
82
# in a specific way so renaming the source directories is
92
83
# necessary
93
- mv swift-cmark-swift-%{swifttag } cmark
94
- mv swift-corelibs-foundation-swift-%{swifttag } swift-corelibs-foundation
95
- mv swift-corelibs-libdispatch-swift-%{swifttag } swift-corelibs-libdispatch
96
- mv swift-corelibs-xctest-swift-%{swifttag } swift-corelibs-xctest
97
- mv swift-integration-tests-swift-%{swifttag } swift-integration-tests
98
- mv swift-llbuild-swift-%{swifttag } llbuild
99
- mv swift-package-manager-swift-%{swifttag } swiftpm
100
- mv swift-swift-%{swifttag } swift
101
- mv swift-xcode-playground-support-swift-%{swifttag } swift-xcode-playground-support
102
- mv sourcekit-lsp-swift-%{swifttag } sourcekit-lsp
103
- mv indexstore-db-swift-%{swifttag } indexstore-db
104
- mv llvm-project-swift-%{swifttag } llvm-project
105
- mv swift-syntax-swift-%{swifttag } swift-syntax
106
- mv swift-tools-support-core-swift-%{swifttag } swift-tools-support-core
107
- mv swift-argument-parser-%{sap_version } swift-argument-parser
108
- mv swift-driver-swift-%{swifttag } swift-driver
84
+ mv swift-cmark-swift-%{swift_version } cmark
85
+ mv swift-corelibs-foundation-swift-%{swift_version } swift-corelibs-foundation
86
+ mv swift-corelibs-libdispatch-swift-%{swift_version } swift-corelibs-libdispatch
87
+ mv swift-corelibs-xctest-swift-%{swift_version } swift-corelibs-xctest
88
+ mv swift-integration-tests-swift-%{swift_version } swift-integration-tests
89
+ mv swift-llbuild-swift-%{swift_version } llbuild
90
+ mv swift-package-manager-swift-%{swift_version } swiftpm
91
+ mv swift-swift-%{swift_version } swift
92
+ mv swift-xcode-playground-support-swift-%{swift_version } swift-xcode-playground-support
93
+ mv sourcekit-lsp-swift-%{swift_version } sourcekit-lsp
94
+ mv indexstore-db-swift-%{swift_version } indexstore-db
95
+ mv llvm-project-swift-%{swift_version } llvm-project
96
+ mv swift-syntax-swift-%{swift_version } swift-syntax
97
+ mv swift-tools-support-core-swift-%{swift_version } swift-tools-support-core
98
+ mv swift-argument-parser-%{swift_argument_parser_version } swift-argument-parser
99
+ mv swift-driver-swift-%{swift_version } swift-driver
109
100
mv swift-crypto-%{swift_crypto_version } swift-crypto
110
-
111
- # ICU
101
+ mv ninja-%{ ninja_version } ninja
102
+ mv CMake-%{ cmake_version } cmake
112
103
mv icu-release-%{icu_version } icu
113
-
114
- # Yams
115
104
mv Yams-%{yams_version } yams
116
105
117
- # Ninja
118
- mv ninja-%{ninja_version } ninja
119
-
120
106
# Remove Cyclades as it has been removed from the Linux kernel
121
107
%patch0 -p0
122
108
123
109
# Temp patch to test libdispatch issue with clang 13
124
110
%patch1 -p0
125
111
126
- # Fix python to python3
112
+ # Fix python to python3
127
113
pathfix.py -pni "%{__python3} %{py3_shbang_opts }" swift/utils/api_checker/swift-api-checker.py
128
114
pathfix.py -pni "%{__python3} %{py3_shbang_opts }" llvm-project/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
129
115
130
-
131
116
%build
132
117
export VERBOSE=1
133
- # Before Fedora 34, we may not have /usr/bin/python, so we
118
+ # Before Fedora 34, we may not have /usr/bin/python, so we
134
119
# roll our own because the build script expects there to be one.
135
120
%if 0%{?fedora } < 34 || 0%{?el8 }
136
121
mkdir $PWD /binforpython
137
122
ln -s /usr/bin/python3 $PWD /binforpython/python
138
123
export PATH=$PWD /binforpython:$PATH
139
124
%endif
140
125
141
- # Here we go!
142
- swift/utils/build-script --preset= buildbot_linux,no_test install_destdir= %{_builddir } installable_package= %{_builddir }/swift-%{version }-%{linux_version }.tar.gz
143
-
126
+ # Run the build
127
+ swift/utils/build-script --preset= buildbot_linux,no_test install_destdir= %{_builddir } installable_package= %{_builddir }/swift-%{version }-fedora-34.tar.gz
144
128
145
129
%install
146
130
mkdir -p %{buildroot }%{_libexecdir }/swift/%{package_version }
@@ -156,7 +140,6 @@ cp %{_builddir}/usr/share/man/man1/swift.1 %{buildroot}%{_mandir}/man1/swift.1
156
140
# how the Swift binaries use RPATH
157
141
export QA_SKIP_RPATHS= 1
158
142
159
-
160
143
%files
161
144
%license swift/LICENSE.txt
162
145
%{_bindir }/swift
@@ -165,9 +148,7 @@ export QA_SKIP_RPATHS=1
165
148
%{_mandir }/man1/swift.1.gz
166
149
%{_libexecdir }/swift/
167
150
168
-
169
151
%post -p /sbin/ldconfig
170
152
%postun -p /sbin/ldconfig
171
153
172
-
173
154
%changelog
0 commit comments