-
Notifications
You must be signed in to change notification settings - Fork 0
/
ghcup.spec
227 lines (204 loc) · 6.66 KB
/
ghcup.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# generated by cabal-rpm-2.2.2 --standalone
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
%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 ghcup
%global pkgver %{pkg_name}-%{version}
Name: %{pkg_name}
Version: 0.1.30.0
Release: 1%{?dist}
Summary: Ghc toolchain installer
License: LGPL-3.0-only
Url: https://hackage.haskell.org/package/ghcup
# Begin cabal-rpm sources:
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
# End cabal-rpm sources
# https://github.com/haskell/ghcup-hs/pull/1127/commits/ed0fd9bab79f477256c4cc747ac621c2cfa9f87f
Patch0: 1127-backport.patch
# Begin cabal-rpm deps:
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-Cabal-devel
%if %{defined fedora}
BuildRequires: ghc-Cabal-syntax-devel
%endif
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-aeson-pretty-devel
BuildRequires: ghc-async-devel
BuildRequires: ghc-base-devel
BuildRequires: ghc-base16-bytestring-devel
BuildRequires: ghc-binary-devel
%if %{defined fedora}
BuildRequires: ghc-brick-devel
%endif
BuildRequires: ghc-bytestring-devel
#BuildRequires: ghc-bz2-devel
BuildRequires: ghc-case-insensitive-devel
#BuildRequires: ghc-casing-devel
BuildRequires: ghc-conduit-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-cryptohash-sha256-devel
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-directory-devel
%if %{defined fedora}
BuildRequires: ghc-disk-free-space-devel
%endif
BuildRequires: ghc-exceptions-devel
#BuildRequires: ghc-file-uri-devel
BuildRequires: ghc-filepath-devel
#BuildRequires: ghc-haskus-utils-types-devel
#BuildRequires: ghc-haskus-utils-variant-devel
#BuildRequires: ghc-libarchive-devel
#BuildRequires: ghc-lzma-static-devel
BuildRequires: ghc-megaparsec-devel
BuildRequires: ghc-mtl-devel
#BuildRequires: ghc-optics-devel
BuildRequires: ghc-optparse-applicative-devel
#BuildRequires: ghc-os-release-devel
BuildRequires: ghc-parsec-devel
BuildRequires: ghc-pretty-devel
BuildRequires: ghc-pretty-terminal-devel
BuildRequires: ghc-process-devel
BuildRequires: ghc-regex-posix-devel
BuildRequires: ghc-resourcet-devel
%if %{defined fedora}
BuildRequires: ghc-retry-devel
%endif
BuildRequires: ghc-safe-devel
%if %{defined fedora}
BuildRequires: ghc-safe-exceptions-devel
%endif
BuildRequires: ghc-split-devel
#BuildRequires: ghc-strict-base-devel
BuildRequires: ghc-tagsoup-devel
BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-temporary-devel
BuildRequires: ghc-terminal-size-devel
BuildRequires: ghc-text-devel
BuildRequires: ghc-time-devel
BuildRequires: ghc-transformers-devel
BuildRequires: ghc-unix-devel
#BuildRequires: ghc-unix-bytestring-devel
BuildRequires: ghc-unliftio-core-devel
BuildRequires: ghc-unordered-containers-devel
%if %{defined fedora}
BuildRequires: ghc-uri-bytestring-devel
%endif
BuildRequires: ghc-utf8-string-devel
BuildRequires: ghc-vector-devel
#BuildRequires: ghc-versions-devel
%if %{defined fedora}
BuildRequires: ghc-vty-devel
BuildRequires: ghc-word8-devel
%endif
#BuildRequires: ghc-yaml-devel
BuildRequires: ghc-zlib-devel
BuildRequires: help2man
BuildRequires: cabal-install
# for missing dep 'chs-deps':
BuildRequires: ghc-array-devel
# for missing dep 'file-uri':
BuildRequires: ghc-attoparsec-devel
# for missing dep 'libarchive':
BuildRequires: ghc-dlist-devel
BuildRequires: ghc-unix-compat-devel
# for missing dep 'optics':
BuildRequires: ghc-array-devel
# for missing dep 'optics-core':
BuildRequires: ghc-array-devel
%if 0%{?fedora} >= 43
BuildRequires: ghc-indexed-profunctors-devel
%endif
BuildRequires: ghc-indexed-traversable-devel
# for missing dep 'optics-extra':
BuildRequires: ghc-array-devel
BuildRequires: ghc-hashable-devel
%if %{defined fedora}
BuildRequires: ghc-indexed-traversable-instances-devel
%endif
# for missing dep 'optics-th':
BuildRequires: ghc-th-abstraction-devel
# for missing dep 'recursion-schemes':
BuildRequires: ghc-comonad-devel
BuildRequires: ghc-data-fix-devel
%if %{defined fedora}
BuildRequires: ghc-free-devel
%endif
BuildRequires: ghc-th-abstraction-devel
# End cabal-rpm deps
# for text2
BuildRequires: gcc-c++
# for libarchive
BuildRequires: libarchive-devel
%if %{defined el9}
BuildRequires: ghc-terminfo-devel
%endif
%description
A rewrite of the shell script ghcup, for providing a more stable user
experience and exposing an API.
%prep
# Begin cabal-rpm setup:
%autosetup -p1
# End cabal-rpm setup
%if 0%{?fedora} >= 41
cabal-tweak-dep-ver haskus-utils-variant '^>=3.3' '^>=3.4'
cabal-tweak-dep-ver mtl '^>=2.2' '>=2.2'
cabal-tweak-dep-ver transformers '^>=0.5' '>=0.5'
%endif
%build
# Begin cabal-rpm build:
%global cabal_install %{_bindir}/cabal
%cabal_install update
%if %{defined rhel} && 0%{?rhel} < 9
%cabal_install sandbox init
%cabal_install install
%endif
# End cabal-rpm build
%install
# Begin cabal-rpm install
mkdir -p %{buildroot}%{_bindir}
%if %{defined fedora} || 0%{?rhel} >= 9
%ghc_set_gcc_flags
%cabal_install install --install-method=copy --enable-executable-stripping --installdir=%{buildroot}%{_bindir} --constraint="libarchive +system-libarchive" \
%if 0%{?fedora} < 41
--constraint="haskus-utils-data < 1.5"
%else
%{nil}
%endif
%else
for i in .cabal-sandbox/bin/*; do
strip -s -o %{buildroot}%{_bindir}/$(basename $i) $i
done
%endif
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
%files
# Begin cabal-rpm files:
%license LICENSE
%doc CHANGELOG.md README.md
%{_bindir}/%{name}
%{bash_completions_dir}/%{name}
%{_mandir}/man1/%{name}.1*
# End cabal-rpm files
%changelog
* Wed Sep 18 2024 Jens Petersen <petersen@redhat.com> - 0.1.30.0-1
- https://hackage.haskell.org/package/ghcup-0.1.30.0/changelog
* Mon May 27 2024 Jens Petersen <petersen@redhat.com> - 0.1.22.0-1
- https://hackage.haskell.org/package/ghcup-0.1.22.0/changelog
* Sun Nov 12 2023 Jens Petersen <petersen@redhat.com> - 0.1.20.0-1
- https://hackage.haskell.org/package/ghcup-0.1.20.0/changelog
* Fri Apr 7 2023 Jens Petersen <petersen@redhat.com> - 0.1.19.2-1
- https://hackage.haskell.org/package/ghcup-0.1.19.2/changelog
- disable internal-downloader
* Mon Nov 21 2022 Jens Petersen <petersen@redhat.com> - 0.1.18.0-2
- enable tui and internal-downloader
* Mon Nov 21 2022 Jens Petersen <petersen@redhat.com> - 0.1.18.0-1
- initial package