alex/alex.spec

75 lines
1.6 KiB
RPMSpec

# generated by cabal-rpm-2.2.1
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
%bcond_without tests
Name: alex
Version: 3.4.0.1
Release: %autorelease
Summary: Tool for generating lexical analysers in Haskell
License: BSD-3-Clause
Url: https://hackage.haskell.org/package/%{name}
# Begin cabal-rpm sources:
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
# End cabal-rpm sources
# Begin cabal-rpm deps:
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-array-devel
BuildRequires: ghc-base-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-directory-devel
%if %{with tests}
BuildRequires: ghc-process-devel
%endif
# End cabal-rpm deps
BuildRequires: autoconf
BuildRequires: docbook-style-xsl
BuildRequires: make
BuildRequires: libxslt
%description
Alex is a tool for generating lexical analysers in Haskell. It takes a
description of tokens based on regular expressions and generates a Haskell
module containing code for scanning text efficiently. It is similar to the tool
lex or flex for C/C++.
%prep
# Begin cabal-rpm setup:
%setup -q
# End cabal-rpm setup
%build
# Begin cabal-rpm build:
%ghc_bin_build
# End cabal-rpm build
%install
# Begin cabal-rpm install
%ghc_bin_install
# End cabal-rpm install
%check
%if %{with tests}
PATH=%{buildroot}%{_bindir}:$PATH
%cabal_test
%endif
%files
# Begin cabal-rpm files:
%license LICENSE
%doc CHANGELOG.md README.md examples
%{_bindir}/%{name}
%{_datadir}/%{name}-%{version}
# End cabal-rpm files
%changelog
%autochangelog