-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhlint.spec
140 lines (111 loc) · 3.45 KB
/
hlint.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
# https://fedoraproject.org/wiki/Packaging:Haskell
%global ghc_without_dynamic 1
%global ghc_without_shared 1
%global without_prof 1
%global without_haddock 1
%global pkg_name hlint
%global pkgver %{pkg_name}-%{version}
# nothing to see here
%global debug_package %{nil}
Name: %{pkg_name}
Version: 2.1.15
Release: 1%{?dist}
Summary: Haskell source code suggestions
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-ansi-terminal-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-cmdargs-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-cpphs-devel
BuildRequires: ghc-data-default-devel
BuildRequires: ghc-directory-devel
%if 0%{?fedora}
BuildRequires: ghc-extra-devel
%endif
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-haskell-src-exts-devel
%if 0%{?fedora} >= 27
BuildRequires: ghc-haskell-src-exts-util-devel
%endif
BuildRequires: ghc-hscolour-devel
BuildRequires: ghc-process-devel
%if 0%{?fedora}
BuildRequires: ghc-refact-devel
%endif
BuildRequires: ghc-text-devel
BuildRequires: ghc-transformers-devel
BuildRequires: ghc-uniplate-devel
BuildRequires: ghc-unordered-containers-devel
BuildRequires: ghc-vector-devel
BuildRequires: ghc-yaml-devel
# End cabal-rpm deps
BuildRequires: cabal-install > 1.18
# for h-s-e
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: happy
%endif
%description
HLint gives suggestions on how to improve your source code.
%prep
# Begin cabal-rpm setup:
%setup -q
# End cabal-rpm setup
%build
%global cabal cabal
%cabal update
%cabal sandbox init
%if 0%{?rhel} && 0%{?rhel} < 8
%cabal install happy
%endif
# --force-reinstalls needed on f26 and f27
%cabal install --only-dependencies --force-reinstalls
%ghc_bin_build
%install
%ghc_bin_install
mkdir -p %{buildroot}%{_mandir}/man1
cp -p data/hlint.1 %{buildroot}%{_mandir}/man1
find %{buildroot}%{_libdir} -name "libHS%{pkgver}-*.so" -delete
rm -r %{buildroot}%{ghclibdir}
%files
%license LICENSE
%if 0%{?fedora} < 29
%license .cabal-sandbox/share/doc/*/*
%endif
%doc CHANGES.txt README.md
%{_bindir}/%{name}
%{_datadir}/%{name}-%{version}
%{_mandir}/man1/%{name}*
%changelog
* Mon Mar 18 2019 Jens Petersen <petersen@redhat.com> - 2.1.15-1
- update to 2.1.15
* Mon Dec 31 2018 Jens Petersen <petersen@redhat.com> - 2.1.12-1
- build newer happy on epel7
* Fri Dec 7 2018 Jens Petersen <petersen@redhat.com> - 2.1.11-1
- update to 2.1.11
- https://hackage.haskell.org/package/hlint-2.1.11/changelog
* Mon Aug 20 2018 Jens Petersen <petersen@redhat.com> - 2.1.10-1
- update to 2.1.10
* Fri Jul 13 2018 Jens Petersen <petersen@redhat.com> - 2.1.8-1
- update to 2.1.8
* Mon Jun 25 2018 Jens Petersen <petersen@redhat.com> - 2.1.6-1
- update to 2.1.6
- build better with macros to fix datadir path
* Fri Apr 20 2018 Jens Petersen <petersen@redhat.com> - 2.1.3-1
- 2.1.3
- --force-reinstalls needed for F26 and F27
* Wed Feb 21 2018 Jens Petersen <petersen@redhat.com> - 2.1-1
- update to 2.1
* Tue Dec 5 2017 Jens Petersen <petersen@redhat.com> - 2.0.11-1
- update to 2.0.11
* Wed Jun 28 2017 Jens Petersen <petersen@redhat.com> - 2.0.9-1
- update to 2.0.9
* Sun Jun 11 2017 Jens Petersen <petersen@redhat.com> - 2.0.8-1
- initial copr package