summaryrefslogtreecommitdiff
path: root/ghc-bootstrap-tools.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-28 10:08:40 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-28 10:08:40 +0000
commitf242b759c235c290f4cadf40a7668f167b356738 (patch)
tree93c0a015d28052c64e1173241e58ca2df1161452 /ghc-bootstrap-tools.spec
parent24ba0bd8e87666603f439f52e08278d7b4b0c336 (diff)
automatic import of ghc-bootstrap-toolsopeneuler23.03
Diffstat (limited to 'ghc-bootstrap-tools.spec')
-rw-r--r--ghc-bootstrap-tools.spec58
1 files changed, 58 insertions, 0 deletions
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 <lrzlin@163.com> - 1.0-1
+- Initial packaging. (Version 1.0)