summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-28 08:26:51 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-28 08:26:51 +0000
commitff42c9bdce3720eea8bc0b22fd75a822a8426023 (patch)
tree1d3f1d6c9e52d48a8a88a55843b003556d74b2ac
parent0ce4f579c3d83a3a0c9abe6cae8e2c451747353a (diff)
automatic import of happyopeneuler23.09
-rw-r--r--.gitignore1
-rw-r--r--happy.spec80
-rw-r--r--sources1
3 files changed, 82 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..b560ca7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/happy-1.20.1.1.tar.gz
diff --git a/happy.spec b/happy.spec
new file mode 100644
index 0000000..7e0d334
--- /dev/null
+++ b/happy.spec
@@ -0,0 +1,80 @@
+%bcond_with tests
+
+Name: happy
+Version: 1.20.1.1
+Release: 1
+Summary: Happy is a parser generator for Haskell
+License: BSD-2-Clause
+URL: https://hackage.haskell.org/package/%{name}
+Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
+BuildRequires: autoconf
+BuildRequires: docbook-dtds
+BuildRequires: docbook-style-xsl
+BuildRequires: ghc-Cabal-devel
+BuildRequires: ghc-array-devel
+BuildRequires: ghc-array-prof
+BuildRequires: ghc-base-devel
+BuildRequires: ghc-base-prof
+BuildRequires: ghc-containers-devel
+BuildRequires: ghc-containers-prof
+BuildRequires: ghc-mtl-devel
+BuildRequires: ghc-mtl-prof
+BuildRequires: ghc-rpm-macros
+BuildRequires: libxml2
+BuildRequires: libxslt
+ExcludeArch: %{ix86}
+%if %{with tests}
+BuildRequires: ghc-process-devel
+BuildRequires: ghc-process-prof
+%endif
+
+%description
+Happy is a parser generator for Haskell. Given a grammar specification in BNF,
+Happy generates Haskell code to parse the grammar. Happy works in a similar way
+to the 'yacc' tool for C.
+
+%prep
+%autosetup
+find . -type f -exec chmod -x {} +
+
+%build
+%define cabal_configure_options -f-bootstrap
+%ghc_bin_build
+cd doc
+autoreconf
+%configure
+%make_build html
+
+%install
+%ghc_bin_install
+# drop artifacts from autoconf that differ across builds to fix build-compare
+rm -rf doc/autom4te.cache doc/config.log doc/config.status
+
+install -D --mode=444 doc/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
+
+%check
+%cabal_test
+
+%files
+%license LICENSE
+%doc ChangeLog.md doc examples
+%{_bindir}/%{name}
+%dir %{_datadir}/%{name}-%{version}
+%{_mandir}/man1/*
+%{_datadir}/%{name}-%{version}/GLR_Base
+%{_datadir}/%{name}-%{version}/GLR_Lib
+%{_datadir}/%{name}-%{version}/GLR_Lib-ghc
+%{_datadir}/%{name}-%{version}/GLR_Lib-ghc-debug
+%{_datadir}/%{name}-%{version}/HappyTemplate
+%{_datadir}/%{name}-%{version}/HappyTemplate-arrays
+%{_datadir}/%{name}-%{version}/HappyTemplate-arrays-coerce
+%{_datadir}/%{name}-%{version}/HappyTemplate-arrays-coerce-debug
+%{_datadir}/%{name}-%{version}/HappyTemplate-arrays-debug
+%{_datadir}/%{name}-%{version}/HappyTemplate-arrays-ghc
+%{_datadir}/%{name}-%{version}/HappyTemplate-arrays-ghc-debug
+%{_datadir}/%{name}-%{version}/HappyTemplate-coerce
+%{_datadir}/%{name}-%{version}/HappyTemplate-ghc
+
+%changelog
+* Tue Aug 22 2023 Lin Runze <lrzlin@163.com> 1.20.1.1-1
+- Initial packaging (Version 1.20.1.1)
diff --git a/sources b/sources
new file mode 100644
index 0000000..4f92131
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+2dcd1c6a080db2c80546efe0b740eadf happy-1.20.1.1.tar.gz