File efreet.spec of Package efreet
#
# spec file for package efreet
#
# 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: efreet
Version: 1.7.8
Release: 0
Summary: FreeDesktop.org standards compatibility library
License: BSD-2-Clause
Group: System/GUI/Other
Url: http://enlightenment.org/
Source: %{name}-%{version}.tar.bz2
BuildRequires: doxygen
BuildRequires: ecore-devel >= %version
BuildRequires: eet-devel >= %version
BuildRequires: eina-devel >= %version
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Standards handling for FreeDesktop.org standards. Part of Enlightenment Foundation Libraries.
%package -n libefreet1
Summary: Efreet Dynamic Library
Group: System/Libraries
%description -n libefreet1
Main dynamic library of Efreet package.
%package devel
Summary: Efreet development files
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: ecore-devel >= %version
Requires: eet-devel >= %version
Requires: eina-devel >= %version
Requires: libefreet1 = %{version}
%description devel
Development files for Efreet package.
%package testsuite
Summary: Efreet testsuite
Group: Development/Libraries/C and C++
Requires: libefreet1 = %{version}
%description testsuite
Testsuite of Efreet package.
%package doc-html
Summary: HTML documentation of Efreet
Group: Documentation/HTML
%description doc-html
Documentation of Efreet 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"
# 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 {} \;
%find_lang %{name}
%post -n libefreet1 -p /sbin/ldconfig
%postun -n libefreet1 -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/efreet_*
%{_datadir}/efreet/
%exclude %{_datadir}/efreet/test
%{_libdir}/efreet/
%files -n libefreet1
%defattr(-, root, root)
%{_libdir}/libefreet*.so.*
%files devel
%defattr(-, root, root)
%{_libdir}/libefreet*.so
%{_includedir}/efreet-1/
%{_libdir}/pkgconfig/efreet*.pc
%files testsuite
%defattr(-, root, root)
%{_datadir}/efreet/test
%files doc-html
%defattr(-, root, root)
%{_docdir}/%{name}
%changelog