File eeze.spec of Package eeze
#
# spec file for package eeze
#
# 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: eeze
Version: 1.7.8
Release: 0
Summary: Device abstraction library
License: BSD-2-Clause
Group: System/Libraries
Url: http://enlightenment.org
Source: %{name}-%{version}.tar.bz2
BuildRequires: doxygen
BuildRequires: ecore-devel >= %version
BuildRequires: eina-devel >= %version
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
BuildRequires: libtool
%if 0%{?mandriva_version} != 201010 && 0%{?centos_version} != 600 && 0%{?sles_version} != 11
BuildRequires: libmount-devel
%endif
BuildRequires: libudev-devel
BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Eeze is a library for manipulating devices through udev with a simple
and fast api. It interfaces directly with libudev, avoiding such
middleman daemons as udisks/upower or hal, to immediately gather
device information the instant it becomes known to the system. This
can be used to determine such things as:
* If a cdrom has a disk inserted
* The temperature of a cpu core
* The remaining power left in a battery
* The current power consumption of various parts
* Monitor in realtime the status of peripheral devices
Each of the above examples can be performed by using only a single
eeze function, as one of the primary focuses of the library is to
reduce the complexity of managing devices.
%package -n libeeze1
Summary: Device abstraction library
Group: System/Libraries
%description -n libeeze1
Headers, static libraries, test programs and documentation for eeze
%package devel
Summary: Eeze headers, static libraries, documentation and test programs
Group: Development/Libraries/C and C++
Requires: ecore-devel >= %version
Requires: eina-devel >= %version
Requires: libeeze1 = %{version}
Requires: libudev-devel
%description devel
Headers, static libraries, test programs and documentation for eeze
%package doc-html
Summary: HTML documentation of Eeze
Group: Documentation/HTML
%description doc-html
Documentation of Eet library in form of HTML pages.
%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
make %{?_smp_mflags}
make doc
%install
make install DESTDIR="%buildroot" utildir=%{_libdir}/enlightenment/utils
# 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 -v {} \;
%post -n libeeze1 -p /sbin/ldconfig
%postun -n libeeze1 -p /sbin/ldconfig
%files -n libeeze1
%defattr(-, root, root)
%{_libdir}/libeeze.so.1*
%if 0%{?mandriva_version} != 201010 && 0%{?centos_version} != 600 && 0%{?sles_version} != 11
%files
%defattr(-, root, root)
%{_bindir}/*
%{_libdir}/enlightenment/
%endif
%files devel
%defattr(-, root, root)
%{_includedir}/eeze-1/
%{_libdir}/libeeze.so
%{_libdir}/pkgconfig/eeze.pc
%files doc-html
%defattr(-, root, root)
%{_docdir}/%{name}
%changelog