]> git.pld-linux.org Git - packages/libargon2.git/blob - libargon2.spec
up to 20190702
[packages/libargon2.git] / libargon2.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4
5 Summary:        The password hash Argon2, winner of PHC
6 Summary(pl.UTF-8):      Skrót haseł Argon2 - zwycięzca PHC
7 Name:           libargon2
8 Version:        20190702
9 Release:        1
10 License:        Apache v2.0, CC0 v1.0
11 Group:          Libraries
12 Source0:        https://github.com/P-H-C/phc-winner-argon2/archive/%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5:  0f234cc21ac6cebfe373da6afa70bb1d
14 Patch0:         makefile.patch
15 URL:            https://github.com/P-H-C/phc-winner-argon2
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
19 This is the reference C implementation of Argon2, the password-hashing
20 function that won the Password Hashing Competition (PHC).
21
22 Argon2 is a password-hashing function that summarizes the state of the
23 art in the design of memory-hard functions and can be used to hash
24 passwords for credential storage, key derivation, or other
25 applications.
26
27 It has a simple design aimed at the highest memory filling rate and
28 effective use of multiple computing units, while still providing
29 defense against tradeoff attacks (by exploiting the cache and memory
30 organization of the recent processors).
31
32 %description -l pl.UTF-8
33 Ta biblioteka jest referencyjną implementacją w C funkcji skrotu haseł
34 Argon2, która wygrała Password Hashing Competition (PHC).
35
36 Argon2 to funkcja skrótu podsumowująca stan techniki w projektowaniu
37 złożonych pamięciowo funkcji skrótu, które mogą być używane do
38 haszowania haseł do uwierzytelniania, tworzenia kluczy lub innych
39 zastosowań.
40
41 Funkcja jest zaprojektowana w prosty sposób, nakierowany na najwięszy
42 współczynnik wypełniania pamięci i efektywne użycie wielu jednostek
43 obliczeniowych, nadal zapewniając ochronę przeciw atakom kompromisowym
44 (wykorzystując pamięć podręczną i organizację pamięci współczesnych
45 procesorów).
46
47 %package devel
48 Summary:        Header files for libargon2 library
49 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libargon2
50 Group:          Development/Libraries
51 Requires:       %{name} = %{version}-%{release}
52
53 %description devel
54 Header files for libargon2 library.
55
56 %description devel -l pl.UTF-8
57 Pliki nagłówkowe biblioteki libargon2.
58
59 %package static
60 Summary:        Static libargon2 library
61 Summary(pl.UTF-8):      Statyczna biblioteka libargon2
62 Group:          Development/Libraries
63 Requires:       %{name}-devel = %{version}-%{release}
64
65 %description static
66 Static libargon2 library.
67
68 %description static -l pl.UTF-8
69 Statyczna biblioteka libargon2.
70
71 %prep
72 %setup -q -n phc-winner-argon2-%{version}
73 %patch0 -p1
74
75 %build
76 CFLAGS="%{rpmcflags}" \
77 %{__make} \
78         CC="%{__cc}" \
79         ARGON2_VERSION=%{version} \
80         PREFIX=%{_prefix} \
81         LIBRARY_REL=%{_lib} \
82         %{!?with_static_libs:LIBRARIES='$(LIB_SH)'}
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
87
88 %{__make} install \
89         INSTALL="install -p" \
90         PREFIX=%{_prefix} \
91         %{!?with_static_libs:LIBRARIES='$(LIB_SH)'} \
92         LIBRARY_REL=%{_lib} \
93         DESTDIR=$RPM_BUILD_ROOT
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %post   -p /sbin/ldconfig
99 %postun -p /sbin/ldconfig
100
101 %files
102 %defattr(644,root,root,755)
103 %doc README.md CHANGELOG.md LICENSE
104 %attr(755,root,root) %{_bindir}/argon2
105 %attr(755,root,root) %ghost %{_libdir}/libargon2.so.1
106 %attr(755,root,root) %{_libdir}/libargon2.so.1.*
107
108 %files devel
109 %defattr(644,root,root,755)
110 %{_includedir}/argon2.h
111 %attr(755,root,root) %{_libdir}/libargon2.so
112 %{_pkgconfigdir}/libargon2.pc
113
114 %if %{with static_libs}
115 %files static
116 %defattr(644,root,root,755)
117 %{_libdir}/libargon2.a
118 %endif
This page took 0.095039 seconds and 4 git commands to generate.