Summary: a modern and easy-to-use crypto library
Summary(ja): モダンで手軽に使える暗号化ライブラリー
Name: libsodium
Version: 1.0.18
Release: 2%{?_dist_release}
Group: system
Vendor: Project Vine
Distribution: Vine Linux
Packager: iwaim

License: ISC
URL: https://github.com/jedisct1/libsodium
Source0: https://github.com/jedisct1/libsodium/releases/download/%{version}-RELEASE/%{name}-%{version}.tar.gz

#BuildRequires: 
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description
Sodium is a new, easy-to-use software library for encryption, decryption,
signatures, password hashing and more.

It is a portable, cross-compilable, installable, packageable fork of NaCl,
with a compatible API, and an extended API to improve usability even further.

Its goal is to provide all of the core operations needed to build
higher-level cryptographic tools.


%package devel
Summary: Development files for %{name}
Summary(ja): %{name} の開発ファイル
Group: programming
Requires: %{name} = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%debug_package


%prep
%setup -q


%build
./autogen.sh
%configure --enable-shared --disable-static
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__make} install DESTDIR=${RPM_BUILD_ROOT}

%{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir}/libsodium.la


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%check
make check


%files
%defattr(-,root,root)
%license LICENSE
%doc AUTHORS ChangeLog THANKS README.*
%{_libdir}/libsodium.so.*

%files devel
%defattr(-,root,root)
%license LICENSE
%doc AUTHORS ChangeLog THANKS README.*
%{_libdir}/pkgconfig/libsodium.pc
%{_libdir}/libsodium.so
%{_includedir}/sodium.h
%{_includedir}/sodium


%changelog
* Thu Aug 19 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.18-2
- rebuilt with current environment.
- dropped ldconfig scriptlets.

* Sat Mar 07 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.18-1
- new upstream release.

* Mon Jun  5 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.0.12-1
- initial build for Vine Linux