File ghc-bootstrap.spec of Package ghc-bootstrap

# spec file for package ghc-bootstrap
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%ifarch %{ix86}
%define longarch i386
%ifarch ppc
%define longarch powerpc
%ifarch ppc64
%define longarch powerpc64
%ifarch ppc64le
%define longarch powerpc64le
%ifarch s390
%define longarch s390
%ifarch s390x
%define longarch s390x
%ifarch aarch64
%define longarch aarch64
%ifarch %{arm}
%define longarch arm
%ifarch x86_64
%define longarch x86_64
%ifarch s390 s390x
%define sysname ibm
%ifarch x86_64 %{ix86}
%define sysname deb8
%ifarch ppc64 ppc64le aarch64 %{arm}
%define sysname unknown

Name:           ghc-bootstrap
Version:        8.4.3
Release:        0
Summary:        Binary distributions of The Glorious Glasgow Haskell Compiler
License:        BSD-3-Clause
Group:          Development/Languages/Other
Source1:        README.openSUSE
Source2:        LICENSE
Source10:       ghc-8.4.3-i386-deb8-linux.tar.xz
Source12:       ghc-8.4.3-powerpc64-unknown-linux.tar.xz
Source13:       ghc-8.4.3-powerpc64le-unknown-linux.tar.xz
Source14:       ghc-8.4.3-x86_64-deb8-linux.tar.xz
Source16:       ghc-8.4.3-s390x-ibm-linux.tar.xz
Source17:       ghc-8.4.3-aarch64-unknown-linux.tar.xz
Source18:       ghc-8.4.3-arm-unknown-linux.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  gmp-devel
BuildRequires:  libncurses5
%ifnarch %{arm} s390x
BuildRequires:  libnuma-devel
%ifarch aarch64 %{arm}
BuildRequires:  binutils-gold
Requires:       binutils-gold
%ifarch s390x
BuildRequires:  libffi-devel
Requires:       gmp-devel
Requires:       libncurses5
# This package is not meant to be used outside OBS
Requires:       this-is-only-for-build-envs

ExclusiveArch:  %{ix86} ppc64 ppc64le x86_64 s390x aarch64 %{arm}
Provides:       ghc-bootstrap-devel

AutoReq:        off

This package contains a binary distribution of "The Glorious Glasgow
Haskell Compilation System". See README.openSUSE on how the tarballs
were produced.

Do not install this package! Install 'ghc' instead. 

cp %SOURCE1 .
cp %SOURCE2 .
cp %SOURCE10 .
cp %SOURCE12 .
cp %SOURCE13 .
cp %SOURCE14 .
cp %SOURCE16 .
cp %SOURCE17 .
cp %SOURCE18 .

tar Jxf ghc-%{version}-%{longarch}-%{sysname}-linux.tar.xz
cd ghc-%{version}
./configure --prefix=/opt

cd ghc-%{version}
%fdupes -s %{buildroot}

/opt/bin/ghc-pkg recache

%doc README.openSUSE