Summary:	Data Type Library
Name:		libeina
Version:	1.7.10
Release:	1%{?_dist_release}

License:	LGPLv2+
Group:		System Environment/Libraries
URL:		http://www.enlightenment.org/

Source:		http://download.enlightenment.org/releases/eina-%{version}.tar.bz2

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	check-devel
BuildRequires:	doxygen
BuildRequires:	pkgconfig

%description
Eina is a multi-platform library that provides optimized data types 
and useful tools for projects.

%package	devel
Summary:	Eina headers, documentation
Summary(ja):	libeina 
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	pkgconfig

%description	devel
Headers, test programs and documentation for %{name}.

%prep
%setup -q -n eina-%{version}

# Avoid lib64 rpaths
%if "%{_libdir}" != "/usr/lib"
sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
%endif

%build
%configure \
    --enable-silent-rules \
    --disable-static

make %{?_smp_mflags}
#make doc %{?_smp_mflags}

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

# 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 

#mkdir -p %{buildroot}%{_mandir}/man3
#install -Dpm0644 doc/man/man3/* %{buildroot}%{_mandir}/man3

# remove libtool archive along with stripping
find %{buildroot}/ -type f  -iname '*.la' -exec rm {} \;
find %{buildroot}/ -type f  -iname '*.a' -exec rm {} \;

## Can be enabled when upstream fixed the tests
## needs --enable-tests with %%configure
%check
make check

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

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

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

%changelog
* Thu Nov 13 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.7.10-1
- new upstream release

* Mon Aug  1 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0.1-1
- new upstream release

* Sun Feb 27 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0.0-3
- Initial build for Vine Linux

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

* Mon Jan 31 2011 Thomas Janssen <thomasj@fedoraproject.org> 1.0.0-1
- final 1.0.0 release

* Wed Dec 15 2010 Thomas Janssen <thomasj@fedoraproject.org> 1.0.0-0.1.beta3
- beta 3 release

* Tue Nov 16 2010 Thomas Janssen <thomasj@fedoraproject.org> 1.0.0-0.1.beta2
- beta 2 release

* Fri Nov 05 2010 Thomas Janssen <thomasj@fedoraproject.org> 1.0.0-0.1.beta1
- beta 1 release

* Fri Jul 02 2010 Thomas Janssen <thomasj@fedoraproject.org> 0.9.9.49898-1
- libeina 0.9.9.49898 snapshot release

* Fri Jun 11 2010 Thomas Janssen <thomasj@fedoraproject.org> 0.9.9.49539-1
- libeina 0.9.9.49539 snapshot release

* Tue Feb 23 2010 Thomas Janssen <thomasj@fedoraproject.org> 0.9.9.063-6
- Disabled tests again until they are fixed

* Mon Feb 22 2010 Thomas Janssen <thomasj@fedoraproject.org> 0.9.9.063-5
- Added missing BR doxygen check

* Sun Feb 21 2010 Thomas Janssen <thomasj@fedoraproject.org> 0.9.9.063-4
- added Requires for -devel
- corrected license
- enabled tests

* Fri Feb 19 2010 Thomas Janssen <thomasj@fedoraproject.org> 0.9.9.063-3
- name changed from eina-0 to libeina
- spec fixes

* Mon Feb 15 2010 Thomas Janssen <thomasj@fedoraproject.org> 0.9.9.063-2
- added missing man pages

* Mon Feb 15 2010 Thomas Janssen <thomasj@fedoraproject.org> 0.9.9.063-1
- Initial Fedora release

