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 http://bugs.opensuse.org/
#
%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
Url: http://enlightenment.org/
Source: %{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE elementary-0.7.0.63840-desktop.patch
Patch0: elementary-0.7.0.63840-desktop.patch
BuildRequires: doxygen
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
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
%endif
%description
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.
%endif
%package examples
Summary: Elementary examples
Group: Documentation/Other
%description examples
Examples of usage of Elementary library.
%prep
%setup -q
%patch0
%build
%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
%endif
%configure --disable-static --disable-silent-rules --enable-install-examples
make %{?_smp_mflags}
%if %build_doc
make doc
%endif
%install
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/
%endif
%endif
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
%endif
%post -n libelementary1 -p /sbin/ldconfig
%postun -n libelementary1 -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README TODO ChangeLog
%if 0%{?sles_version}
# FIXME: this is probably not standard dir
%dir %{_datadir}/locale/ko_KR
%dir %{_datadir}/locale/ko_KR/LC_MESSAGES
%endif
%{_bindir}/elementary*
%{_datadir}/elementary
%exclude %{_datadir}/elementary/examples
%{_datadir}/icons/hicolor/
%{_datadir}/applications/elementary*
%{_libdir}/edje
%{_libdir}/elementary
%{_libdir}/elementary_testql.so
%files -n libelementary1
%defattr(-,root,root)
%{_libdir}/libelementary.so.*
%files devel
%defattr(-,root,root)
%{_libdir}/libelementary.so
%{_libdir}/pkgconfig/elementary.pc
%{_includedir}/elementary-1/
%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]*
%else
%exclude %{_docdir}/%name/[A-Z]*
%endif
%endif
%files examples
%defattr(-, root, root)
%{_datadir}/elementary/examples
%changelog