%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)