File elementary.spec of Package elementary
#
# spec file for package elementary
#
# Copyright (c) 2015 SUSE LINUX 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
%ifarch %ix86 x86_64 %arml ppc
%define luajit_present 1
%else
%define luajit_present 0
%endif
%define efl_version 1.15.2
Name: elementary
Version: 1.15.2
Release: 0
Summary: The widget set for enlightenment
License: LGPL-2.1
Group: System/Libraries
Url: http://enlightenment.org/
Source: %{name}-%{version}.tar.xz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: doxygen
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
BuildRequires: ImageMagick
BuildRequires: gettext-devel
BuildRequires: libtool
%if %luajit_present
BuildRequires: pkgconfig(luajit)
%else
%if 0%{suse_version} >= 1330
BuildRequires: pkgconfig(lua-5.1)
%else
BuildRequires: pkgconfig(lua) < 5.2
%endif
%endif
BuildRequires: pkgconfig
BuildRequires: pkgconfig(ecore) >= %efl_version
BuildRequires: pkgconfig(ecore-con) >= %efl_version
BuildRequires: pkgconfig(ecore-evas) >= %efl_version
BuildRequires: pkgconfig(ecore-file) >= %efl_version
BuildRequires: pkgconfig(ecore-imf) >= %efl_version
BuildRequires: pkgconfig(ecore-input) >= %efl_version
BuildRequires: pkgconfig(ecore-x) >= %efl_version
BuildRequires: pkgconfig(edje) >= %efl_version
BuildRequires: pkgconfig(eet) >= %efl_version
BuildRequires: pkgconfig(efreet) >= %efl_version
BuildRequires: pkgconfig(efreet-mime) >= %efl_version
BuildRequires: pkgconfig(efreet-trash) >= %efl_version
BuildRequires: pkgconfig(eina) >= %efl_version
BuildRequires: pkgconfig(eio) >= %efl_version
BuildRequires: pkgconfig(eldbus) >= %efl_version
BuildRequires: pkgconfig(elocation) >= %efl_version
BuildRequires: pkgconfig(emotion) >= %efl_version
BuildRequires: pkgconfig(eo) >= %efl_version
BuildRequires: pkgconfig(ethumb_client) >= %efl_version
BuildRequires: pkgconfig(evas) >= %efl_version
#BuildRequires: xorg-x11-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%requires_eq efl
%endif
# we need a defult.edj, TBD provide this with defult openSUSE theme as well
%description
Set of widgets for enlightenment focused on touch devices
%package -n libelementary1
Summary: Elementary Dynamic Libraries
Group: System/Libraries
Requires: enlightenment-theme-dft
#lib elementary is no use without elementary
Requires: elementary
%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: efl-devel
Requires: gettext-devel
Requires: libelementary1 = %{version}
%if %luajit_present
Requires: pkgconfig(luajit)
%else
%if 0%{suse_version} >= 1330
Requires: pkgconfig(lua-5.1)
%else
Requires: pkgconfig(lua) < 5.2
%endif
%endif
%description devel
Development files for Elementary library.
%package -n enlightenment-theme-upstream
Summary: Default Enlightenment theme
Group: System/GUI/Other
Version: 0.18.0
Release: 0
Provides: enlightenment-theme = 0.1
Provides: enlightenment-theme-dft
Conflicts: otherproviders(enlightenment-theme-dft)
%description -n enlightenment-theme-upstream
For use with upstream branding, when using openSUSE themes, when using openSUSE themes Use the Dark theme instead
%package -n enlightenment-theme-dark
Summary: Default Enlightenment theme(Dark)
Group: System/GUI/Other
Provides: enlightenment-theme
%description -n enlightenment-theme-dark
The default theme for enlightenment install when using openSUSE branding
%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
%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 "Elementary Configuration" -G "Elementary Configuration" -r %{buildroot}%{_datadir}/applications/elementary_config.desktop Settings DesktopSettings
%suse_update_desktop_file -N "Elementary Test" -G "Elementary Test" -r %{buildroot}%{_datadir}/applications/elementary_test.desktop Development IDE
%endif
# create version for dark package
cp %{buildroot}%{_datadir}/elementary/themes/default.edj %{buildroot}%{_datadir}/elementary/themes/dark.edj
%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}/*
%{_datadir}/elementary
%exclude %{_datadir}/elementary/examples
%exclude %{_datadir}/elementary/themes/*
%{_datadir}/icons/hicolor/
%{_datadir}/applications/elementary*
%{_libdir}/edje
%{_libdir}/elementary
%files -n libelementary1
%defattr(-,root,root)
%{_libdir}/libelementary.so.*
%files devel
%defattr(-,root,root)
%{_libdir}/libelementary.so
%{_libdir}/pkgconfig/elementary.pc
%{_libdir}/pkgconfig/elementary-cxx.pc
%{_includedir}/elementary-1/
%{_libdir}/cmake
%{_datadir}/eolian/
%files -n enlightenment-theme-upstream
%defattr(-, root, root)
%{_datadir}/elementary/themes/default.edj
%files -n enlightenment-theme-dark
%defattr(-, root, root)
%{_datadir}/elementary/themes/dark.edj
%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