3 %bcond_without prof # profiling library
5 %define pkgname http-client
6 Summary: An HTTP client engine
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/http-client
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: ad2dd8cc97e36f758f9207a5e4517a9e
15 URL: http://hackage.haskell.org/package/http-client
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-cookie
18 BuildRequires: ghc-filepath
19 BuildRequires: ghc-http-types >= 0.8)
20 BuildRequires: ghc-memory >= 0.7
21 BuildRequires: ghc-mime-types
22 BuildRequires: ghc-network >= 2.4
23 BuildRequires: ghc-network-uri >= 2.6
24 BuildRequires: ghc-random
25 BuildRequires: ghc-safe
26 BuildRequires: ghc-semigroups >= 0.16.1
27 BuildRequires: ghc-streaming-commons >= 0.1.0.2
29 BuildRequires: ghc-prof
30 BuildRequires: ghc-cookie-prof
31 BuildRequires: ghc-filepath-prof
32 BuildRequires: ghc-http-types-prof >= 0.8)
33 BuildRequires: ghc-memory-prof >= 0.7
34 BuildRequires: ghc-mime-types-prof
35 BuildRequires: ghc-network-prof >= 2.4
36 BuildRequires: ghc-network-uri-prof >= 2.6
37 BuildRequires: ghc-random-prof
38 BuildRequires: ghc-safe-prof
39 BuildRequires: ghc-semigroups-prof >= 0.16.1
40 BuildRequires: ghc-streaming-commons-prof >= 0.1.0.2
42 BuildRequires: rpmbuild(macros) >= 1.608
44 Requires(post,postun): /usr/bin/ghc-pkg
46 Requires: ghc-filepath
47 Requires: ghc-http-types >= 0.8)
48 Requires: ghc-memory >= 0.7
49 Requires: ghc-mime-types
50 Requires: ghc-network >= 2.4
51 Requires: ghc-network-uri >= 2.6
54 Requires: ghc-semigroups >= 0.16.1
55 Requires: ghc-streaming-commons >= 0.1.0.2
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 # debuginfo is not useful for ghc
59 %define _enable_debug_packages 0
61 # don't compress haddock files
62 %define _noautocompressdoc *.haddock
65 An HTTP client engine, intended as a base layer for more user-friendly
69 Summary: Profiling %{pkgname} library for GHC
70 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
71 Group: Development/Libraries
72 Requires: %{name} = %{version}-%{release}
73 Requires: ghc-cookie-prof
74 Requires: ghc-filepath-prof
75 Requires: ghc-http-types-prof >= 0.8)
76 Requires: ghc-memory-prof >= 0.7
77 Requires: ghc-mime-types-prof
78 Requires: ghc-network-prof >= 2.4
79 Requires: ghc-network-uri-prof >= 2.6
80 Requires: ghc-random-prof
81 Requires: ghc-safe-prof
82 Requires: ghc-semigroups-prof >= 0.16.1
83 Requires: ghc-streaming-commons-prof >= 0.1.0.2
86 Profiling %{pkgname} library for GHC. Should be installed when
87 GHC's profiling subsystem is needed.
89 %description prof -l pl.UTF-8
90 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
91 kiedy potrzebujemy systemu profilującego z GHC.
94 %setup -q -n %{pkgname}-%{version}
97 runhaskell Setup.hs configure -v2 \
98 %{?with_prof:--enable-library-profiling} \
100 --libdir=%{_libdir} \
101 --libexecdir=%{_libexecdir} \
102 --docdir=%{_docdir}/%{name}-%{version}
104 runhaskell Setup.hs build
105 runhaskell Setup.hs haddock --executables
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
111 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
113 # work around automatic haddock docs installation
114 %{__rm} -rf %{name}-%{version}-doc
115 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
116 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
118 runhaskell Setup.hs register \
119 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
122 rm -rf $RPM_BUILD_ROOT
131 %defattr(644,root,root,755)
132 %doc ChangeLog.md README.md %{name}-%{version}-doc/*
133 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
134 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
136 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
137 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
139 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
142 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network
143 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP
144 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP/*.hi
145 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP/*.dyn_hi
146 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP/Client
147 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP/Client/*.hi
148 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP/Client/*.dyn_hi
149 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network//PublicSuffixList
150 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/PublicSuffixList/*.hi
151 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/PublicSuffixList/*.dyn_hi
155 %defattr(644,root,root,755)
156 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
157 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
158 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP/*.p_hi
159 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP/Client/*.p_hi
160 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/PublicSuffixList/*.p_hi