%global debug_package %{nil} %global sourcename apple-swift %global sourcedir %{_tmppath}/%{sourcename} %global builddir %{sourcedir}/builds %global swifttag DEVELOPMENT-SNAPSHOT-2018-01-17-a Name: swift-lang Version: 4.1_DEV Release: 1%{?dist} Summary: Apple's Swift programming language License: ASL 2.0 URL: https://swift.org Source0: https://github.com/apple/swift/archive/swift-%{swifttag}.tar.gz#/swift.tar.gz Source1: https://github.com/apple/swift-compiler-rt/archive/swift-%{swifttag}.tar.gz#/swift-compiler-rt.tar.gz Source2: https://github.com/apple/swift-corelibs-libdispatch/archive/swift-%{swifttag}.tar.gz#/corelibs-libdispatch.tar.gz Source3: https://github.com/apple/swift-corelibs-foundation/archive/swift-%{swifttag}.tar.gz#/corelibs-foundation.tar.gz Source4: https://github.com/apple/swift-integration-tests/archive/swift-%{swifttag}.tar.gz#/swift-integration-tests.tar.gz Source5: https://github.com/apple/swift-corelibs-xctest/archive/swift-%{swifttag}.tar.gz#/corelibs-xctest.tar.gz Source6: https://github.com/apple/swift-clang/archive/swift-%{swifttag}.tar.gz#/clang.tar.gz Source7: https://github.com/apple/swift-package-manager/archive/swift-%{swifttag}.tar.gz#/package-manager.tar.gz Source8: https://github.com/apple/swift-lldb/archive/swift-%{swifttag}.tar.gz#/lldb.tar.gz Source9: https://github.com/apple/swift-llvm/archive/swift-%{swifttag}.tar.gz#/llvm.tar.gz Source10: https://github.com/apple/swift-llbuild/archive/swift-%{swifttag}.tar.gz#/llbuild.tar.gz Source11: https://github.com/apple/swift-cmark/archive/swift-%{swifttag}.tar.gz#/cmark.tar.gz Source12: https://github.com/apple/swift-xcode-playground-support/archive/swift-%{swifttag}.tar.gz#/swift-xcode-playground-support.tar.gz Source13: https://github.com/ninja-build/ninja/archive/v1.7.2.tar.gz#/ninja.tar.gz BuildRequires: clang,libicu-devel,gcc-c++,cmake,libuuid-devel,libedit-devel,swig,pkgconfig,libbsd-devel,libxml2-devel,libsqlite3x-devel,python-devel,ninja-build %description Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns. The goal of the Swift project is to create the best available language for uses ranging from systems programming, to mobile and desktop apps, scaling up to cloud services. Most importantly, Swift is designed to make writing and maintaining correct programs easier for the developer. %package devel Summary: Development files for the Swift programming language Requires: %{name} = %{version}-%{release} %description devel Development files for compiling and statically linking blocks in a program that uses the Apple blocks proposed extension. %prep rm -rf %{sourcedir} mkdir -p %{sourcedir} # Have to rearrange the directories the way the Swift # build script is expecting it and the naming scheme # is not standard, so a one-liner isn't gonna do it pushd %{sourcedir} tar xzf %{SOURCE0} tar xzf %{SOURCE1} tar xzf %{SOURCE2} tar xzf %{SOURCE3} tar xzf %{SOURCE4} tar xzf %{SOURCE5} tar xzf %{SOURCE6} tar xzf %{SOURCE7} tar xzf %{SOURCE8} tar xzf %{SOURCE9} tar xzf %{SOURCE10} tar xzf %{SOURCE11} tar xzf %{SOURCE12} tar xzf %{SOURCE13} mv swift-clang-swift-%{swifttag} clang mv swift-cmark-swift-%{swifttag} cmark mv swift-compiler-rt-swift-%{swifttag} compiler-rt mv swift-corelibs-foundation-swift-%{swifttag} swift-corelibs-foundation mv swift-corelibs-libdispatch-swift-%{swifttag} swift-corelibs-libdispatch mv swift-corelibs-xctest-swift-%{swifttag} swift-corelibs-xctest mv swift-integration-tests-swift-%{swifttag} swift-integration-tests mv swift-llbuild-swift-%{swifttag} llbuild mv swift-lldb-swift-%{swifttag} lldb mv swift-llvm-swift-%{swifttag} llvm mv swift-package-manager-swift-%{swifttag} swiftpm mv swift-swift-%{swifttag} swift mv swift-xcode-playground-support-swift-%{swifttag} swift-xcode-playground-support mv ninja-1.7.2 ninja popd %build %{sourcedir}/swift/utils/build-script --preset=buildbot_linux,no_test install_destdir=%{builddir} installable_package=%{builddir}/swift-%{version}-fedora.tar.gz %install cp -r %{builddir}/* %{buildroot} rm %{buildroot}/swift-%{version}-fedora.tar.gz chmod 0755 %{buildroot}%{_bindir}/* chmod 0644 %{buildroot}/usr/share/man/man1/swift.1 %files %{_bindir}/* %{_mandir}/man1/swift.1.gz %{_datarootdir}/swift/LICENSE.txt %files devel %{_includedir}/* %{_usr}/lib/* %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog * Tue Jan 16 2018 Ron Olson 4.1_DEV-1 - Initial package for Fedora