-
Notifications
You must be signed in to change notification settings - Fork 0
/
dhall-json.spec
163 lines (144 loc) · 4.88 KB
/
dhall-json.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
# generated by cabal-rpm-2.0.7 --standalone --stream hackage
# 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 dhall-json
%global pkgver %{pkg_name}-%{version}
# testsuite missing deps: tasty-silver
Name: %{pkg_name}
Version: 1.7.2
Release: 1%{?dist}
Summary: Convert between Dhall and JSON or YAML
License: BSD
Url: https://hackage.haskell.org/package/%{name}
# Begin cabal-rpm sources:
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
# End cabal-rpm sources
# Begin cabal-rpm deps:
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-aeson-pretty-devel
%if 0%{fedora} >= 34
BuildRequires: ghc-aeson-yaml-devel
%endif
BuildRequires: ghc-ansi-terminal-devel
BuildRequires: ghc-base-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
%if 0%{fedora} >= 32
BuildRequires: ghc-dhall-devel
%endif
BuildRequires: ghc-exceptions-devel
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-lens-family-core-devel
BuildRequires: ghc-optparse-applicative-devel
BuildRequires: ghc-prettyprinter-devel
BuildRequires: ghc-prettyprinter-ansi-terminal-devel
BuildRequires: ghc-scientific-devel
BuildRequires: ghc-text-devel
BuildRequires: ghc-unordered-containers-devel
BuildRequires: ghc-vector-devel
BuildRequires: cabal-install > 1.18
# for missing dep 'dhall':
BuildRequires: ghc-Diff-devel
%if 0%{?fedora} >= 32
BuildRequires: ghc-atomic-write-devel
%endif
BuildRequires: ghc-case-insensitive-devel
%if 0%{?fedora} >= 32
BuildRequires: ghc-cborg-devel
BuildRequires: ghc-cborg-json-devel
%endif
BuildRequires: ghc-contravariant-devel
BuildRequires: ghc-cryptonite-devel
%if 0%{?fedora} >= 32
BuildRequires: ghc-data-fix-devel
%endif
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-directory-devel
BuildRequires: ghc-dotgen-devel
BuildRequires: ghc-either-devel
BuildRequires: ghc-half-devel
BuildRequires: ghc-hashable-devel
BuildRequires: ghc-haskeline-devel
BuildRequires: ghc-http-client-devel
BuildRequires: ghc-http-client-tls-devel
BuildRequires: ghc-http-types-devel
BuildRequires: ghc-lens-family-core-devel
BuildRequires: ghc-megaparsec-devel
BuildRequires: ghc-memory-devel
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-network-uri-devel
BuildRequires: ghc-parser-combinators-devel
%if 0%{?fedora} >= 32
BuildRequires: ghc-parsers-devel
BuildRequires: ghc-pretty-simple-devel
%endif
BuildRequires: ghc-profunctors-devel
BuildRequires: ghc-repline-devel
%if 0%{?fedora} >= 32
BuildRequires: ghc-serialise-devel
%endif
BuildRequires: ghc-template-haskell-devel
%if 0%{?fedora} >= 32
BuildRequires: ghc-text-manipulate-devel
%endif
BuildRequires: ghc-th-lift-instances-devel
BuildRequires: ghc-transformers-devel
BuildRequires: ghc-transformers-compat-devel
BuildRequires: ghc-uri-encode-devel
# End cabal-rpm deps
%description
Use this package if you want to convert between Dhall expressions and JSON or
YAML. You can use this package as a library or an executable:
* Use the 'dhall-to-json', 'dhall-to-yaml', or 'json-to-dhall' programs from
this package if you want an executable
%prep
# Begin cabal-rpm setup:
%setup -q
# End cabal-rpm setup
%build
# Begin cabal-rpm build:
cabal update
%if 0%{fedora} < 33
cabal sandbox init
cabal install
%endif
# End cabal-rpm build
%install
mkdir -p %{buildroot}%{_bindir}
%if 0%{fedora} >= 33
cabal install --install-method=copy --installdir=%{buildroot}%{_bindir}
%else
for i in dhall-to-json dhall-to-yaml json-to-dhall; do
strip -s -o %{buildroot}%{_bindir}/$i .cabal-sandbox/bin/$i
done
%endif
# Begin cabal-rpm install
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/
%{buildroot}%{_bindir}/dhall-to-json --bash-completion-script dhall-to-json > %{buildroot}%{_datadir}/bash-completion/completions/dhall-to-json
%{buildroot}%{_bindir}/dhall-to-yaml --bash-completion-script dhall-to-yaml > %{buildroot}%{_datadir}/bash-completion/completions/dhall-to-yaml
%{buildroot}%{_bindir}/json-to-dhall --bash-completion-script json-to-dhall > %{buildroot}%{_datadir}/bash-completion/completions/json-to-dhall
# End cabal-rpm install
%files
# Begin cabal-rpm files:
%license LICENSE
%doc CHANGELOG.md
%{_bindir}/dhall-to-json
%{_bindir}/dhall-to-yaml
%{_bindir}/json-to-dhall
%{_datadir}/bash-completion/completions/dhall-to-json
%{_datadir}/bash-completion/completions/dhall-to-yaml
%{_datadir}/bash-completion/completions/json-to-dhall
# End cabal-rpm files
%changelog
* Wed Oct 7 00:07:04 +08 2020 Jens Petersen <petersen@redhat.com> - 1.7.2-1
- update to 1.7.2
* Wed Feb 5 2020 Fedora Haskell SIG <haskell@lists.fedoraproject.org> - 1.2.6-1
- spec file generated by cabal-rpm-2.0.0