]> git.pld-linux.org Git - packages/ghc-call-stack.git/blame - ghc-call-stack.spec
rebuild with ghc 8.10.7
[packages/ghc-call-stack.git] / ghc-call-stack.spec
CommitLineData
7907698e
JR
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
5%define pkgname call-stack
6Summary: Use GHC call-stacks in a backward compatible way
7Name: ghc-%{pkgname}
8Version: 0.2.0
dcf56a68 9Release: 2
7907698e
JR
10License: MIT
11Group: Development/Languages
12#Source0Download: http://hackage.haskell.org/package/call-stack
13Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14# Source0-md5: 6a0b2438458fe1647d601f2b001a1eee
15URL: http://hackage.haskell.org/package/call-stack
16BuildRequires: ghc >= 6.12.3
17%if %{with prof}
18BuildRequires: ghc-prof
19%endif
20BuildRequires: rpmbuild(macros) >= 1.608
21%requires_eq ghc
22Requires(post,postun): /usr/bin/ghc-pkg
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25# debuginfo is not useful for ghc
26%define _enable_debug_packages 0
27
28# don't compress haddock files
29%define _noautocompressdoc *.haddock
30
31%description
32Use GHC call-stacks in a backward compatible way.
33
34%package prof
35Summary: Profiling %{pkgname} library for GHC
36Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
37Group: Development/Libraries
38Requires: %{name} = %{version}-%{release}
39Requires: ghc-prof
40
41%description prof
42Profiling %{pkgname} library for GHC. Should be installed when
43GHC's profiling subsystem is needed.
44
45%description prof -l pl.UTF-8
46Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
47kiedy potrzebujemy systemu profilującego z GHC.
48
49%prep
50%setup -q -n %{pkgname}-%{version}
51
52%build
53runhaskell Setup.lhs configure -v2 \
54 %{?with_prof:--enable-library-profiling} \
55 --prefix=%{_prefix} \
56 --libdir=%{_libdir} \
57 --libexecdir=%{_libexecdir} \
58 --docdir=%{_docdir}/%{name}-%{version}
59
60runhaskell Setup.lhs build
61runhaskell Setup.lhs haddock --executables
62
63%install
64rm -rf $RPM_BUILD_ROOT
65install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
66
67runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
68
69# work around automatic haddock docs installation
70%{__rm} -rf %{name}-%{version}-doc
71cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
72%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
73
74runhaskell Setup.lhs register \
75 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
76
77%clean
78rm -rf $RPM_BUILD_ROOT
79
80%post
81%ghc_pkg_recache
82
83%postun
84%ghc_pkg_recache
85
86%files
87%defattr(644,root,root,755)
88%doc LICENSE %{name}-%{version}-doc/html
89%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
90%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
91%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
92%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
93%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
94
95%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
96%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
97%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
98%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
99%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
100
101%if %{with prof}
102%files prof
103%defattr(644,root,root,755)
104%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
105%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
106%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
107%endif
This page took 0.09806 seconds and 4 git commands to generate.