Name: ghc-bootstrap Version: 9.8.2 Release: 1%{?dist} Summary: Binary distributions of GHC (Glasgow Haskell Compiler) License: BSD-3-Clause URL: https://build.opensuse.org/package/view_file/devel:languages:haskell:bootstrap Source0: ghc-%{version}-x86_64-unknown-linux.tar.xz Source1: LICENSE #The README.openSUSE shows you how the tarball is generated Source2: README.openSUSE # BuildRequires: chrpath BuildRequires: fdupes BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: pkgconfig %ifarch x86_64 BuildRequires: lib64gmp-devel BuildRequires: lib64ffi8 >= 3.4.4 BuildRequires: lib64ncurses5 BuildRequires: lib64ffi-devel Requires: lib64gmp-devel Requires: lib64ffi8 >= 3.4.4 Requires: lib64ffi-devel Requires: lib64ncurses5 %endif # This package is not meant to be used outside of our build system # as it's a dummy package Requires: this-is-only-for-build-envs # Provides: ghc-bootstrap-devel = %{version}-%{release} ExclusiveArch: x86_64 #Note that this package supports building for more architectures, such as #ix86 and aarch64 but lets first make sure that it builds and installs #correctly for x86_64 before we add more. AutoReq: off %description This package contains a binary distribution of the Glasgow Haskell Compiler". Do not install this package! Install 'ghc' instead. %prep %setup -q -n ghc-%{version}-x86_64-unknown-linux %build %{nil} %install %configure --prefix=/opt --enable-unregisterised mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d echo "/opt/lib/ghc-%{version}/%{_arch}-linux-ghc-%{version}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/ghc.conf %make_install fdupes -s %{buildroot} for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \; -print); do chrpath -d ... done rm %{buildroot}/opt/lib/ghc-%{version}/lib/package.conf.d/.stamp (cd %{buildroot}/opt/lib/ghc-%{version}/lib/package.conf.d/ for i in *.conf; do mv "$i.copy" "$i" done ) install -Dm644 %{SOURCE1} %{buildroot}%{_licensedir}/%{name}/LICENSE install -Dm644 %{SOURCE2} %{buildroot}%{_docdir}/%{name}/README.openSUSE %post %{_sbindir}/ldconfig /opt/bin/ghc-pkg recache %postun -p %{_sbindir}/ldconfig %files %license %{_licensedir}/%{name}/LICENSE %doc %{_docdir}/%{name}/README.openSUSE /opt/* %config %{_sysconfdir}/ld.so.conf.d/ghc.conf