]>
Commit | Line | Data |
---|---|---|
b94c26c6 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname tls | |
6 | Summary: TLS/SSL protocol native implementation (Server and Client) | |
7 | Name: ghc-%{pkgname} | |
8 | Version: 1.5.4 | |
c403141a | 9 | Release: 2 |
b94c26c6 JR |
10 | License: BSD |
11 | Group: Development/Languages | |
12 | #Source0Download: http://hackage.haskell.org/package/tls | |
13 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
14 | # Source0-md5: 44202fa7069aa7d04c983787fa015491 | |
15 | URL: http://hackage.haskell.org/package/tls | |
16 | BuildRequires: ghc >= 6.12.3 | |
17 | BuildRequires: ghc-asn1-encoding | |
18 | BuildRequires: ghc-asn1-types >= 0.2.0 | |
19 | BuildRequires: ghc-async >= 2.0 | |
419a53c8 | 20 | BuildRequires: ghc-cereal >= 0.5.3 |
b94c26c6 JR |
21 | BuildRequires: ghc-cryptonite >= 0.25 |
22 | BuildRequires: ghc-data-default-class | |
23 | BuildRequires: ghc-hourglass | |
24 | BuildRequires: ghc-memory >= 0.14.6 | |
419a53c8 | 25 | BuildRequires: ghc-network >= 2.4.0.0 |
b94c26c6 JR |
26 | BuildRequires: ghc-transformers |
27 | BuildRequires: ghc-x509 >= 1.7.5 | |
28 | BuildRequires: ghc-x509-store >= 1.6 | |
29 | BuildRequires: ghc-x509-validation >= 1.6.5 | |
30 | %if %{with prof} | |
31 | BuildRequires: ghc-prof | |
32 | BuildRequires: ghc-asn1-encoding-prof | |
33 | BuildRequires: ghc-asn1-types-prof >= 0.2.0 | |
34 | BuildRequires: ghc-async-prof >= 2.0 | |
419a53c8 | 35 | BuildRequires: ghc-cereal-prof >= 0.5.3 |
b94c26c6 JR |
36 | BuildRequires: ghc-cryptonite-prof >= 0.25 |
37 | BuildRequires: ghc-data-default-class-prof | |
38 | BuildRequires: ghc-hourglass-prof | |
39 | BuildRequires: ghc-memory-prof >= 0.14.6 | |
419a53c8 | 40 | BuildRequires: ghc-network-prof >= 2.4.0.0 |
b94c26c6 JR |
41 | BuildRequires: ghc-transformers-prof |
42 | BuildRequires: ghc-x509-prof >= 1.7.5 | |
43 | BuildRequires: ghc-x509-store-prof >= 1.6 | |
44 | BuildRequires: ghc-x509-validation-prof >= 1.6.5 | |
45 | %endif | |
46 | BuildRequires: rpmbuild(macros) >= 1.608 | |
47 | %requires_eq ghc | |
48 | Requires(post,postun): /usr/bin/ghc-pkg | |
49 | Requires: ghc-asn1-encoding | |
50 | Requires: ghc-asn1-types >= 0.2.0 | |
51 | Requires: ghc-async >= 2.0 | |
419a53c8 | 52 | Requires: ghc-cereal >= 0.5.3 |
b94c26c6 JR |
53 | Requires: ghc-cryptonite >= 0.25 |
54 | Requires: ghc-data-default-class | |
55 | Requires: ghc-hourglass | |
56 | Requires: ghc-memory >= 0.14.6 | |
419a53c8 | 57 | Requires: ghc-network >= 2.4.0.0 |
b94c26c6 JR |
58 | Requires: ghc-transformers |
59 | Requires: ghc-x509 >= 1.7.5 | |
60 | Requires: ghc-x509-store >= 1.6 | |
61 | Requires: ghc-x509-validation >= 1.6.5 | |
62 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
63 | ||
64 | # debuginfo is not useful for ghc | |
65 | %define _enable_debug_packages 0 | |
66 | ||
67 | # don't compress haddock files | |
68 | %define _noautocompressdoc *.haddock | |
69 | ||
70 | %description | |
71 | Native Haskell TLS and SSL protocol implementation for server and | |
72 | client. | |
73 | ||
74 | This provides a high-level implementation of a sensitive security | |
75 | protocol, eliminating a common set of security issues through the use | |
76 | of the advanced type system, high level constructions and common | |
77 | Haskell features. | |
78 | ||
79 | Currently implement the SSL3.0, TLS1.0, TLS1.1, TLS1.2 and TLS 1.3 | |
80 | protocol, and support RSA and Ephemeral (Elliptic curve and regular) | |
81 | Diffie Hellman key exchanges, and many extensions. | |
82 | ||
83 | %package prof | |
84 | Summary: Profiling %{pkgname} library for GHC | |
85 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
86 | Group: Development/Libraries | |
87 | Requires: %{name} = %{version}-%{release} | |
88 | Requires: ghc-asn1-encoding-prof | |
89 | Requires: ghc-asn1-types-prof >= 0.2.0 | |
90 | Requires: ghc-async-prof >= 2.0 | |
419a53c8 | 91 | Requires: ghc-cereal-prof >= 0.5.3 |
b94c26c6 JR |
92 | Requires: ghc-cryptonite-prof >= 0.25 |
93 | Requires: ghc-data-default-class-prof | |
94 | Requires: ghc-hourglass-prof | |
95 | Requires: ghc-memory-prof >= 0.14.6 | |
419a53c8 | 96 | Requires: ghc-network-prof >= 2.4.0.0 |
b94c26c6 JR |
97 | Requires: ghc-transformers-prof |
98 | Requires: ghc-x509-prof >= 1.7.5 | |
99 | Requires: ghc-x509-store-prof >= 1.6 | |
100 | Requires: ghc-x509-validation-prof >= 1.6.5 | |
101 | ||
102 | %description prof | |
103 | Profiling %{pkgname} library for GHC. Should be installed when | |
104 | GHC's profiling subsystem is needed. | |
105 | ||
106 | %description prof -l pl.UTF-8 | |
107 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
108 | kiedy potrzebujemy systemu profilującego z GHC. | |
109 | ||
110 | %prep | |
111 | %setup -q -n %{pkgname}-%{version} | |
112 | ||
113 | %build | |
114 | runhaskell Setup.hs configure -v2 \ | |
115 | %{?with_prof:--enable-library-profiling} \ | |
116 | --prefix=%{_prefix} \ | |
117 | --libdir=%{_libdir} \ | |
118 | --libexecdir=%{_libexecdir} \ | |
119 | --docdir=%{_docdir}/%{name}-%{version} | |
120 | ||
2022f17b | 121 | runhaskell Setup.hs build %{?_smp_mflags} |
b94c26c6 JR |
122 | runhaskell Setup.hs haddock --executables |
123 | ||
124 | %install | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
127 | ||
128 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
129 | ||
130 | # work around automatic haddock docs installation | |
131 | %{__rm} -rf %{name}-%{version}-doc | |
132 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
133 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
134 | ||
135 | runhaskell Setup.hs register \ | |
136 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
137 | ||
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %post | |
142 | %ghc_pkg_recache | |
143 | ||
144 | %postun | |
145 | %ghc_pkg_recache | |
146 | ||
147 | %files | |
148 | %defattr(644,root,root,755) | |
149 | %doc CHANGELOG.md %{name}-%{version}-doc/* | |
150 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
151 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
152 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so | |
153 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a | |
154 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
155 | ||
156 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network | |
157 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.hi | |
158 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.dyn_hi | |
159 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS | |
160 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/*.hi | |
161 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/*.dyn_hi | |
162 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Context | |
163 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Context/*.hi | |
164 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Context/*.dyn_hi | |
165 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Crypto | |
166 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Crypto/*.hi | |
167 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Crypto/*.dyn_hi | |
168 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Extra | |
169 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Extra/*.hi | |
170 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Extra/*.dyn_hi | |
171 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Handshake | |
172 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Handshake/*.hi | |
173 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Handshake/*.dyn_hi | |
174 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Record | |
175 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Record/*.hi | |
176 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Record/*.dyn_hi | |
177 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Util | |
178 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Util/*.hi | |
179 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Util/*.dyn_hi | |
180 | ||
181 | %if %{with prof} | |
182 | %files prof | |
183 | %defattr(644,root,root,755) | |
184 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
185 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.p_hi | |
186 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/*.p_hi | |
187 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Context/*.p_hi | |
188 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Crypto/*.p_hi | |
189 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Extra/*.p_hi | |
190 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Handshake/*.p_hi | |
191 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Record/*.p_hi | |
192 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/TLS/Util/*.p_hi | |
193 | %endif |