Name:		libaesgm
Version:	20090429
Release:	2%{?_dist_release}
Summary:	Library implementation of AES (Rijndael) cryptographic methods

License:	BSD
Group:		System Environment/Libraries
URL:		http://gladman.plushost.co.uk/oldsite/AES/index.php

Source0:	http://gladman.plushost.co.uk/oldsite/AES/aes-src-29-04-09.zip
Source1:	Makefile.aes
# Add fileencryption support
# http://www.gladman.me.uk/cryptography_technology/fileencrypt/
Patch0:		libaesgm-20090429-fileencrypt.patch

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

%description
Library implementation of AES (Rijndael) cryptographic methods.

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

%description devel
Development headers and libraries for libaesgm.

%prep
%setup -q -c -n %{name}-%{version}
cp %{SOURCE1} Makefile
%patch0 -p1 -b .fileencrypt
sed -i 's/\r//' *.txt

%build
%{__make} CFLAGS="%{optflags} -fPIC -DUSE_SHA1"

%install
%{__make} DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc *.txt
%{_libdir}/libaesgm.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}/aes/
%{_libdir}/libaesgm.so

%changelog
* Thu Jan 29 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 20090429-2
- rebuilt on current VineSeed

* Wed Mar 16 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 20090429-1
- initial build for Vine Linux based of fedora development

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20090429-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon May 24 2010 Tom "spot" Callaway <tcallawa@redhat.com> 20090429-3
- add fileencrypt support

* Mon Feb 22 2010 Tom "spot" Callaway <tcallawa@redhat.com> 20090429-2
- use sane versioning to ensure proper upgrade ordering without epoch
- fix Makefile.aes to not use double-zero in soname, don't make double zero symlink
- add default clean section
- put headers in /aes/ namespace dir

* Thu Feb 18 2010 Tom "spot" Callaway <tcallawa@redhat.com> 290409-1
- initial Fedora package