1 # TODO: unity dll*stubs.so location to %{_libdir}/ocaml/stublibs?
4 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
6 # not yet available on x32 (ocaml 4.02.1), update when upstream will support it
7 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
8 %undefine with_ocaml_opt
11 Summary: Cryptographic toolkit for OCaml
12 Summary(pl.UTF-8): Biblioteka kryptograficzna dla OCamla
15 %define verrel release%(echo %{version} | tr -d .)
17 License: LGPL v2 with linking exception
19 Source0: https://github.com/xavierleroy/cryptokit/archive/%{verrel}/cryptokit-%{version}.tar.gz
20 # Source0-md5: 18591fc3f467bc33681be2cede36b8f1
21 URL: http://pauillac.inria.fr/~xleroy/software.html#cryptokit
22 BuildRequires: ocaml >= 1:3.09.2
23 BuildRequires: ocaml-dune
24 BuildRequires: ocaml-dune-devel
25 BuildRequires: ocaml-zarith
26 BuildRequires: ocaml-zarith-devel
27 BuildRequires: zlib-devel
28 %requires_eq ocaml-runtime
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 The Cryptokit library for Objective Caml provides a variety of
33 cryptographic primitives that can be used to implement cryptographic
34 protocols in security-sensitive applications. The primitives provided
35 include: symmetric-key cryptography: AES, DES, Triple-DES, ARCfour, in
36 ECB, CBC, CFB and OFB modes; public-key cryptography: RSA; hash
37 functions and MACs: SHA-1, MD5, and MACs based on AES and DES; random
38 number generation; encodings and compression: base 64, hexadecimal,
41 This package contains files needed to run bytecode executables using
44 %description -l pl.UTF-8
45 Biblioteka Cryptokit dostarcza szeroką gamę funkcji kryptograficznych,
46 które mogą być użyte w implementacji protokołów kryptograficznych w
47 aplikacjach, dla których ważne jest bezpieczeństwo. Dostarczane
48 funkcje to: szyfry symetryczne: AES, DES, 3DES, ARCFour w trybach ECB,
49 CBC, CFB oraz OFB; szyfr z kluczem publicznym RSA; kryptograficzne
50 funkcje skrótu i MACi: SHA-1, MD5 oraz MACi bazowane na AES oraz DES;
51 generacje liczb losowych; kodowania i kompresja: base 64, szesnastkowa
54 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
55 używających tej biblioteki.
58 Summary: Cryptographic toolkit for OCaml - development part
59 Summary(pl.UTF-8): Biblioteka kryptograficzna dla OCamla - cześć programistyczna
60 Group: Development/Libraries
61 Requires: %{name} = %{version}-%{release}
65 The Cryptokit library for Objective Caml provides a variety of
66 cryptographic primitives that can be used to implement cryptographic
67 protocols in security-sensitive applications. The primitives provided
68 include: symmetric-key cryptography: AES, DES, Triple-DES, ARCfour, in
69 ECB, CBC, CFB and OFB modes; public-key cryptography: RSA; hash
70 functions and MACs: SHA-1, MD5, and MACs based on AES and DES; random
71 number generation; encodings and compression: base 64, hexadecimal,
74 This package contains files needed to develop OCaml programs using
77 %description devel -l pl.UTF-8
78 Biblioteka Cryptokit dostarcza szeroką gamę funkcji kryptograficznych,
79 które mogą być użyte w implementacji protokołów kryptograficznych w
80 aplikacjach, dla których ważne jest bezpieczeństwo. Dostarczane
81 funkcje to: szyfry symetryczne: AES, DES, 3DES, ARCFour w trybach ECB,
82 CBC, CFB oraz OFB; szyfr z kluczem publicznym RSA; kryptograficzne
83 funkcje skrótu i MACi: SHA-1, MD5 oraz MACi bazowane na AES oraz DES;
84 generacje liczb losowych; kodowania i kompresja: base 64, szesnastkowa
87 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
91 %setup -q -n cryptokit-%{verrel}
94 dune build %{?_smp_mflags} @install
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/cryptokit
100 dune install --destdir=$RPM_BUILD_ROOT
102 find $RPM_BUILD_ROOT%{_libdir}/ocaml -name \*.ml -delete
104 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
105 cp -r test/*.ml $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
108 rm -rf $RPM_BUILD_ROOT
111 %defattr(644,root,root,755)
112 %doc Changes LICENSE README.md
113 %dir %{_libdir}/ocaml/cryptokit
114 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcryptokit_stubs.so
115 %{_libdir}/ocaml/cryptokit/cryptokit*.cma
116 %{_libdir}/ocaml/cryptokit/cryptokit*.cmi
117 %{_libdir}/ocaml/cryptokit/cryptokit*.cmt
118 %{_libdir}/ocaml/cryptokit/cryptokit*.cmti
119 %if %{with ocaml_opt}
120 %attr(755,root,root) %{_libdir}/ocaml/cryptokit/cryptokit.cmxs
122 %{_libdir}/ocaml/cryptokit/META
125 %defattr(644,root,root,755)
126 %{_libdir}/ocaml/cryptokit/cryptokit.cmi
127 %{_libdir}/ocaml/cryptokit/libcryptokit_stubs.a
128 %{_libdir}/ocaml/cryptokit/cryptokit*.mli
129 %if %{with ocaml_opt}
130 %{_libdir}/ocaml/cryptokit/cryptokit*.a
131 %{_libdir}/ocaml/cryptokit/cryptokit*.cmx
132 %{_libdir}/ocaml/cryptokit/cryptokit*.cmxa
134 %{_libdir}/ocaml/cryptokit/dune-package
135 %{_libdir}/ocaml/cryptokit/opam
136 %{_examplesdir}/%{name}-%{version}