File eet.spec of Package eet
#
# spec file for package eet
#
# Copyright (c) 2013 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/
#
Name: eet
Version: 1.7.5
Release: 0
Summary: Data encode/decode and storage library
License: BSD-2-Clause
Group: Development/Libraries/C and C++
Url: http://enlightenment.org/
Source: %{name}-%{version}.tar.bz2
BuildRequires: doxygen
BuildRequires: eina-devel >= %version
BuildRequires: libjpeg-devel
BuildRequires: libopenssl-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: zlib-devel
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Eet is a tiny library designed to write an arbitrary 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 arbitrary files on the system. All
data is encoded in a platform independent way and can be written and
read by any architecture.
%package -n libeet1
Summary: Eet Dynamic Libraries
Group: System/Libraries
Requires: libeina1 >= %version
%description -n libeet1
Headers, static libraries, test programs and documentation for eet
%package devel
Summary: Eet headers, static libraries, documentation and test programs
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: eina-devel >= %version
Requires: libeet1 = %{version}
Requires: libjpeg-devel
Requires: libopenssl-devel
Requires: pkgconfig
Requires: zlib-devel
%description devel
Headers, static libraries, test programs and documentation for eina
%package doc-html
Summary: HTML documentation of Eet
Group: Documentation/HTML
%description doc-html
Documentation of Eet library in form of HTML pages.
%package examples
Summary: Example usage of Eet
Group: Documentation/Other
%description examples
Example usage of Eet library.
%prep
%setup -q
%build
# fake time used for documentation
FAKE_DOCDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%a %%b %%d %%Y')
FAKE_DOCYEAR=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%Y')
FAKE_DOCDATETIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%a %%b %%d %%Y %T')
sed -i "s/\$datetime/$FAKE_DOCDATETIME/g;s/\$date/$FAKE_DOCDATE/g;s/\$year/$FAKEDOCYEAR/g" doc/*.html
%configure --disable-static --enable-install-examples
make %{?_smp_mflags}
make doc
%install
make install DESTDIR="%buildroot"
# copy documentation manually
echo "Copying HTML documentation"
mkdir -p %{buildroot}%{_docdir}/%{name}
/bin/cp -vr doc/html %{buildroot}%{_docdir}/%{name}
# fix permissions
find %{buildroot}%{_docdir} -type f | xargs chmod 0644
find %{buildroot}%{_docdir} -type d | xargs chmod 0755
# remove duplicates
%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_docdir}
%endif
find %{buildroot}%{_libdir} -name '*.la' -exec rm {} \;
%post -n libeet1 -p /sbin/ldconfig
%postun -n libeet1 -p /sbin/ldconfig
%files
%defattr(-, root, root)
%dir %{_datadir}/eet/
%{_bindir}/eet
%files -n libeet1
%defattr(-,root,root)
%{_libdir}/libeet.so.1*
%files devel
%defattr(-, root, root)
%{_includedir}/eet-1/
%{_libdir}/pkgconfig/eet.pc
%{_libdir}/libeet.so
%files doc-html
%defattr(-, root, root)
%{_docdir}/%{name}
%files examples
%defattr(-, root, root)
%{_datadir}/eet/examples
%changelog