# # spec file for package perl-Crypt-OpenSSL-AES # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # 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/ # # norootforbuild %define pren perl %define mname Crypt-OpenSSL-AES %define ver 0.02 %if !%( echo %{mname} | grep "-" >/dev/null; echo $? ) %define mpath %( echo %{mname} | sed -e "s,-,/,g") %define mcnt %( echo %{mpath} | awk -F"/" '{print NF}' ) %define fname %(echo %{mname} | awk -F"-" '{print $1}') %else %define mpath %{mname} %define mcnt 1 %define fname %{mname} %endif %if %{?rel:0}%{!?rel:1} %define rel 1 %endif #Distribution: %dist #Packager: %packager #Vendor: %vendor Name: %{pren}-%{mname} Summary: A Perl wrapper around OpenSSL's AES library Version: %{ver} Release: %{rel} License: artistic Group: Applications/CPAN Url: http://www.cpan.org Source0: %{mname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl #BuildRequires: perl(Module::Build) # other not perl || perl-base BuildRequires: openssl-devel Requires: perl = %{perl_version} # other not perl || perl-base Requires: openssl Provides: %{mname} Crypt::OpenSSL::AES #---------------------------------------------------------------------------------- %description #---------------------------------------------------------------------------------- %{mname} module for perl This is Crypt::OpenSSL::AES version 0.02, an XS-wrapper around OpenSSL`s AES (Advanced Encryption Standard) library. This module is an alternative to the implementation provided by Crypt::Rijndael which implements AES itself. In contrast, this module is simply a wrapper around the OpenSSL library. The Crypt::Rijndael implementation seems to produce inaccurate results on 64-bit x86 machines. By using OpenSSL, this module aims to avoid architecture specific problems, allowing the OpenSSL maintainers to overcome such issues. Author: Tolga Tarhan, ------------------------------------------------------------------------------- #---------------------------------------------------------------------------------- %prep #---------------------------------------------------------------------------------- %setup -q -n %{mname}-%{version} #---------------------------------------------------------------------------------- %build #---------------------------------------------------------------------------------- CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL %{__make} %check %{__make} test #---------------------------------------------------------------------------------- %install #---------------------------------------------------------------------------------- %perl_make_install %perl_process_packlist FILES_FILE=%{mname}-%{version}-filelist [ %{mcnt} -eq 1 ] && { cat > $FILES_FILE << EOF %dir %{perl_vendorarch}/auto/%{mpath} EOF } # for module in %{perl_vendorarch} [ %{mcnt} -gt 1 ] && { dir_nm=(`echo %{mname} | sed -e "s,-, ,g"`) ffind="${RPM_BUILD_ROOT}%{perl_vendorarch}" perl_dir=%{perl_vendorarch} i=0 while [ $i -lt %{mcnt} ]; do if [ -d ${ffind}/${dir_nm[$i]} ]; then cat >> $FILES_FILE << EOF %dir ${perl_dir}/${dir_nm[$i]} EOF fi ffind=${ffind}/${dir_nm[$i]} perl_dir=${perl_dir}/${dir_nm[$i]} i=$[$i+1] done cat >> $FILES_FILE << EOF ${perl_dir}.pm EOF } # for files in %{perl_vendorarch}/auto [ %{mcnt} -gt 1 ] && { dir_nm=(`echo %{mname} | sed -e "s,-, ,g"`) ffind="${RPM_BUILD_ROOT}%{perl_vendorarch}/auto" perl_dir=%{perl_vendorarch}/auto i=0 while [ $i -lt %{mcnt} ]; do if [ -d ${ffind}/${dir_nm[$i]} ]; then cat >> $FILES_FILE << EOF %dir ${perl_dir}/${dir_nm[$i]} EOF fi ffind=${ffind}/${dir_nm[$i]} perl_dir=${perl_dir}/${dir_nm[$i]} i=$[$i+1] done cat >> $FILES_FILE << EOF ${perl_dir} EOF } #---------------------------------------------------------------------------------- %clean #---------------------------------------------------------------------------------- [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && %{__rm} -rf $RPM_BUILD_ROOT #---------------------------------------------------------------------------------- %files -f %{mname}-%{version}-filelist #---------------------------------------------------------------------------------- # normally you only need to check for doc files %defattr(-,root,root) %doc Changes README %{_mandir}/man?/* /var/adm/perl-modules/%{name} #---------------------------------------------------------------------------------- %changelog #----------------------------------------------------------------------------------