summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorsoloturn2020-08-20 18:25:00 +0200
committersoloturn2020-08-20 18:25:40 +0200
commitab3653f46d5f61c147295cbe2a554b2b83cc2a20 (patch)
treed6ef3c4eab4f566dd334a0f0036563967aa76407 /PKGBUILD
parente67b7eb72bf18bda82ff618c5c6f7f230cab283d (diff)
downloadaur-ab3653f46d5f61c147295cbe2a554b2b83cc2a20.tar.gz
put result into /opt, produce package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD16
1 files changed, 11 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9a9c93dccff7..2e4e6e4ab0e1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,9 +3,8 @@
# Contributor: Andrew Sun <adsun701@gmail.com>
# Contributor: soloturn@gmail.com
-
pkgname=swift-language-git
-pkgver=swift.DEVELOPMENT.SNAPSHOT.2020.07.22.a.r354.g79ff5e36e8d
+pkgver=swift.DEVELOPMENT.SNAPSHOT.2020.08.18.a.r47.gfc34e4cf542
pkgrel=1
pkgdesc="The Swift programming language, taken directly from the Apple repository"
arch=('x86_64')
@@ -62,6 +61,12 @@ md5sums=(
'SKIP'
)
+
+# By default makepkg runs strip on binaries. This seems to cause issues with the Swift REPL.
+# Disable it in the PKGBUILD with:
+# from https://github.com/RLovelett/swift-aur/blob/master/PKGBUILD, not sure if necessary
+#options=(!strip)
+
prepare () {
( cd swift && patch -p1 -i "$srcdir/0001-not-build-ninja-icu.patch" )
( cd swift && patch -p1 -i "$srcdir/0003-swift-python2-as-fallback-only.patch" )
@@ -81,13 +86,14 @@ build() {
find "$srcdir/llvm-project/clang-tools-extra" -type f -print0 | xargs -0 sed -i 's|/usr/include/x86_64-linux-gnu|/usr/include|g'
# Release build
#LDFLAGS='-ldl -lpthread' python utils/build-script -b -p --foundation --xctest -R
- LDFLAGS='-ldl -lpthread' python swift/utils/build-script --preset=buildbot_linux,no_test install_destdir="$srcdir/build" installable_package="$srcdir/swift-arch-pkg.tar.gz"
+ LDFLAGS='-ldl -lpthread' python swift/utils/build-script --preset=buildbot_linux,no_test install_destdir="/opt/swift" installable_package="$srcdir/swift.tar.gz"
}
package() {
- cd "$srcdir/build"
+ cd "$pkgdir"
mkdir -p "$pkgdir/opt" "$pkgdir/usr/bin"
- cp -R Ninja-ReleaseAssert "$pkgdir/opt/swift"
+ # unpack the produced tar, to pack it again. how to avoid this pack-unpack-pack?
+ tar xvf $srcdir/swift.tar.gz
ln -s /opt/swift/swift-linux-$CARCH/bin/{lldb-moduleimport-test,sil-extract,sil-opt,swift,swift-autolink-extract,swiftc,swift-demangle,swift-ide-test,swift-llvm-opt} "$pkgdir/usr/bin"
}