sovrin-client 0.1.1-15

Sovrin client with c-callable interface
%global commit @commit@

Summary: Official SDK for Hyperledger Indy
Name: indy-sdk
Version: @version@.%{commit}
Release: 1%{?dist}
License: Apache License 2.0
Group: System Environment/Libraries
Source: https://github.com/hyperledger/indy-sdk/archive/%{commit}.tar.gz
URL: https://github.com/hyperledger/indy-sdk/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: sqlite openssl libsodium
BuildRequires: sqlite-devel openssl-devel libsodium-devel

%description
This is the official SDK for Hyperledger Indy, which provides a
distributed-ledger-based foundation for self-sovereign identity.
The major artifact of the SDK is a c-callable library; there are
also convenience wrappers for various programming languages.

All bugs, stories, and backlog for this project are managed through
Hyperledger's Jira in project IS (note that regular Indy tickets are
in the INDY project instead...). Also, join us on Jira's Rocket.Chat
at #indy-sdk to discuss.

%package devel
Summary: Development files for Hyperledger Indy
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
This is the official SDK for Hyperledger Indy, which provides a
distributed-ledger-based foundation for self-sovereign identity.
The major artifact of the SDK is a c-callable library; there are
also convenience wrappers for various programming languages.

All bugs, stories, and backlog for this project are managed through
Hyperledger's Jira in project IS (note that regular Indy tickets are
in the INDY project instead...). Also, join us on Jira's Rocket.Chat
at #indy-sdk to discuss.

%prep
%autosetup -n %{name}-%{commit}

%build
cargo build --release

%install
rm -rf ${RPM_BUILD_ROOT}

install -dm0755 $RPM_BUILD_ROOT/%{_includedir}/sovrin
install -dm0755 $RPM_BUILD_ROOT/%{_libdir}
cp -a include/*.h $RPM_BUILD_ROOT/%{_includedir}/sovrin/
install -Dm0644 target/release/libsovrin.a $RPM_BUILD_ROOT/%{_libdir}/libsovrin.a
install -Dm0644 target/release/libsovrin.so $RPM_BUILD_ROOT/%{_libdir}/libsovrin.so

%clean
rm -rf ${RPM_BUILD_ROOT}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/libsovrin.so*

%files devel
%defattr(-,root,root)
%{_libdir}/libsovrin.a
%{_includedir}/sovrin/*.h

%changelog