]> git.pld-linux.org Git - packages/ghc-cryptonite.git/blob - ghc-cryptonite.spec
- new
[packages/ghc-cryptonite.git] / ghc-cryptonite.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname cryptonite
6 Summary:        Cryptography Primitives sink
7 Name:           ghc-%{pkgname}
8 Version:        0.26
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/cryptonite
13 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5:  759be6bffbfc9bb4c525d9dac55f9f7c
15 URL:            http://hackage.haskell.org/package/cryptonite
16 BuildRequires:  ghc >= 6.12.3
17 BuildRequires:  ghc-memory
18 %if %{with prof}
19 BuildRequires:  ghc-prof
20 BuildRequires:  ghc-memory-prof
21 %endif
22 BuildRequires:  rpmbuild(macros) >= 1.608
23 %requires_eq    ghc
24 Requires(post,postun):  /usr/bin/ghc-pkg
25 Requires:       ghc-memory
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 # debuginfo is not useful for ghc
29 %define         _enable_debug_packages  0
30
31 # don't compress haddock files
32 %define         _noautocompressdoc      *.haddock
33
34 %description
35 A repository of cryptographic primitives.
36
37 - Symmetric ciphers: AES, DES, 3DES, CAST5, Blowfish, Twofish,
38   Camellia, RC4, Salsa, XSalsa, ChaCha.
39 - Hash: SHA1, SHA2, SHA3, SHAKE, MD2, MD4, MD5, Keccak, Skein, Ripemd,
40   Tiger, Whirlpool, Blake2
41 - MAC: HMAC, KMAC, Poly1305
42 - Asymmetric crypto: DSA, RSA, DH, ECDH, ECDSA, ECC, Curve25519,
43   Curve448, Ed25519, Ed448
44 - Key Derivation Function: PBKDF2, Scrypt, HKDF, Argon2, BCrypt,
45   BCryptPBKDF
46 - Cryptographic Random generation: System Entropy, Deterministic
47   Random Generator
48 - Data related: Anti-Forensic Information Splitter (AFIS)
49
50 %package prof
51 Summary:        Profiling %{pkgname} library for GHC
52 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
53 Group:          Development/Libraries
54 Requires:       %{name} = %{version}-%{release}
55 Requires:       ghc-memory-prof
56
57 %description prof
58 Profiling %{pkgname} library for GHC.  Should be installed when
59 GHC's profiling subsystem is needed.
60
61 %description prof -l pl.UTF-8
62 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
63 kiedy potrzebujemy systemu profilującego z GHC.
64
65 %prep
66 %setup -q -n %{pkgname}-%{version}
67
68 %build
69 runhaskell Setup.hs configure -v2 \
70         %{?with_prof:--enable-library-profiling} \
71         --prefix=%{_prefix} \
72         --libdir=%{_libdir} \
73         --libexecdir=%{_libexecdir} \
74         --docdir=%{_docdir}/%{name}-%{version}
75
76 runhaskell Setup.hs build
77 runhaskell Setup.hs haddock --executables
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
82
83 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
84
85 # work around automatic haddock docs installation
86 %{__rm} -rf %{name}-%{version}-doc
87 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
88 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
89
90 runhaskell Setup.hs register \
91         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
92
93 find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -type d | %{__sed} "s|$RPM_BUILD_ROOT|%dir |" > %{name}.files
94 find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -name '*.hi' | %{__sed} "s|$RPM_BUILD_ROOT||" >> %{name}.files
95 find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -name '*.dyn_hi' | %{__sed} "s|$RPM_BUILD_ROOT||" >> %{name}.files
96 find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -name '*.p_hi' | %{__sed} "s|$RPM_BUILD_ROOT||" > %{name}-prof.files
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %post
102 %ghc_pkg_recache
103
104 %postun
105 %ghc_pkg_recache
106
107 %files -f %{name}.files
108 %defattr(644,root,root,755)
109 %doc CHANGELOG.md README.md %{name}-%{version}-doc/*
110 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
112 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
113 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
114
115 %if %{with prof}
116 %files prof -f %{name}-prof.files
117 %defattr(644,root,root,755)
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
119 %endif
This page took 0.073486 seconds and 3 git commands to generate.