83 lines
1.8 KiB
RPMSpec
83 lines
1.8 KiB
RPMSpec
# generated by cabal-rpm-2.1.0
|
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
|
|
|
|
%bcond_without tests
|
|
|
|
Name: alex
|
|
Version: 3.2.7.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
|
|
cd doc
|
|
autoreconf
|
|
./configure --prefix=%{_prefix} --libdir=%{_libdir}
|
|
make html
|
|
cd ..
|
|
|
|
|
|
%install
|
|
# Begin cabal-rpm install
|
|
%ghc_bin_install
|
|
# End cabal-rpm install
|
|
install -D -m 0644 doc/alex.1 %{buildroot}%{_mandir}/man1/alex.1
|
|
|
|
|
|
%check
|
|
%if %{with tests}
|
|
%cabal_test
|
|
%endif
|
|
|
|
|
|
%files
|
|
# Begin cabal-rpm files:
|
|
%license LICENSE
|
|
%doc CHANGELOG.md README.md TODO examples
|
|
%{_bindir}/%{name}
|
|
%{_datadir}/%{name}-%{version}
|
|
# End cabal-rpm files
|
|
%doc doc/alex
|
|
%{_mandir}/man1/alex.1*
|
|
|
|
|
|
%changelog
|
|
%autochangelog
|