%define ghc_ver %(ghc --numeric-version) %define pkgname %(echo %name | sed "s|^ghc-||") %define bootstrap 1 Name: happy Version: 1.20.1.1 Release: 1mamba Summary: The Parser Generator for Haskell Group: Development/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://hackage.haskell.org/package/%{pkgname} Source: https://hackage.haskell.org/package/happy-%{version}/happy-%{version}.tar.gz License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libgmp-devel BuildRequires: libnuma-devel ## AUTOBUILDREQ-END %if "%{bootstrap}" == "1" BuildRequires: ghc-bin %else BuildRequires: ghc %endif Obsoletes: haskell-platform <= 2013.2.0.0 #Requires: ghc = %{ghc_ver} %description The Parser Generator for Haskell. %prep %setup -q if [ "%{version}" == "1.21.0" ]; then echo "Not updating to older developer version." exit 1 fi %build %if "%{bootstrap}" == "1" export PATH="/opt/ghc/bin:$PATH" %ifarch aarch64 # ghc-bin 9.0.2 for aarch64 requires llvm 13 export PATH="/var/autodist/clang+llvm-13.0.1-aarch64-linux-gnu/bin:$PATH" %endif %endif runghc Setup.hs configure -v2 \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --libexecdir=%{_libexecdir} \ --docdir=%{_docdir}/%{name}-%{version} runghc Setup.hs build runghc Setup.hs haddock --executable --html-location=URL --hyperlink-source %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %if "%{bootstrap}" == "1" export PATH="/opt/ghc/bin:$PATH" %endif runghc Setup.hs copy --destdir=%{buildroot} runghc Setup.hs register \ --gen-pkg-config="%{buildroot}%{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf" %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %{_bindir}/happy %dir %{_datadir}/*-linux-ghc-*/happy-%{version} %{_datadir}/*-linux-ghc-*/happy-%{version}/* %{_docdir}/%{name}-%{version}/LICENSE %{_docdir}/%{name}-%{version}/html %changelog * Wed Nov 22 2023 Silvan Calarco 1.20.1.1-1mamba - downgrade to 1.20.1.1 * Sun Nov 12 2023 Automatic Build System 1.21.0-1mamba - automatic version update by autodist * Sat Nov 11 2023 Silvan Calarco 1.20.1.1-1mamba - package created using the webbuild interface