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