# generated by cabal-rpm-2.2.2 --standalone
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/

%if %{defined epel}
%bcond_without ghc9
%endif

%global ghc_without_dynamic 1
%global ghc_without_shared 1
%undefine with_ghc_prof
%undefine with_haddock
%global without_prof 1
%global without_haddock 1
%global debug_package %{nil}

%global pkg_name jacinda
%global pkgver %{pkg_name}-%{version}
Name:           %{pkg_name}
Version:        3.2.0.0
Release:        1%{?dist}
Summary:        Functional, expression-oriented data processing language

License:        AGPL-3.0-only
Url:            https://hackage.haskell.org/package/jacinda
# Begin cabal-rpm sources:
Source0:        https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
# End cabal-rpm sources

BuildRequires:  ghc-rpm-macros
%if %{with ghc9}
BuildRequires:  ghc9.2-devel
%else
# Begin cabal-rpm deps:
BuildRequires:  ghc-Cabal-devel
BuildRequires:  ghc-rpm-macros
BuildRequires:  ghc-array-devel
BuildRequires:  ghc-base-devel
BuildRequires:  ghc-bytestring-devel
BuildRequires:  ghc-containers-devel
BuildRequires:  ghc-deepseq-devel
BuildRequires:  ghc-directory-devel
BuildRequires:  ghc-filepath-devel
#BuildRequires:  ghc-lazy-csv-devel
BuildRequires:  ghc-microlens-devel
BuildRequires:  ghc-microlens-mtl-devel
BuildRequires:  ghc-mtl-devel
BuildRequires:  ghc-optparse-applicative-devel
BuildRequires:  ghc-prettyprinter-devel
#BuildRequires:  ghc-regex-rure-devel
BuildRequires:  ghc-split-devel
BuildRequires:  ghc-text-devel
BuildRequires:  ghc-transformers-devel
BuildRequires:  ghc-vector-devel
# sub-deps
BuildRequires:  ghc-dlist-devel
BuildRequires:  ghc-unix-devel
%endif
BuildRequires:  alex
BuildRequires:  happy
BuildRequires:  help2man
BuildRequires:  cabal-install
# End cabal-rpm deps
BuildRequires:  librure-devel
BuildRequires:  gcc-c++

%description
APL meets AWK. A command-line tool for summarizing and reporting,
powered by Rust's regex library.


%prep
# Begin cabal-rpm setup:
%setup -q
# End cabal-rpm setup


%build
# Begin cabal-rpm build:
cabal update
# End cabal-rpm build


%install
# Begin cabal-rpm install
mkdir -p %{buildroot}%{_bindir}
%ghc_set_gcc_flags
cabal install %{?with_ghc9:-w ghc-9.2} --install-method=copy --enable-executable-stripping --installdir=%{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/
%{buildroot}%{_bindir}/ja --bash-completion-script ja | sed s/filenames/default/ > %{buildroot}%{_datadir}/bash-completion/completions/ja
# End cabal-rpm install

set noclobber
mkdir -p %{buildroot}%{bash_completions_dir}
%{buildroot}%{_bindir}/ja --bash-completion-script ja | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/ja

mkdir -p %{buildroot}%{_mandir}/man1/
cp -p man/ja.1 %{buildroot}%{_mandir}/man1/

mkdir -p %{buildroot}%{_datadir}/%{pkgver}
cp -pr prelude lib %{buildroot}%{_datadir}/%{pkgver}


%files
# Begin cabal-rpm files:
%license COPYING
%doc CHANGELOG.md README.md examples
%{_bindir}/ja
%{_datadir}/%{pkgver}
%{bash_completions_dir}/ja
%{_mandir}/man1/ja.1*
# End cabal-rpm files


%changelog
* Fri Oct 11 2024 Jens Petersen <petersen@redhat.com> - 3.2.0.0-1
- https://hackage.haskell.org/package/jacinda-3.2.0.0/changelog

* Mon Oct  7 2024 Jens Petersen <petersen@redhat.com> - 3.1.1.1-1
- https://hackage.haskell.org/package/jacinda-3.1.1.1/changelog

* Tue May 16 2023 Jens Petersen <petersen@redhat.com> - 1.2.0.0-1
- https://hackage.haskell.org/package/jacinda-1.2.0.0/changelog

* Thu Apr 14 2022 Jens Petersen <petersen@redhat.com> - 1.1.0.0-1
- https://hackage.haskell.org/package/jacinda-1.1.0.0/changelog
- build with ghc9.2

* Sun Jan 30 2022 Jens Petersen <petersen@redhat.com> - 0.3.0.0-1
- update to 0.3.0
- copy in data files by hand

* Mon Jan 10 2022 Jens Petersen <petersen@redhat.com> - 0.1.0.0-1
- initial packaging