Name:           eet
Summary:        Library for speedy data storage, retrieval, and compression
Version:        1.1.0
Release:        6%{?_dist_release}

Group:          System Environment/Libraries
License:        MIT
URL:            http://web.enlightenment.org/p.php?p=about/efl/eet

Source0:        http://download.enlightenment.org/snapshots/2008-09-25/%{name}-%{version}.tar.bz2

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  chrpath
BuildRequires:  libjpeg-turbo-devel
BuildRequires:  zlib-devel
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig

%description
Eet is a tiny library designed to write an arbitary set of chunks of
data to a file and optionally compress each chunk (very much like a
zip file) and allow fast random-access reading of the file later
on. It does not do zip as a zip itself has more complexity than is
needed, and it was much simpler to implement this once here.

It also can encode and decode data structures in memory, as well as
image data for saving to eet files or sending across the network to
other machines, or just writing to arbitary files on the system. All
data is encoded in a platform independent way and can be written and
read by any architecture.

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

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


%prep
%setup -q

%build
%configure --disable-static
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/%{name}
find $RPM_BUILD_ROOT -name '*.la' -delete
# remove unfinished manpages
find doc/man/man3 -size -100c -delete
rm -f doc/man/man3/todo.3 # remove todo
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man3
install -p -m 644 doc/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING COPYING-PLAIN README
%{_bindir}/%{name}
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%doc doc/html
%{_mandir}/man3/* 
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc


%changelog
* Sat Jan 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.1.0-6
- rebuild with openssl-1.0.0c
- add BuildRequires: openssl-devel

* Sun Sep 26 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.1.0-5
- rebuilt with rpm-4.8.1 for pkg-config

* Sun Aug 29 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.1.0-4
- Initial build for Vine Linux

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Pavel "Stalwart" Shevchuk <stlwrt@gmail.com> - 1.1.0-1
- New upstream snapshot

* Mon May 19 2008 Pavel "Stalwart" Shevchuk <stlwrt@gmail.com> - 1.0.1-1
- New upstream snapshot

* Thu Apr 24 2008 Pavel "Stalwart" Shevchuk <stlwrt@gmail.com> - 1.0.0-1
- New upstream release, eet is out of beta now
- Fixed pkg-config file

* Sat Apr 19 2008 Pavel "Stalwart" Shevchuk <stlwrt@gmail.com> - 0.9.99900-4
- Added workaround for bug in eet.pc. Proper fix is commited upstream

* Sat Apr 19 2008 Pavel "Stalwart" Shevchuk <stlwrt@gmail.com> - 0.9.99900-3
- Cleaned up documentation installation
- Removed unneded dependency on zlib-devel from eet-devel

* Sat Apr 19 2008 Pavel "Stalwart" Shevchuk <stlwrt@gmail.com> - 0.9.99900-2
- Fixed timestamp of source tarball
- Preserve timestamps of installed files
- Added pkgconfig to -devel dependencies
- Added html docs

* Fri Apr 10 2008 Pavel "Stalwart" Shevchuk <stlwrt@gmail.com> - 0.9.99900-1
- Initial specfile for Eet