]> git.pld-linux.org Git - SPECS.git/blob - ghc-HTTP.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ghc-HTTP.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname HTTP
6 Summary:        A library for client-side HTTP
7 Summary(pl.UTF-8):      Biblioteka kliencka HTTP
8 Name:           ghc-%{pkgname}
9 Version:        4000.3.14
10 Release:        1
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/HTTP
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  a2e340760c318658313f1548c91e2692
16 Patch0:         ghc-8.10.patch
17 URL:            http://hackage.haskell.org/package/HTTP
18 BuildRequires:  ghc >= 6.12.3
19 BuildRequires:  ghc-array
20 BuildRequires:  ghc-base >= 3
21 BuildRequires:  ghc-bytestring
22 BuildRequires:  ghc-mtl >= 2.0
23 BuildRequires:  ghc-network
24 BuildRequires:  ghc-network-uri
25 BuildRequires:  ghc-parsec
26 %if %{with prof}
27 BuildRequires:  ghc-prof >= 6.12.3
28 BuildRequires:  ghc-array-prof
29 BuildRequires:  ghc-base-prof >= 3
30 BuildRequires:  ghc-bytestring-prof
31 BuildRequires:  ghc-mtl-prof >= 2.0
32 BuildRequires:  ghc-network-prof
33 BuildRequires:  ghc-network-uri-prof
34 BuildRequires:  ghc-parsec-prof
35 %endif
36 BuildRequires:  rpmbuild(macros) >= 1.608
37 Requires(post,postun):  /usr/bin/ghc-pkg
38 %requires_eq    ghc
39 Requires:       ghc-array
40 Requires:       ghc-base >= 3
41 Requires:       ghc-bytestring
42 Requires:       ghc-mtl >= 2.0
43 Requires:       ghc-network
44 Requires:       ghc-network-uri
45 Requires:       ghc-parsec
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 # debuginfo is not useful for ghc
49 %define         _enable_debug_packages  0
50
51 # don't compress haddock files
52 %define         _noautocompressdoc      *.haddock
53
54 %description
55 The HTTP package supports client-side web programming in Haskell. It
56 lets you set up HTTP connections, transmitting requests and processing
57 the responses coming back, all from within the comforts of Haskell.
58 It's dependent on the network package to operate, but other than that,
59 the implementation is all written in Haskell.
60
61 %description -l pl.UTF-8
62 Pakiet HTTP wspiera programowanie strony klienckiej WWW w Haskellu.
63 Pozwala na ustanawianie połączeń HTTP, transmisję żądań i
64 przetwarzanie nadchodzących odpowiedzi - wszystko z poziomu komfortu
65 Haskella. Do operacji sieciowych używa pakietu network, ale cała
66 reszta jest zaimplementowana w Haskellu.
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-array-prof
74 Requires:       ghc-base-prof >= 3
75 Requires:       ghc-bytestring-prof
76 Requires:       ghc-mtl-prof >= 2.0
77 Requires:       ghc-network-prof
78 Requires:       ghc-network-uri-prof
79 Requires:       ghc-parsec-prof
80
81 %description prof
82 Profiling %{pkgname} library for GHC. Should be installed when
83 GHC's profiling subsystem is needed.
84
85 %description prof -l pl.UTF-8
86 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
87 kiedy potrzebujemy systemu profilującego z GHC.
88
89 %package doc
90 Summary:        HTML documentation for ghc %{pkgname} package
91 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
92 Group:          Documentation
93
94 %description doc
95 HTML documentation for ghc %{pkgname} package.
96
97 %description doc -l pl.UTF-8
98 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
99
100 %prep
101 %setup -q -n %{pkgname}-%{version}
102 %patch0 -p1
103
104 %build
105 runhaskell Setup.lhs configure -v2 \
106         %{?with_prof:--enable-library-profiling} \
107         --prefix=%{_prefix} \
108         --libdir=%{_libdir} \
109         --libexecdir=%{_libexecdir} \
110         --docdir=%{_docdir}/%{name}-%{version}
111
112 runhaskell Setup.lhs build
113 runhaskell Setup.lhs haddock --executables
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
118
119 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
120
121 # work around automatic haddock docs installation
122 %{__rm} -rf %{name}-%{version}-doc
123 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
124 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
125
126 runhaskell Setup.lhs register \
127         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %post
133 %ghc_pkg_recache
134
135 %postun
136 %ghc_pkg_recache
137
138 %files
139 %defattr(644,root,root,755)
140 %doc CHANGES LICENSE
141 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
142 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
143 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSHTTP-%{version}-*.so
144 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSHTTP-%{version}-*.a
145 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSHTTP-%{version}-*_p.a
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
147 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
148 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network
149 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.hi
150 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.dyn_hi
151 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP
152 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP/*.hi
153 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP/*.dyn_hi
154
155 %if %{with prof}
156 %files prof
157 %defattr(644,root,root,755)
158 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSHTTP-%{version}-*_p.a
159 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
160 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.p_hi
161 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/HTTP/*.p_hi
162 %endif
163
164 %files doc
165 %defattr(644,root,root,755)
166 %doc %{name}-%{version}-doc/*
This page took 0.048105 seconds and 3 git commands to generate.