]> git.pld-linux.org Git - packages/ghc-base-compat-batteries.git/blame - ghc-base-compat-batteries.spec
rebuild with ghc 8.10.7
[packages/ghc-base-compat-batteries.git] / ghc-base-compat-batteries.spec
CommitLineData
3572beea
JR
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
5%define pkgname base-compat-batteries
6Summary: base-compat with extra batteries
7Name: ghc-%{pkgname}
8Version: 0.11.1
27000609 9Release: 2
3572beea
JR
10License: MIT
11Group: Development/Languages
12#Source0Download: http://hackage.haskell.org/package/base-compat-batteries
13Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14# Source0-md5: c1975c1d453094193426762a9c59f786
15URL: http://hackage.haskell.org/package/base-compat-batteries
16BuildRequires: ghc >= 6.12.3
17BuildRequires: ghc-base-compat = 0.11.1
18%if %{with prof}
19BuildRequires: ghc-prof
20BuildRequires: ghc-base-compat-prof = 0.11.1
21%endif
22BuildRequires: rpmbuild(macros) >= 1.608
23%requires_eq ghc
24Requires(post,postun): /usr/bin/ghc-pkg
25Requires: ghc-base-compat = 0.11.1
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28# debuginfo is not useful for ghc
29%define _enable_debug_packages 0
30
31# don't compress haddock files
32%define _noautocompressdoc *.haddock
33
34%description
35Provides functions available in later versions of base to a wider
36range of compilers, without requiring you to use CPP pragmas in your
37code.
38
39This package provides the same API as the base-compat library, but
40depends on compatibility packages (such as semigroups) to offer a
41wider support window than base-compat, which has no dependencies.
42Most of the modules in this library have the same names as in
43base-compat to make it easier to switch between the two. There also
44exist versions of each module with the suffix .Repl.Batteries, which
45are distinct from anything in base-compat, to allow for easier use in
46GHCi.
47
48%package prof
49Summary: Profiling %{pkgname} library for GHC
50Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
51Group: Development/Libraries
52Requires: %{name} = %{version}-%{release}
53Requires: ghc-base-compat-prof = 0.11.1
54
55%description prof
56Profiling %{pkgname} library for GHC. Should be installed when
57GHC's profiling subsystem is needed.
58
59%description prof -l pl.UTF-8
60Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
61kiedy potrzebujemy systemu profilującego z GHC.
62
63%prep
64%setup -q -n %{pkgname}-%{version}
65
66%build
67runhaskell Setup.lhs configure -v2 \
68 %{?with_prof:--enable-library-profiling} \
69 --prefix=%{_prefix} \
70 --libdir=%{_libdir} \
71 --libexecdir=%{_libexecdir} \
72 --docdir=%{_docdir}/%{name}-%{version}
73
74runhaskell Setup.lhs build
75runhaskell Setup.lhs haddock --executables
76
77%install
78rm -rf $RPM_BUILD_ROOT
79install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
80
81runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
82
83# work around automatic haddock docs installation
84%{__rm} -rf %{name}-%{version}-doc
85cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
86%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
87
88find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -type d | %{__sed} "s|$RPM_BUILD_ROOT|%dir |" > %{name}.files
89find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -name '*.hi' | %{__sed} "s|$RPM_BUILD_ROOT||" >> %{name}.files
90find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -name '*.dyn_hi' | %{__sed} "s|$RPM_BUILD_ROOT||" >> %{name}.files
91find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -name '*.p_hi' | %{__sed} "s|$RPM_BUILD_ROOT||" >> %{name}-prof.files
92
93runhaskell Setup.lhs register \
94 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
95
96%clean
97rm -rf $RPM_BUILD_ROOT
98
99%post
100%ghc_pkg_recache
101
102%postun
103%ghc_pkg_recache
104
105%files -f %{name}.files
106%defattr(644,root,root,755)
107%doc CHANGES.markdown README.markdown %{name}-%{version}-doc/*
108%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
109%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
110%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
111%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
112
113%if %{with prof}
114%files prof -f %{name}-prof.files
115%defattr(644,root,root,755)
116%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
117%endif
This page took 0.043136 seconds and 4 git commands to generate.