summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRyan Gonzalez2020-06-07 15:25:37 -0500
committerRyan Gonzalez2020-06-07 15:25:37 -0500
commit10c3e29e6b7c218a05001234a1b900e2f0a35a03 (patch)
tree9b55592d0e98a3e8abbaed3014cf8afbf9f2d787 /PKGBUILD
parentb94aa505bba4b76288cfcaeffd8add5dc1eeb6c5 (diff)
downloadaur-10c3e29e6b7c218a05001234a1b900e2f0a35a03.tar.gz
Updates
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 11 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1b527af6128d..850f9f024457 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,21 +2,20 @@
# Contributor: Frederic Bezies <fredbezies at gmail dot com>, youngunix <>
pkgname=swift-bin
-pkgver=5.2.3
+pkgver=5.2.4
pkgrel=1
pkgdesc="Binary builds of the Swift programming language"
arch=('x86_64')
url="https://swift.org"
license=('apache')
-depends=('clang' 'icu63' 'libbsd' 'libutil-linux' 'libxml2' 'python3')
+depends=('libutil-linux' 'libxml2' 'python3')
makedepends=('patchelf' 'rpmextract')
conflicts=('swift-language-git')
options=('!strip')
provides=('swift-language')
replaces=('swift-language-bin')
-_urlbase='https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/s'
-source=("$_urlbase/swift-lang-$pkgver-1.fc33.x86_64.rpm")
-sha256sums=('5b960d79ed8bb755ccb5fa37a0cb82903a6fad656104952fbb0940c08a693020')
+source=("https://swift.org/builds/swift-$pkgver-release/centos8/swift-$pkgver-RELEASE/swift-$pkgver-RELEASE-centos8.tar.gz")
+sha256sums=('dd07e4e8f57b8339d4a720c45b1279a8e8d8d3ce6695f82919db1674923d8794')
package() {
find_elf_only() {
@@ -27,28 +26,19 @@ package() {
"$@"
}
- cp -Ppr "${srcdir}"/usr "${pkgdir}"
+ mkdir -p "${pkgdir}/usr/lib/swift"
+ cp -Ppr "${srcdir}/swift-$pkgver-RELEASE-centos8"/usr/* "${pkgdir}/usr/lib/swift"
- # Merge libexec and lib
- mv "${pkgdir}/usr/"{libexec/*,lib}
- rmdir "${pkgdir}/usr/libexec"
-
- # Rewrite the symlinks and binaries to use lib instead of libexec
- find_elf_only -exec sed -i 's|/usr/libexec|/usr/lib/./.|g' {} \;
- for bin in "${pkgdir}/usr/bin/"*; do
- ln -sf /usr/lib/swift/bin/${bin##*/} $bin
+ # Symlink the desired binaries to /usr/bin
+ mkdir -p "${pkgdir}/usr/bin"
+ for bin in sourcekit-lsp swift swiftc; do
+ ln -s "/usr/lib/swift/bin/$bin" "${pkgdir}/usr/bin/$bin"
done
- # Create the needed aliases for libncurses
+ # Patch the binaries to use the changed ncurses names
patchelf=(patchelf)
for lib in ncurses panel form; do
patchelf+=(--replace-needed "lib${lib}.so.6" "lib${lib}w.so")
done
find_elf_only -exec "${patchelf[@]}" {} \;
-
- # Rename the LICENSE file directory
- mv "${pkgdir}/usr/share/licenses/swift-"{lang,bin}
-
- # Remove Fedora .build-id stuff
- rm -rf "${pkgdir}/usr/lib/.build-id"
}