Summary: Crypt-OpenSSL-RSA Perl module
Name: perl-Crypt-OpenSSL-RSA
Version: 0.31
Release: 2%{?_dist_release}
License: GPL or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Crypt-OpenSSL-RSA/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: openssl-devel
BuildRequires: perl-Crypt-OpenSSL-Guess
Requires: perl-Crypt-OpenSSL-Random
Source0: Crypt-OpenSSL-RSA-%{version}.tar.gz
Vendor: Project Vine
Distribution: Vine Linux
Packager: tomop

%description
Crypt::OpenSSL::RSA is an XS perl module designed to provide basic RSA
functionality.  It does this by providing a glue to the RSA functions
in the OpenSSL library.

%prep
%setup -q -n Crypt-OpenSSL-RSA-%{version}

%build
CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL INSTALLDIRS="vendor"
make %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT

make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -type f -a \( -name perllocal.pod -o -name .packlist \
  -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*

for brp in %{_prefix}/lib/rpm/%{_build_vendor}/brp-compress \
  %{_prefix}/lib/rpm/brp-compress
do
  [ -x $brp ] && $brp && break
done


find $RPM_BUILD_ROOT -type f \
| sed "s@^$RPM_BUILD_ROOT@@g" \
> %{name}-%{version}-%{release}-filelist

eval `%{__perl} -V:archname -V:installsitelib -V:installvendorlib -V:installprivlib`
for d in $installsitelib $installvendorlib $installprivlib; do
  [ -z "$d" -o "$d" = "UNKNOWN" -o ! -d "$RPM_BUILD_ROOT$d" ] && continue
  find $RPM_BUILD_ROOT$d/* -type d \
  | grep -v "/$archname\(/auto\)\?$" \
  | sed "s@^$RPM_BUILD_ROOT@%dir @g" \
  >> %{name}-%{version}-%{release}-filelist
done

if [ "$(cat %{name}-%{version}-%{release}-filelist)X" = "X" ] ; then
    echo "ERROR: EMPTY FILE LIST"
    exit 1
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}-%{version}-%{release}-filelist
%defattr(-,root,root,-)
%license LICENSE
%doc Changes README

%changelog
* Sun May 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.31-2
- rebuilt with perl-5.26.

* Sun Nov 18 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.31-1
- new upstream release.

* Mon May  9 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.28-3
- rebuilt with openssl-1.0.2.

* Mon Jun 30 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.28-2
- rebuilt with perl-5.16.3.

* Thu Mar 27 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.28-1
- new upstream release.

* Tue Apr 29 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.25-1
- initial build.

