]> git.pld-linux.org Git - packages/ghc-errors.git/blame - ghc-errors.spec
rebuild with ghc 8.10.7
[packages/ghc-errors.git] / ghc-errors.spec
CommitLineData
acf06844
JR
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
5%define pkgname errors
6Summary: errors: Simplified error-handling
7Name: ghc-%{pkgname}
8Version: 2.3.0
d84ddd6c 9Release: 2
acf06844
JR
10License: BSD
11Group: Development/Languages
12#Source0Download: http://hackage.haskell.org/package/errors
13Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14# Source0-md5: 43bec23a661dd4a5eefb5549b4fad8a8
15URL: http://hackage.haskell.org/package/errors
16BuildRequires: ghc >= 6.12.3
17BuildRequires: ghc-safe >= 0.3.3
18BuildRequires: ghc-transformers >= 0.2
19BuildRequires: ghc-transformers-compat >= 0.4
20%if %{with prof}
21BuildRequires: ghc-prof
22BuildRequires: ghc-safe-prof >= 0.3.3
23BuildRequires: ghc-transformers-prof >= 0.2
24BuildRequires: ghc-transformers-compat-prof >= 0.4
25%endif
26BuildRequires: rpmbuild(macros) >= 1.608
27%requires_eq ghc
28Requires(post,postun): /usr/bin/ghc-pkg
29Requires: ghc-safe >= 0.3.3
30Requires: ghc-transformers >= 0.2
31Requires: ghc-transformers-compat >= 0.4
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34# debuginfo is not useful for ghc
35%define _enable_debug_packages 0
36
37# don't compress haddock files
38%define _noautocompressdoc *.haddock
39
40%description
41The one-stop shop for all your error-handling needs!
42Just import Control.Error.
43
44This library encourages an error-handling style that directly uses
45the type system, rather than out-of-band exceptions.
46
47%package prof
48Summary: Profiling %{pkgname} library for GHC
49Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
50Group: Development/Libraries
51Requires: %{name} = %{version}-%{release}
52Requires: ghc-safe-prof >= 0.3.3
53Requires: ghc-transformers-prof >= 0.2
54Requires: ghc-transformers-compat-prof >= 0.4
55
56%description prof
57Profiling %{pkgname} library for GHC. Should be installed when
58GHC's profiling subsystem is needed.
59
60%description prof -l pl.UTF-8
61Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
62kiedy potrzebujemy systemu profilującego z GHC.
63
64%prep
65%setup -q -n %{pkgname}-%{version}
66
67%build
68runhaskell Setup.hs configure -v2 \
69 %{?with_prof:--enable-library-profiling} \
70 --prefix=%{_prefix} \
71 --libdir=%{_libdir} \
72 --libexecdir=%{_libexecdir} \
73 --docdir=%{_docdir}/%{name}-%{version}
74
75runhaskell Setup.hs build
76runhaskell Setup.hs haddock --executables
77
78%install
79rm -rf $RPM_BUILD_ROOT
80install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
81
82runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
83
84# work around automatic haddock docs installation
85%{__rm} -rf %{name}-%{version}-doc
86cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
87%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
88
89runhaskell Setup.hs register \
90 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
91
92%clean
93rm -rf $RPM_BUILD_ROOT
94
95%post
96%ghc_pkg_recache
97
98%postun
99%ghc_pkg_recache
100
101%files
102%defattr(644,root,root,755)
103%doc CHANGELOG.md %{name}-%{version}-doc/*
104%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
105%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
106%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
107%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
108%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
109
110%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control
111%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/*.hi
112%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/*.dyn_hi
113%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Error
114%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Error/*.hi
115%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Error/*.dyn_hi
116%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
117%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
118%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
119
120%if %{with prof}
121%files prof
122%defattr(644,root,root,755)
123%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
124%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/*.p_hi
125%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Error/*.p_hi
126%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
127%endif
This page took 0.129517 seconds and 4 git commands to generate.