From d0b3a415b2ac10921ef6e1c79f457c9e300ee890 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 25 Oct 2023 17:49:45 +0000 Subject: automatic import of ghc-bootstrap-tools --- .gitignore | 2 ++ ghc-bootstrap-tools.spec | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ sources | 2 ++ 3 files changed, 62 insertions(+) create mode 100644 ghc-bootstrap-tools.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..4ae921b 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/alex-3.4.0.0.tar.gz +/happy-1.20.0.tar.gz diff --git a/ghc-bootstrap-tools.spec b/ghc-bootstrap-tools.spec new file mode 100644 index 0000000..645ad7a --- /dev/null +++ b/ghc-bootstrap-tools.spec @@ -0,0 +1,58 @@ +%define alex_ver 3.4.0.0 +%define happy_ver 1.20.0 +%global debug_package %{nil} + +Name: ghc-bootstrap-tools +Version: 1.0 +Release: 1 +Summary: Dependencies for ghc bootstrap. +License: BSD-2-Clause and BSD-3-Clause +URL: https://gitee.com/src-openeuler/ghc-bootstrap-tools +Source0: https://hackage.haskell.org/package/alex-%{alex_ver}/alex-%{alex_ver}.tar.gz +Source1: https://hackage.haskell.org/package/happy-%{happy_ver}/happy-%{happy_ver}.tar.gz + +BuildRequires: ghc-bootstrap + +Conflicts: alex +Conflicts: happy + +%description +Prebuild alex and happy for bootstrapping the proper ghc build. +Don't use outside of ghc bootstrapping! +For alex and happy, install the seperated package instead. + +%prep +%setup -q -c -a0 -a1 + +%build +export PATH=/opt/bin:$PATH +pushd alex-%{alex_ver} +ghc Setup.hs -o cabal +./cabal configure --prefix=%{_prefix} +./cabal build +popd + +pushd happy-%{happy_ver} +ghc Setup.hs -o cabal +./cabal configure --prefix=%{_prefix} +./cabal build +popd + +%install +pushd alex-%{alex_ver} +./cabal copy --destdir=%{buildroot} +popd + +pushd happy-%{happy_ver} +./cabal copy --destdir=%{buildroot} +popd + +%files +%{_bindir}/alex +%{_bindir}/happy +%{_datadir}/*ghc* +%{_datadir}/doc/*ghc* + +%changelog +* Sat Jul 22 2023 Lin Runze - 1.0-1 +- Initial packaging. (Version 1.0) diff --git a/sources b/sources new file mode 100644 index 0000000..9a5c6f0 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +a7aff3c0e479e6a25091f4c1ec6b27b1 alex-3.4.0.0.tar.gz +f6d214eb9f0271e327a2948ba45d1612 happy-1.20.0.tar.gz -- cgit v1.2.3