From 9815e99abf738ef26de79603a631a5a86ac82499 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 23:37:36 +0100 Subject: [PATCH] downgrade to 1.20.1.1 [release 1.20.1.1-1mamba;Wed Nov 22 2023] --- README.md | 2 ++ happy.spec | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 happy.spec diff --git a/README.md b/README.md index 976d346..d2967c4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # happy +The Parser Generator for Haskell. + diff --git a/happy.spec b/happy.spec new file mode 100644 index 0000000..4189e90 --- /dev/null +++ b/happy.spec @@ -0,0 +1,86 @@ +%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