]>
Commit | Line | Data |
---|---|---|
a6b3d79f JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname x509-system | |
6 | Summary: Handle per-operating-system X.509 accessors and storage | |
7 | Name: ghc-%{pkgname} | |
8 | Version: 1.6.6 | |
2e5dd669 | 9 | Release: 2 |
a6b3d79f JR |
10 | License: BSD |
11 | Group: Development/Languages | |
12 | #Source0Download: http://hackage.haskell.org/package/x509-system | |
13 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
14 | # Source0-md5: 739f3dd5b20e15d15b16d600bff3ac49 | |
15 | URL: http://hackage.haskell.org/package/x509-system | |
16 | BuildRequires: ghc >= 6.12.3 | |
17 | BuildRequires: ghc-asn1-encoding | |
18 | BuildRequires: ghc-pem >= 0.1 | |
19 | BuildRequires: ghc-x509 >= 1.6 | |
20 | BuildRequires: ghc-x509-store >= 1.6.2 | |
21 | %if %{with prof} | |
22 | BuildRequires: ghc-prof | |
23 | BuildRequires: ghc-asn1-encoding-prof | |
24 | BuildRequires: ghc-pem-prof >= 0.1 | |
25 | BuildRequires: ghc-x509-prof >= 1.6 | |
26 | BuildRequires: ghc-x509-store-prof >= 1.6.2 | |
27 | %endif | |
28 | BuildRequires: rpmbuild(macros) >= 1.608 | |
29 | %requires_eq ghc | |
30 | Requires(post,postun): /usr/bin/ghc-pkg | |
31 | Requires: ghc-asn1-encoding | |
32 | Requires: ghc-pem >= 0.1 | |
33 | Requires: ghc-x509 >= 1.6 | |
34 | Requires: ghc-x509-store >= 1.6.2 | |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | # debuginfo is not useful for ghc | |
38 | %define _enable_debug_packages 0 | |
39 | ||
40 | # don't compress haddock files | |
41 | %define _noautocompressdoc *.haddock | |
42 | ||
43 | %description | |
44 | System X.509 handling. | |
45 | ||
46 | %package prof | |
47 | Summary: Profiling %{pkgname} library for GHC | |
48 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
49 | Group: Development/Libraries | |
50 | Requires: %{name} = %{version}-%{release} | |
51 | Requires: ghc-asn1-encoding-prof | |
52 | Requires: ghc-pem-prof >= 0.1 | |
53 | Requires: ghc-x509-prof >= 1.6 | |
54 | Requires: ghc-x509-store-prof >= 1.6.2 | |
55 | ||
56 | %description prof | |
57 | Profiling %{pkgname} library for GHC. Should be installed when | |
58 | GHC's profiling subsystem is needed. | |
59 | ||
60 | %description prof -l pl.UTF-8 | |
61 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
62 | kiedy potrzebujemy systemu profilującego z GHC. | |
63 | ||
64 | %prep | |
65 | %setup -q -n %{pkgname}-%{version} | |
66 | ||
67 | %build | |
68 | runhaskell Setup.hs configure -v2 \ | |
69 | %{?with_prof:--enable-library-profiling} \ | |
70 | --prefix=%{_prefix} \ | |
71 | --libdir=%{_libdir} \ | |
72 | --libexecdir=%{_libexecdir} \ | |
73 | --docdir=%{_docdir}/%{name}-%{version} | |
74 | ||
75 | runhaskell Setup.hs build | |
76 | runhaskell Setup.hs haddock --executables | |
77 | ||
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
81 | ||
82 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
83 | ||
84 | # work around automatic haddock docs installation | |
85 | %{__rm} -rf %{name}-%{version}-doc | |
86 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
87 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
88 | ||
89 | runhaskell Setup.hs register \ | |
90 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
91 | ||
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %post | |
96 | %ghc_pkg_recache | |
97 | ||
98 | %postun | |
99 | %ghc_pkg_recache | |
100 | ||
101 | %files | |
102 | %defattr(644,root,root,755) | |
103 | %doc %{name}-%{version}-doc/* | |
104 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
105 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
106 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so | |
107 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a | |
108 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
109 | ||
110 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System | |
111 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.hi | |
112 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.dyn_hi | |
113 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/X509 | |
114 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/X509/*.hi | |
115 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/X509/*.dyn_hi | |
116 | ||
117 | %if %{with prof} | |
118 | %files prof | |
119 | %defattr(644,root,root,755) | |
120 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
121 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.p_hi | |
122 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/X509/*.p_hi | |
123 | %endif |