Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 6b71e8c33da5b8474dd9ed87b9bb99c9 > files > 1

argon2-20171227-2.mga7.src.rpm

%define major     1
%define libname   %mklibname %{name}_ %{major}
%define develname %mklibname %{name} -d

Name:           argon2
Version:        20171227
Release:        %mkrel 2
Summary:        The reference C implementation of Argon2
License:        ASL 2.0
Group:          System/Libraries
Url:            https://github.com/P-H-C/phc-winner-argon2
Source0:        https://github.com/P-H-C/phc-winner-argon2/archive/%{version}/phc-winner-%{name}-%{version}.tar.gz

Requires:       %{libname} = %{version}-%{release}

%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     %{libname}
Summary:        The reference C implementation of Argon2
Group:          System/Libraries

%description -n %{libname}
Reference C implementation of Argon2, the password-hashing function
that won the Password Hashing Competition (PHC).

#----------------------------------------------------

%package -n     %{develname}
Summary:        Development files for argon2
Group:          Development/C++
Requires:       %{libname} = %{version}-%{release}
Provides:       %{name}-devel = %{version}-%{release}
Provides:       lib%{name}-devel = %{version}-%{release}

%description -n %{develname}
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-%{name}-%{version}
%autopatch -p1

sed -i s,"LIBRARY_REL = lib","LIBRARY_REL = %{_lib}", Makefile
sed -i -e "s|@UPSTREAM_VER@|%{version}|" libargon2.pc
sed -i -e "s|lib/@HOST_MULTIARCH@|%{_lib}|" libargon2.pc

%build
%make_build

%install
%make_install

# we don't want these
find %{buildroot} -name '*.a' -delete

install -D -m 644 man/argon2.1 %{buildroot}%{_mandir}/man1/%{name}.1
install -D -m 644 libargon2.pc %{buildroot}%{_libdir}/pkgconfig/lib%{name}.pc

%check
%__make test

%files
%doc CHANGELOG.md README.md
%doc argon2-specs.pdf
%license LICENSE
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*

%files -n %{libname}
%doc CHANGELOG.md README.md
%{_libdir}/lib%{name}.so.%{major}{,.*}

%files -n %{develname}
%doc CHANGELOG.md README.md
%{_includedir}/%{name}.h
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/lib%{name}.pc


%changelog
* Fri Sep 21 2018 umeabot <umeabot> 20171227-2.mga7
  (not released yet)
+ Revision: 1294541
- Mageia 7 Mass Rebuild

* Thu Jan 04 2018 daviddavid <daviddavid> 20171227-1.mga7
+ Revision: 1190086
- new version: 20171227
- now libmajor is 1

* Sun Jul 23 2017 daviddavid <daviddavid> 20161029-1.mga7
+ Revision: 1129691
- initial package argon2