]> git.pld-linux.org Git - packages/ghc-SHA.git/blob - ghc-SHA.spec
30a9bef515c909f0642315ac73fe44153d7ea56b
[packages/ghc-SHA.git] / ghc-SHA.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname SHA
6 Summary:        Implementations of the SHA suite of message digest functions
7 Name:           ghc-%{pkgname}
8 Version:        1.6.4.4
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/SHA
13 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5:  f2a26839057b5e4fd53b8f6a41b88553
15 URL:            http://hackage.haskell.org/package/SHA
16 BuildRequires:  ghc >= 6.12.3
17 %if %{with prof}
18 BuildRequires:  ghc-prof
19 %endif
20 BuildRequires:  rpmbuild(macros) >= 1.608
21 %requires_eq    ghc
22 Requires(post,postun):  /usr/bin/ghc-pkg
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 # debuginfo is not useful for ghc
26 %define         _enable_debug_packages  0
27
28 # don't compress haddock files
29 %define         _noautocompressdoc      *.haddock
30
31 %description
32 This library implements the SHA suite of message digest functions,
33 according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as
34 the SHA-based HMAC routines. The functions have been tested against
35 most of the NIST and RFC test vectors for the various functions.
36 While some attention has been paid to performance, these do not
37 presently reach the speed of well-tuned libraries, like OpenSSL.
38
39 %package prof
40 Summary:        Profiling %{pkgname} library for GHC
41 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44
45 %description prof
46 Profiling %{pkgname} library for GHC.  Should be installed when
47 GHC's profiling subsystem is needed.
48
49 %description prof -l pl.UTF-8
50 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
51 kiedy potrzebujemy systemu profilującego z GHC.
52
53 %prep
54 %setup -q -n %{pkgname}-%{version}
55
56 %build
57 runhaskell Setup.hs configure -v2 \
58         %{?with_prof:--enable-library-profiling} \
59         --prefix=%{_prefix} \
60         --libdir=%{_libdir} \
61         --libexecdir=%{_libexecdir} \
62         --docdir=%{_docdir}/%{name}-%{version}
63
64 runhaskell Setup.hs build
65 runhaskell Setup.hs haddock --executables
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
70
71 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
72
73 # work around automatic haddock docs installation
74 %{__rm} -rf %{name}-%{version}-doc
75 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
76 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
77
78 runhaskell Setup.hs register \
79         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %post
85 %ghc_pkg_recache
86
87 %postun
88 %ghc_pkg_recache
89
90 %files
91 %defattr(644,root,root,755)
92 %doc %{name}-%{version}-doc/*
93 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
94 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
95 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
97 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
98
99 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
100 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest
101 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/Pure
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/Pure/*.hi
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/Pure/*.dyn_hi
104
105 %if %{with prof}
106 %files prof
107 %defattr(644,root,root,755)
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/Pure/*.p_hi
110 %endif
This page took 0.144059 seconds and 2 git commands to generate.