# generated by cabal-rpm-2.2.2 # https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/ %global upstream_version 2024-10-08 %global fedora_version %(echo %{upstream_version} | sed s/-/_/) Name: hell Version: 0~2024_10_08 Release: 1%{?dist} Summary: Mini-Haskell shell-script language License: BSD-3-Clause Url: https://github.com/chrisdone/hell # Begin cabal-rpm sources: Source0: https://github.com/chrisdone/hell/archive/refs/tags/%{upstream_version}.tar.gz#/%{name}-%{upstream_version}.tar.gz # End cabal-rpm sources Patch0: hell-ghc9.6.patch # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-QuickCheck-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-async-devel BuildRequires: ghc-base-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-constraints-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-directory-devel BuildRequires: ghc-haskell-src-exts-devel BuildRequires: ghc-hspec-devel BuildRequires: ghc-lucid-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-optparse-applicative-devel BuildRequires: ghc-syb-devel BuildRequires: ghc-tagged-devel BuildRequires: ghc-template-haskell-devel BuildRequires: ghc-text-devel BuildRequires: ghc-th-lift-devel BuildRequires: ghc-th-orphans-devel BuildRequires: ghc-typed-process-devel BuildRequires: ghc-unliftio-devel BuildRequires: ghc-vector-devel BuildRequires: help2man # End cabal-rpm deps # FIXME remove for next version BuildRequires: ghc-hpack %description Haskell hell shell interpreter %prep # Begin cabal-rpm setup: %setup -q -n %{name}-%{upstream_version} # End cabal-rpm setup %if 0%{?fedora} >= 41 || 0%{?rhel} >= 10 %autopatch -p1 %endif %build hpack %if 0%{?fedora} < 41 cabal-tweak-dep-ver base '>=4.17.2.1' '< 5' %endif # Begin cabal-rpm build: %ghc_bin_build # End cabal-rpm build %install # Begin cabal-rpm install %ghc_bin_install set noclobber mkdir -p %{buildroot}%{bash_completions_dir} %{buildroot}%{_bindir}/%{name} --bash-completion-script %{name} | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/%{name} mkdir -p %{buildroot}%{_mandir}/man1/ help2man --no-info %{buildroot}%{_bindir}/%{name} > %{buildroot}%{_mandir}/man1/%{name}.1 # End cabal-rpm install %check cat > test.hell << EOF main = do Text.putStrLn "Hello from hell!" args <- Environment.getArgs Monad.mapM_ Text.putStrLn args EOF %{buildroot}%{_bindir}/hell test.hell testing 123 %files # Begin cabal-rpm files: %doc examples %{_bindir}/%{name} %{bash_completions_dir}/%{name} %{_mandir}/man1/%{name}.1* # End cabal-rpm files %changelog * Sat Oct 26 2024 Jens Petersen - 2024-10-08-1 - spec file generated by cabal-rpm-2.2.2