2014-09-14 19:43:08 +02:00
|
|
|
#
|
|
|
|
# spec file for package ghc-bootstrap
|
|
|
|
#
|
2023-03-30 10:26:20 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2014-09-14 19:43:08 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2020-09-04 17:10:10 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-09-14 19:43:08 +02:00
|
|
|
#
|
|
|
|
|
2023-03-30 10:26:20 +02:00
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1550
|
2023-02-02 15:52:33 +01:00
|
|
|
%global llvm_major 12
|
|
|
|
%else
|
|
|
|
%global llvm_major 9
|
|
|
|
%endif
|
2014-09-14 19:43:08 +02:00
|
|
|
%ifarch ppc64
|
|
|
|
%define longarch powerpc64
|
2023-03-30 10:26:20 +02:00
|
|
|
%define arch ppc64
|
2014-09-14 19:43:08 +02:00
|
|
|
%endif
|
|
|
|
%ifarch ppc64le
|
|
|
|
%define longarch powerpc64le
|
2023-03-30 10:26:20 +02:00
|
|
|
# something weird on ghc arch detection
|
|
|
|
%define arch ppc64
|
2015-05-22 09:14:54 +02:00
|
|
|
%endif
|
|
|
|
%ifarch s390x
|
|
|
|
%define longarch s390x
|
2023-03-30 10:26:20 +02:00
|
|
|
%define sysname ibm
|
|
|
|
%define arch s390x
|
2015-05-22 09:14:54 +02:00
|
|
|
%endif
|
|
|
|
%ifarch aarch64
|
|
|
|
%define longarch aarch64
|
2023-03-30 10:26:20 +02:00
|
|
|
%define arch aarch64
|
2018-02-09 03:18:11 +01:00
|
|
|
%endif
|
2014-09-14 19:43:08 +02:00
|
|
|
%ifarch x86_64
|
|
|
|
%define longarch x86_64
|
2023-03-30 10:26:20 +02:00
|
|
|
%define sysname unknown
|
|
|
|
%define arch x86_64
|
2015-05-22 09:14:54 +02:00
|
|
|
%endif
|
2020-09-04 17:10:10 +02:00
|
|
|
%ifarch riscv64
|
|
|
|
%define longarch riscv64
|
2023-03-30 10:26:20 +02:00
|
|
|
%define arch riscv64
|
2020-09-04 17:10:10 +02:00
|
|
|
%endif
|
|
|
|
%ifarch ppc64 ppc64le %{arm} aarch64 riscv64
|
2015-05-22 09:14:54 +02:00
|
|
|
%define sysname unknown
|
|
|
|
%endif
|
2014-09-14 19:43:08 +02:00
|
|
|
Name: ghc-bootstrap
|
|
|
|
Summary: Binary distributions of The Glorious Glasgow Haskell Compiler
|
|
|
|
License: BSD-3-Clause
|
2020-09-04 17:10:10 +02:00
|
|
|
URL: https://build.opensuse.org/package/view_file/devel:languages:haskell:bootstrap
|
2014-09-14 19:43:08 +02:00
|
|
|
Source1: README.openSUSE
|
2014-09-22 09:46:05 +02:00
|
|
|
Source2: LICENSE
|
2023-03-30 10:26:20 +02:00
|
|
|
Source12: ghc-9.2.3-powerpc64-unknown-linux.tar.xz
|
|
|
|
Source13: ghc-9.2.3-powerpc64le-unknown-linux.tar.xz
|
|
|
|
Source14: ghc-9.2.3-x86_64-unknown-linux.tar.xz
|
|
|
|
Source16: ghc-9.2.3-s390x-ibm-linux.tar.xz
|
|
|
|
Source17: ghc-9.2.3-aarch64-unknown-linux.tar.xz
|
|
|
|
Source19: ghc-8.10.4-riscv64-unknown-linux.tar.xz
|
|
|
|
BuildRequires: chrpath
|
2015-04-29 15:11:32 +02:00
|
|
|
BuildRequires: fdupes
|
2015-05-02 13:04:35 +02:00
|
|
|
BuildRequires: gmp-devel
|
2023-03-30 10:26:20 +02:00
|
|
|
BuildRequires: libffi8 >= 3.4.4
|
2017-02-06 23:15:06 +01:00
|
|
|
BuildRequires: libncurses5
|
2023-03-30 10:26:20 +02:00
|
|
|
BuildRequires: pkgconfig
|
2020-09-04 17:10:10 +02:00
|
|
|
BuildRequires: pkgconfig(libffi)
|
|
|
|
Requires: gmp-devel
|
2023-02-02 15:52:33 +01:00
|
|
|
Requires: libffi8 >= 3.4.4
|
2023-03-30 10:26:20 +02:00
|
|
|
Requires: libncurses5
|
2020-09-04 17:10:10 +02:00
|
|
|
# This package is not meant to be used outside OBS
|
|
|
|
Requires: this-is-only-for-build-envs
|
2023-03-30 10:26:20 +02:00
|
|
|
Requires: pkgconfig(libffi)
|
2020-09-04 17:10:10 +02:00
|
|
|
Provides: ghc-bootstrap-devel
|
2023-03-30 10:26:20 +02:00
|
|
|
ExclusiveArch: ppc64 ppc64le x86_64 s390x aarch64 riscv64
|
2020-09-04 17:10:10 +02:00
|
|
|
AutoReq: off
|
2023-03-30 10:26:20 +02:00
|
|
|
%ifarch riscv64
|
|
|
|
Version: 8.10.4
|
2021-11-09 09:31:50 +01:00
|
|
|
Release: 0
|
2020-09-04 17:10:10 +02:00
|
|
|
%else
|
2023-03-30 10:26:20 +02:00
|
|
|
Version: 9.2.3
|
2021-11-09 09:31:50 +01:00
|
|
|
Release: 0
|
2020-09-04 17:10:10 +02:00
|
|
|
%endif
|
2023-03-30 10:26:20 +02:00
|
|
|
%ifnarch s390x
|
2018-10-18 11:47:59 +02:00
|
|
|
BuildRequires: libnuma-devel
|
|
|
|
%endif
|
2023-03-30 10:26:20 +02:00
|
|
|
%ifarch s390x riscv64
|
2023-02-02 15:52:33 +01:00
|
|
|
Requires: llvm%{llvm_major}
|
2020-02-27 19:23:48 +01:00
|
|
|
%endif
|
2023-03-30 10:26:20 +02:00
|
|
|
%ifnarch s390x
|
2020-09-04 17:10:10 +02:00
|
|
|
Requires: libffi-devel
|
2021-08-25 12:54:41 +02:00
|
|
|
Requires: libnuma-devel
|
2020-05-23 03:01:05 +02:00
|
|
|
%endif
|
2014-09-14 19:43:08 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package contains a binary distribution of "The Glorious Glasgow
|
|
|
|
Haskell Compilation System". See README.openSUSE on how the tarballs
|
|
|
|
were produced.
|
|
|
|
|
2020-09-04 17:10:10 +02:00
|
|
|
Do not install this package! Install 'ghc' instead.
|
2014-09-14 19:43:08 +02:00
|
|
|
|
|
|
|
%prep
|
2020-09-04 17:10:10 +02:00
|
|
|
cp %{SOURCE1} .
|
|
|
|
cp %{SOURCE2} .
|
|
|
|
cp %{SOURCE12} .
|
|
|
|
cp %{SOURCE13} .
|
|
|
|
cp %{SOURCE14} .
|
|
|
|
cp %{SOURCE16} .
|
|
|
|
cp %{SOURCE17} .
|
|
|
|
cp %{SOURCE19} .
|
2014-09-14 19:43:08 +02:00
|
|
|
|
|
|
|
%build
|
2018-02-09 03:18:11 +01:00
|
|
|
tar Jxf ghc-%{version}-%{longarch}-%{sysname}-linux.tar.xz
|
2023-03-30 10:26:20 +02:00
|
|
|
%ifarch riscv64
|
2018-02-09 03:18:11 +01:00
|
|
|
cd ghc-%{version}
|
2023-03-30 10:26:20 +02:00
|
|
|
%else
|
|
|
|
cd ghc-%{version}-%{longarch}-%{sysname}-linux
|
|
|
|
%endif
|
2020-09-04 17:10:10 +02:00
|
|
|
# FIXME: you should use the %%configure macro
|
2014-09-14 19:43:08 +02:00
|
|
|
|
|
|
|
%install
|
2023-03-30 10:26:20 +02:00
|
|
|
%ifarch riscv64
|
2018-02-09 03:18:11 +01:00
|
|
|
cd ghc-%{version}
|
2023-03-30 10:26:20 +02:00
|
|
|
%else
|
|
|
|
cd ghc-%{version}-%{longarch}-%{sysname}-linux
|
|
|
|
%endif
|
|
|
|
|
|
|
|
./configure --prefix=/opt
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
|
|
|
echo "/opt/lib/ghc-%{version}/lib/%{arch}-linux-ghc-%{version}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/ghc.conf
|
2020-09-04 17:10:10 +02:00
|
|
|
%make_install
|
2015-04-29 15:11:32 +02:00
|
|
|
%fdupes -s %{buildroot}
|
2023-03-30 10:26:20 +02:00
|
|
|
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \; -print); do
|
|
|
|
chrpath -d $i
|
|
|
|
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
|
|
|
|
)
|
2014-09-14 19:43:08 +02:00
|
|
|
|
|
|
|
%post
|
2023-03-30 10:26:20 +02:00
|
|
|
/sbin/ldconfig
|
2019-01-15 03:01:23 +01:00
|
|
|
/opt/bin/ghc-pkg recache
|
2014-09-14 19:43:08 +02:00
|
|
|
|
2023-03-30 10:26:20 +02:00
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
2014-09-14 19:43:08 +02:00
|
|
|
%files
|
2023-03-30 10:26:20 +02:00
|
|
|
%ghost %{_datadir}
|
|
|
|
%ghost %{_datadir}/doc
|
|
|
|
%ghost %{_docdir}
|
2014-09-14 19:43:08 +02:00
|
|
|
%doc README.openSUSE
|
2020-09-04 17:10:10 +02:00
|
|
|
%license LICENSE
|
2021-08-25 12:54:41 +02:00
|
|
|
/opt/*
|
2023-03-30 10:26:20 +02:00
|
|
|
%{_sysconfdir}/ld.so.conf.d/ghc.conf
|
2014-09-14 19:43:08 +02:00
|
|
|
|
|
|
|
%changelog
|