]> git.pld-linux.org Git - SPECS.git/blob - ghc-resourcet.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / ghc-resourcet.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname resourcet
6 Summary:        Deterministic allocation and freeing of scarce resources
7 Summary(pl.UTF-8):      Deterministyczne przydzielanie i zwalnianie brakujących zasobów
8 Name:           ghc-%{pkgname}
9 Version:        1.2.4
10 Release:        1
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/resourcet
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  ea8f630f0630639eef7546e7315eda5f
16 URL:            http://hackage.haskell.org/package/resourcet
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base >= 4.3
19 BuildRequires:  ghc-containers
20 BuildRequires:  ghc-exceptions
21 BuildRequires:  ghc-mtl >= 2.0
22 BuildRequires:  ghc-primitive
23 BuildRequires:  ghc-transformers >= 0.2.2
24 BuildRequires:  ghc-unliftio-core
25 %if %{with prof}
26 BuildRequires:  ghc-prof >= 6.12.3
27 BuildRequires:  ghc-base-prof >= 4.3
28 BuildRequires:  ghc-containers-prof
29 BuildRequires:  ghc-exceptions-prof
30 BuildRequires:  ghc-mtl-prof >= 2.0
31 BuildRequires:  ghc-primitive-prof
32 BuildRequires:  ghc-transformers-prof >= 0.2.2
33 BuildRequires:  ghc-unliftio-core-prof
34 %endif
35 BuildRequires:  rpmbuild(macros) >= 1.608
36 Requires(post,postun):  /usr/bin/ghc-pkg
37 %requires_eq    ghc
38 Requires:       ghc-base >= 4.3
39 Requires:       ghc-containers
40 Requires:       ghc-exceptions
41 Requires:       ghc-mtl >= 2.0
42 Requires:       ghc-primitive
43 Requires:       ghc-transformers >= 0.2.2
44 Requires:       ghc-unliftio-core
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 # debuginfo is not useful for ghc
48 %define         _enable_debug_packages  0
49
50 # don't compress haddock files
51 %define         _noautocompressdoc      *.haddock
52
53 %description
54 Deterministic allocation and freeing of scarce resources. This package
55 was originally included with the conduit package, and has since been
56 split off. For more information, please see
57 <http://www.yesodweb.com/book/conduits>.
58
59 %description -l pl.UTF-8
60 Deterministyczne przydzielanie i zwalnianie brakujących zasobów. Ten
61 pakiet był pierwotnie częścią pakietu conduit, ale później został
62 wydzielony. Więcej informacji można znaleźć pod adresem
63 <http://www.yesodweb.com/book/conduits>.
64
65 %package prof
66 Summary:        Profiling %{pkgname} library for GHC
67 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
68 Group:          Development/Libraries
69 Requires:       %{name} = %{version}-%{release}
70 Requires:       ghc-base-prof >= 4.3
71 Requires:       ghc-containers-prof
72 Requires:       ghc-exceptions-prof
73 Requires:       ghc-mtl-prof >= 2.0
74 Requires:       ghc-primitive-prof
75 Requires:       ghc-transformers-prof >= 0.2.2
76 Requires:       ghc-unliftio-core-prof
77
78 %description prof
79 Profiling %{pkgname} library for GHC. Should be installed when
80 GHC's profiling subsystem is needed.
81
82 %description prof -l pl.UTF-8
83 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
84 kiedy potrzebujemy systemu profilującego z GHC.
85
86 %package doc
87 Summary:        HTML documentation for ghc %{pkgname} package
88 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
89 Group:          Documentation
90
91 %description doc
92 HTML documentation for ghc %{pkgname} package.
93
94 %description doc -l pl.UTF-8
95 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
96
97 %prep
98 %setup -q -n %{pkgname}-%{version}
99
100 %build
101 runhaskell Setup.lhs configure -v2 \
102         %{?with_prof:--enable-library-profiling} \
103         --prefix=%{_prefix} \
104         --libdir=%{_libdir} \
105         --libexecdir=%{_libexecdir} \
106         --docdir=%{_docdir}/%{name}-%{version}
107
108 runhaskell Setup.lhs build
109 runhaskell Setup.lhs haddock --executables
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
114
115 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
116
117 # work around automatic haddock docs installation
118 %{__rm} -rf %{name}-%{version}-doc
119 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
120 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
121
122 runhaskell Setup.lhs register \
123         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %post
129 %ghc_pkg_recache
130
131 %postun
132 %ghc_pkg_recache
133
134 %files
135 %defattr(644,root,root,755)
136 %doc LICENSE
137 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
138 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
139 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSresourcet-%{version}-*.so
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSresourcet-%{version}-*.a
141 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSresourcet-%{version}-*_p.a
142 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control
143 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad
144 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans
145 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/*.hi
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/*.dyn_hi
147 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/Resource
148 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/Resource/*.hi
149 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/Resource/*.dyn_hi
150 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
151 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
152 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
153 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Acquire
154 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Acquire/*.hi
155 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Acquire/*.dyn_hi
156 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/UnliftIO
157 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/UnliftIO/*.hi
158 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/UnliftIO/*.dyn_hi
159
160 %if %{with prof}
161 %files prof
162 %defattr(644,root,root,755)
163 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSresourcet-%{version}-*_p.a
164 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/Resource.p_hi
165 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/Resource/*.p_hi
166 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
167 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Acquire/*.p_hi
168 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/UnliftIO/*.p_hi
169 %endif
170
171 %files doc
172 %defattr(644,root,root,755)
173 %doc %{name}-%{version}-doc/*
This page took 0.226108 seconds and 3 git commands to generate.