File elementary.spec of Package elementary

# spec file for package elementary
# 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

%define build_doc 0%{?mandriva_version} == 20101 || 0%{?centos_version} == 6

Name:           elementary
Version:        1.7.8
Release:        0
Summary:        The widget set for enlightenment
License:        LGPL-2.1
Group:          System/Libraries
Source:         %{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE elementary-
Patch0:         elementary-
BuildRequires:  doxygen
%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRequires:  ImageMagick
BuildRequires:  e_dbus-devel >= %version
BuildRequires:  ecore-devel >= %version
BuildRequires:  edje-devel >= %version
BuildRequires:  eet-devel >= %version
BuildRequires:  eina-devel >= %version
BuildRequires:  eio-devel >= %version
BuildRequires:  embryo-devel >= %version
BuildRequires:  emotion-devel >= %version
BuildRequires:  ethumb-devel >= %version
BuildRequires:  evas-devel >= %version
BuildRequires:  gettext-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  xorg-x11-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  update-desktop-files

Set of widgets for enlightenment focused on touch devices

%package -n libelementary1
Summary:        Elementary Dynamic Libraries
Group:          System/Libraries

%description -n libelementary1
Headers, static libraries, test programs and documentation for elementary

%package devel
Summary:        Elementary development package
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       e_dbus-devel >= %version
Requires:       ecore-devel >= %version
Requires:       edje-devel >= %version
Requires:       eet-devel >= %version
Requires:       eina-devel >= %version
Requires:       eio-devel >= %version
Requires:       embryo-devel >= %version
Requires:       emotion-devel >= %version
Requires:       ethumb-devel >= %version
Requires:       evas-devel >= %version
Requires:       gettext-devel
Requires:       libelementary1 = %{version}
Requires:       xorg-x11-devel

%description devel
Development files for Elementary library.

%if %build_doc
%package doc-html
Summary:        HTML documentation of Elementary
Group:          Documentation/HTML

%description doc-html
Documentation of Elementary library in form of HTML pages.

%package examples
Summary:        Elementary examples
Group:          Documentation/Other

%description examples
Examples of usage of Elementary library.

%setup -q

%if %build_doc
# 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 --disable-silent-rules --enable-install-examples
make %{?_smp_mflags}
%if %build_doc
make doc

make install DESTDIR="%buildroot"

%if %build_doc
# copy documentation manually
# fix line endings
find doc/ -name '*.eps' | xargs sed -i 's@\r@\n@g'
# remove duplicates
%if 0%{?suse_version}
%fdupes -s doc/

mkdir -p  %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
mv %{buildroot}%{_datadir}/icons/elementary.png  %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
find %{buildroot}%{_libdir} -name '*.la' -exec rm -v {} +
%find_lang %{name}
%if 0%{?suse_version}
%suse_update_desktop_file -n %{buildroot}%{_datadir}/applications/elementary_config.desktop
%suse_update_desktop_file -n %{buildroot}%{_datadir}/applications/elementary_test.desktop

%post -n libelementary1 -p /sbin/ldconfig
%postun -n libelementary1 -p /sbin/ldconfig

%files -f %{name}.lang
%if 0%{?sles_version}
# FIXME: this is probably not standard dir
%dir %{_datadir}/locale/ko_KR
%dir %{_datadir}/locale/ko_KR/LC_MESSAGES
%exclude %{_datadir}/elementary/examples

%files -n libelementary1

%files devel

%if %build_doc
%files doc-html
%defattr(-, root, root)
%doc doc/html
%if 0%{?centos_version} || 0%{?fedora_version} == 16
%exclude %{_docdir}/%name-%version/[A-Z]*
%exclude %{_docdir}/%name/[A-Z]*


%files examples
%defattr(-, root, root)

openSUSE Build Service is sponsored by