summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD43
2 files changed, 28 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 02eead8de33d..7fda4bad41cc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,10 @@
pkgbase = swift-language
pkgdesc = The Swift programming language and debugger
pkgver = 5.9.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/apple/swift
arch = x86_64
- license = apache2
+ license = Apache-2.0
makedepends = clang
makedepends = cmake
makedepends = git
@@ -22,7 +22,6 @@ pkgbase = swift-language
depends = python
depends = libbsd
depends = ncurses
- options = !strip
source = git+https://github.com/apple/swift#tag=swift-5.9.2-RELEASE
source = 0001-arch-aur-patches.patch
source = apple-llvm-project::git+https://github.com/apple/llvm-project#tag=swift-5.9.2-RELEASE
@@ -43,7 +42,6 @@ pkgbase = swift-language
source = swift-asn1::git+https://github.com/apple/swift-asn1#tag=0.7.0
source = swift-atomics::git+https://github.com/apple/swift-atomics#tag=1.0.2
source = swift-certificates::git+https://github.com/apple/swift-certificates#tag=0.4.1
- source = swift-cmark-gfm::git+https://github.com/apple/swift-cmark#tag=swift-5.9.2-RELEASE
source = swift-collections::git+https://github.com/apple/swift-collections#tag=1.0.1
source = swift-crypto::git+https://github.com/apple/swift-crypto#tag=2.5.0
source = swift-docc::git+https://github.com/apple/swift-docc#tag=swift-5.9.2-RELEASE
@@ -96,6 +94,5 @@ pkgbase = swift-language
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = SKIP
pkgname = swift-language
diff --git a/PKGBUILD b/PKGBUILD
index a3d6affa352b..42e63a7f94ab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,16 +5,24 @@
# Contributor: Gábor Sebestyén <segabor@gmail.com>
# Contributor: Andrew Sun <adsun701@gmail.com>
+## useful links
+# https://swift.org/
+# https://github.com/apple/swift
+
+## options
+
+
+## basic info
_pkgname="swift-language"
pkgname="$_pkgname"
_swiftver=swift-5.9.2-RELEASE
pkgver=5.9.2
-pkgrel=1
+pkgrel=2
pkgdesc="The Swift programming language and debugger"
-arch=('x86_64')
-#url="https://swift.org/"
url="https://github.com/apple/swift"
-license=('apache2')
+license=('Apache-2.0')
+arch=('x86_64')
+
depends=('icu' 'libedit' 'libxml2' 'python' 'libbsd' 'ncurses')
makedepends=(
'clang' 'cmake' 'git' 'lld' 'llvm' 'ninja'
@@ -46,7 +54,6 @@ source=(
"swift-asn1"::"git+https://github.com/apple/swift-asn1#tag=0.7.0"
"swift-atomics"::"git+https://github.com/apple/swift-atomics#tag=1.0.2"
"swift-certificates"::"git+https://github.com/apple/swift-certificates#tag=0.4.1"
- "swift-cmark-gfm"::"git+https://github.com/apple/swift-cmark#tag=${_swiftver}"
"swift-collections"::"git+https://github.com/apple/swift-collections#tag=1.0.1"
"swift-crypto"::"git+https://github.com/apple/swift-crypto#tag=2.5.0"
"swift-docc"::"git+https://github.com/apple/swift-docc#tag=${_swiftver}"
@@ -103,16 +110,14 @@ sha256sums=(
'SKIP'
'SKIP'
'SKIP'
- 'SKIP'
)
-
# By default makepkg runs strip on binaries. This causes issues with the Swift REPL.
# from https://github.com/RLovelett/swift-aur/blob/master/PKGBUILD
# termux had no trouble up to now, strip all executables and shared objects:
# https://github.com/termux/termux-packages/blob/master/scripts/build/termux_step_massage.sh#L24
# would be cool to not strip only the ones which really are necessary, but how?
-options=(!strip)
+#options=(!strip)
prepare () {
ln -sfP 'apple-indexstore-db' 'indexstore-db'
@@ -123,7 +128,6 @@ prepare () {
ln -sfP 'swift-atomics' 'atomics'
ln -sfP 'swift-certificates' 'certificates'
ln -sfP 'swift-cmark' 'cmark'
- ln -sfP 'swift-cmark' 'cmark'
ln -sfP 'swift-collections' 'collections'
ln -sfP 'swift-corelibs-foundation' 'corelibs-foundation'
ln -sfP 'swift-corelibs-libdispatch' 'corelibs-libdispatch'
@@ -176,17 +180,22 @@ build() {
}
package() {
- DESTDIR="$pkgdir" cmake \
- --install "$srcdir/build/Ninja-ReleaseAssert/cmark-linux-x86_64" \
- --prefix "/usr/lib/swift"
-
- DESTDIR="$pkgdir" cmake \
- --install "$srcdir/build/Ninja-ReleaseAssert/llvm-linux-x86_64" \
- --prefix "/usr/lib/swift"
+ local _install_path='usr/lib/swift'
DESTDIR="$pkgdir" cmake \
--install "$srcdir/build/Ninja-ReleaseAssert/swift-linux-x86_64" \
- --prefix "/usr/lib/swift"
+ --prefix "/$_install_path"
+
+ find "$pkgdir/$_install_path" -type f -name '*.a' -delete
+ find "$pkgdir/$_install_path" -type f -name '*.syms' -delete
+ find "$pkgdir/$_install_path" -type f -name '*-test' -delete
+
+ for i in swift swift sourcekit-lsp ; do
+ install -Dm644 /dev/stdin "$pkgdir/usr/bin/$i" <<END
+#!/usr/bin/env sh
+exec "/$_install_path/bin/$i" "\$@"
+END
+ done
}
# vim:set ts=2 sw=2 et: