%define alex_ver 3.5.1.0 %define happy_ver 1.20.1.1 %define debug_package %{nil} Name: ghc-bootstrap-helpers Version: 1.4 Release: 1%{?dist} Summary: Dependencies to build GHC License: BSD-2-Clause AND BSD-3-Clause URL: https://build.opensuse.org/project/show/devel:languages:haskell Source: 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 ExcludeArch: %{ix86} # This package is not meant to be used outside OBS Requires: this-is-only-for-build-envs Conflicts: alex Conflicts: happy %description Prebuild alex and happy for bootstrapping the proper ghc build. Don't use outside of GHC bootstrapping! %prep %setup -q -c -a0 -a1 %build pushd alex-%{alex_ver} %{_bindir}/ghc Setup.hs -o cabal ./cabal configure --prefix=%{_prefix} ./cabal build popd pushd happy-%{happy_ver} %{_bindir}/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*