]> git.pld-linux.org Git - packages/ghc-http-client.git/blob - ghc-http-client.spec
- new
[packages/ghc-http-client.git] / ghc-http-client.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname http-client
6 Summary:        An HTTP client engine
7 Name:           ghc-%{pkgname}
8 Version:        0.7.0
9 Release:        1
10 License:        MIT
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
28 %if %{with prof}
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
41 %endif
42 BuildRequires:  rpmbuild(macros) >= 1.608
43 %requires_eq    ghc
44 Requires(post,postun):  /usr/bin/ghc-pkg
45 Requires:       ghc-cookie
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
52 Requires:       ghc-random
53 Requires:       ghc-safe
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)
57
58 # debuginfo is not useful for ghc
59 %define         _enable_debug_packages  0
60
61 # don't compress haddock files
62 %define         _noautocompressdoc      *.haddock
63
64 %description
65 An HTTP client engine, intended as a base layer for more user-friendly
66 packages.
67
68 %package prof
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
84
85 %description prof
86 Profiling %{pkgname} library for GHC.  Should be installed when
87 GHC's profiling subsystem is needed.
88
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.
92
93 %prep
94 %setup -q -n %{pkgname}-%{version}
95
96 %build
97 runhaskell Setup.hs configure -v2 \
98         %{?with_prof:--enable-library-profiling} \
99         --prefix=%{_prefix} \
100         --libdir=%{_libdir} \
101         --libexecdir=%{_libexecdir} \
102         --docdir=%{_docdir}/%{name}-%{version}
103
104 runhaskell Setup.hs build
105 runhaskell Setup.hs haddock --executables
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
110
111 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
112
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}
117
118 runhaskell Setup.hs register \
119         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %post
125 %ghc_pkg_recache
126
127 %postun
128 %ghc_pkg_recache
129
130 %files
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
138
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
152
153 %if %{with prof}
154 %files prof
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
161 %endif
This page took 0.103371 seconds and 3 git commands to generate.