2016-12-20 15:06:16 +01:00
|
|
|
#
|
|
|
|
# spec file for package argon2
|
|
|
|
#
|
2017-01-28 20:20:58 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-12-20 15:06:16 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define lname libargon2-0
|
|
|
|
%define _version 20161029
|
|
|
|
Name: argon2
|
|
|
|
Version: 0.0+%{_version}
|
|
|
|
Release: 0
|
|
|
|
Summary: The reference C implementation of Argon2
|
|
|
|
License: CC0-1.0 or Apache-2.0
|
|
|
|
Group: Productivity/Networking/Security
|
|
|
|
Url: https://github.com/P-H-C/phc-winner-argon2
|
|
|
|
Source: https://github.com/P-H-C/phc-winner-argon2/archive/%{_version}.tar.gz#/phc-winner-argon2-%{_version}.tar.gz
|
|
|
|
Patch1: optflags.patch
|
|
|
|
BuildRequires: sed
|
2016-12-20 15:08:39 +01:00
|
|
|
ExclusiveArch: i686 x86_64
|
2016-12-20 15:06:16 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
This is the reference C implementation of Argon2, the password-hashing function
|
|
|
|
that won the Password Hashing Competition (PHC).
|
|
|
|
|
|
|
|
Argon2 is a password-hashing function that summarizes the state of the art in
|
|
|
|
the design of memory-hard functions and can be used to hash passwords for
|
|
|
|
credential storage, key derivation, or other applications.
|
|
|
|
|
|
|
|
%package -n %{lname}
|
|
|
|
Summary: The reference C implementation of Argon2
|
2017-01-28 20:20:58 +01:00
|
|
|
Group: System/Libraries
|
2016-12-20 15:06:16 +01:00
|
|
|
|
|
|
|
%description -n %{lname}
|
|
|
|
Reference C implementation of Argon2, the password-hashing function
|
|
|
|
that won the Password Hashing Competition (PHC).
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for argon2
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{lname} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Headers for argon2, the reference C implementation of Argon2, the
|
|
|
|
password-hashing function that won the Password Hashing Competition (PHC).
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n phc-winner-argon2-%{_version}
|
|
|
|
%patch1 -p1
|
|
|
|
|
|
|
|
sed -i s,"LIBRARY_REL = lib","LIBRARY_REL = %{_lib}", Makefile
|
|
|
|
|
|
|
|
%build
|
2017-01-28 20:20:58 +01:00
|
|
|
make %{?_smp_mflags} CFLAGS="-pthread %{optflags} -Iinclude -Isrc"
|
2016-12-20 15:06:16 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
make %{?_smp_mflags} DESTDIR=%{buildroot} install
|
|
|
|
|
|
|
|
chmod -x %{buildroot}%{_includedir}/argon2.h
|
|
|
|
|
|
|
|
mv %{buildroot}%{_libdir}/libargon2.so %{buildroot}%{_libdir}/libargon2.so.0
|
|
|
|
ln -s %{_libdir}/libargon2.so.0 %{buildroot}%{_libdir}/libargon2.so
|
|
|
|
|
2017-01-28 20:20:58 +01:00
|
|
|
%check
|
|
|
|
make CFLAGS="-pthread %{optflags} -Iinclude -Isrc" test
|
|
|
|
|
2016-12-20 15:06:16 +01:00
|
|
|
%post -n %{lname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{lname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc LICENSE CHANGELOG.md README.md argon2-specs.pdf
|
|
|
|
%{_bindir}/argon2
|
|
|
|
|
|
|
|
%files -n %{lname}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libargon2.so.0
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/argon2.h
|
|
|
|
%{_libdir}/libargon2.so
|
|
|
|
|
|
|
|
%changelog
|