-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhell.spec
107 lines (87 loc) · 2.75 KB
/
hell.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# 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 <[email protected]> - 2024-10-08-1
- spec file generated by cabal-rpm-2.2.2