diff options
author | CoprDistGit <infra@openeuler.org> | 2023-10-25 14:41:14 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-10-25 14:41:14 +0000 |
commit | 9564e53e45a14716a0f500322763510b234a87ab (patch) | |
tree | e3d961c67dae6b5437268bc5458608e8cc752ca6 | |
parent | f689f5d2363db0826d833a87aaed0177d2c6658e (diff) |
automatic import of ghc-bootstrap
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | LICENSE | 31 | ||||
-rw-r--r-- | ghc-bootstrap.spec | 108 | ||||
-rw-r--r-- | sources | 4 |
4 files changed, 147 insertions, 0 deletions
@@ -0,0 +1,4 @@ +/ghc-9.2.3-aarch64-unknown-linux.tar.xz +/ghc-9.2.3-powerpc64-unknown-linux.tar.xz +/ghc-9.2.3-powerpc64le-unknown-linux.tar.xz +/ghc-9.2.3-x86_64-unknown-linux.tar.xz @@ -0,0 +1,31 @@ +The Glasgow Haskell Compiler License + +Copyright 2002, The University Court of the University of Glasgow. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +- Neither name of the University nor the names of its contributors may be +used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF +GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/ghc-bootstrap.spec b/ghc-bootstrap.spec new file mode 100644 index 0000000..a8e5369 --- /dev/null +++ b/ghc-bootstrap.spec @@ -0,0 +1,108 @@ +Name: ghc-bootstrap +Version: 9.2.3 +Release: 1 +Summary: Binary distributions of The Glorious Glasgow Haskell Compiler +License: BSD-3-Clause +URL: https://gitee.com/src-openeuler/ghc-bootstrap +Source0: LICENSE +Source1: ghc-9.2.3-powerpc64-unknown-linux.tar.xz +Source2: ghc-9.2.3-powerpc64le-unknown-linux.tar.xz +Source3: ghc-9.2.3-x86_64-unknown-linux.tar.xz +Source4: ghc-9.2.3-aarch64-unknown-linux.tar.xz + +BuildRequires: chrpath +BuildRequires: fdupes +BuildRequires: gmp-devel +BuildRequires: libffi +BuildRequires: libatomic +BuildRequires: ncurses-libs +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libffi) +BuildRequires: numactl-devel +Requires: gmp-devel +Requires: libffi +Requires: libatomic +Requires: ncurses-libs +Requires: pkgconfig(libffi) +Requires: numactl-devel +Requires: libffi-devel + +Conflicts: ghc-base +Provides: ghc-bootstrap-devel +ExclusiveArch: ppc64 ppc64le x86_64 aarch64 +AutoReq: off + +%description +This package contains a binary distribution of The Glorious Glasgow +Haskell Compilation System. + +The tarballs come from the ghc download page. +This package is only used for bootstraping ghc. + +Do not install this package! Install 'ghc' instead. + +%prep +cp %{SOURCE0} . +cp %{SOURCE1} . +cp %{SOURCE2} . +cp %{SOURCE3} . +cp %{SOURCE4} . +cp %{SOURCE5} . + +%ifarch ppc64 +%define longarch powerpc64 +%define arch ppc64 +%endif +%ifarch ppc64le +%define longarch powerpc64le +%define arch ppc64 +%endif +%ifarch aarch64 +%define longarch aarch64 +%define arch aarch64 +%endif +%ifarch x86_64 +%define longarch x86_64 +%define sysname unknown +%define arch x86_64 +%endif +%ifarch ppc64 ppc64le x86_64 aarch64 +%define sysname unknown +%endif + +%build +tar Jxf ghc-%{version}-%{longarch}-%{sysname}-linux.tar.xz +cd ghc-%{version}-%{longarch}-%{sysname}-linux + +%install +cd ghc-%{version}-%{longarch}-%{sysname}-linux + +./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 +%make_install +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 +) + +%post +/sbin/ldconfig +/opt/bin/ghc-pkg recache + +%postun -p /sbin/ldconfig + +%files +%license LICENSE +/opt/* +%config %{_sysconfdir}/ld.so.conf.d/ghc.conf + +%changelog +* Sat Jul 22 2023 Lin Runze <lrzlin@163.com> - 9.2.3-1 +- Initial packaging. (Version 9.2.3) @@ -0,0 +1,4 @@ +92ef66d63e5a728524af27561ccfba27 ghc-9.2.3-aarch64-unknown-linux.tar.xz +e58127be0f843ae44e6e3ccfad04d740 ghc-9.2.3-powerpc64-unknown-linux.tar.xz +d2881076bda6e685578b2227dddec802 ghc-9.2.3-powerpc64le-unknown-linux.tar.xz +754d28e669df56f9ac125829de14c68c ghc-9.2.3-x86_64-unknown-linux.tar.xz |