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

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

Source0:        http://download.enlightenment.org/releases/%{name}-%{version}.tar.bz2

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  doxygen
BuildRequires:  gnutls-devel
BuildRequires:  libeina-devel >= 1.0.1
BuildRequires:  libjpeg-turbo-devel
BuildRequires:  pkgconfig
BuildRequires:  zlib-devel

%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}
Summary(ja):    %{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 \
    --enable-silent-rules \
    --disable-static \
    --disable-doc \
    --disable-install-examples

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
#chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libeet.so.%{version}

# remove unfinished manpages
#find doc/man/man3 -size -100c -delete

#for l in todo %{name}.dox
#do
#    rm -f doc/man/man3/$l.3
#done 

#chmod -x doc/html/*

#install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man3
#install -Dpm0644 doc/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3

# Rename overly generic manpage
#mv $RPM_BUILD_ROOT%{_mandir}/man3/deprecated.3 $RPM_BUILD_ROOT%{_mandir}/man3/eet-deprecated.3

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


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

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


%changelog
* Thu Nov 13 2014 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.7.0-1
- updated to 1.7.0
- linked to gnutls instead of openssl

* Mon Aug  1 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.4.1-1
- new upstream release
- resolve manpage conflict due to generic naming

* Sun Feb 27 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.4.0-1
- new upstream release
- added BR: libeina-devel

* 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