Summary: The Enlightenment window manager, DR16.
Summary(ja): Enlightenment ウィンドウマネージャ(DR16)
Name: e16
Version: 1.0.10.001
Release: 1%{?_dist_release}
License: BSD
Group: User Interface/Desktops
URL: http://www.enlightenment.org/
Source: http://prdownloads.sourceforge.net/enlightenment/%{name}-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: imlib2-devel freetype2-devel xorg-x11-xbitmaps
BuildRequires: alsa-lib-devel audiofile-devel
BuildRequires: libXrandr-devel libSM-devel xorg-x11-proto-devel
BuildRequires: libXfixes-devel libXrender-devel libXdamage-devel
BuildRequires: libXcomposite-devel libXft-devel libXxf86vm-devel
BuildRequires: libXinerama-devel
BuildRequires: pango-devel dbus-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: desktop-file-utils
#BuildRequires: esound-devel

Obsoletes: enlightenment < 0.16.8
Requires: imlib2 >= 1.2.0
Provides: e16-edox

%description
Enlightenment is a window manager for the X Window System that
is designed to be powerful, extensible, configurable and
pretty darned good looking! It is one of the more graphically
intense window managers.

This package will install the Enlightenment window manager.
You have chosen Enlightment window manager in GNOME/KDE,
if would like to revert default window manager, please edit this file.
~/.gconf/desktop/gnome/sessionrequired-components/%gconf.xml

%description -l ja
Enlightenment は迫力があり、拡張性に富み、高度に設定可能で
非常に見栄え良く繕えるよう設計されている X Window System 用の
ウィンドウマネージャです。より視覚的に鮮烈であるウィンドウマネージャの
ひとつです。

このパッケージは Enlightenment ウィンドウマネージャをインストールします。
GNOME/KDE のウィンドウマネージャに Enlightment を選択した後、
標準のウィンドウマネージャに戻したい場合は、次のファイルを修正してください。
~/.gconf/desktop/gnome/sessionrequired-components/%gconf.xml

%prep
%setup -q

%build
%configure --enable-pango   \
           --enable-mans    \
           --enable-modules \
           --enable-visibility-hiding \
	   --enable-sound-pulse \
	   --enable-sound-esound=no \
	   --disable-rpath
%{__make} %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT %{?mflags_install}
rm -f $RPM_BUILD_ROOT/usr/lib*/e16/*.la
rm -rf $RPM_BUILD_ROOT/usr/share/doc
mkdir -p $RPM_BUILD_ROOT/etc/X11/xinit/Xclients.d
cp $RPM_BUILD_ROOT/usr/share/e16/misc/Xclients.* $RPM_BUILD_ROOT/etc/X11/xinit/Xclients.d/

%find_lang %{name}

%if %{?_dist_release} == "vl6"
# remove gnome3 desktop file
%{__rm} -f %{buildroot}%{_datadir}/xsessions/e16-gnome3-session.desktop
%else
# remove gnome2 desktop file
%{__rm} -f %{buildroot}%{_datadir}/xsessions/e16-gnome2-session.desktop
%endif

# Desktop file
#%{__rm} -f %{buildroot}%{_datadir}/applications/%{name}.desktop

#%{__cp} %{buildroot}%{_datadir}/e16/misc/e16.desktop-app \
#    %{buildroot}%{_datadir}/applications/%{name}.desktop
desktop-file-install --dir %{buildroot}%{_datadir}/applications \
    %{buildroot}%{_datadir}/applications/%{name}.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%post
if [ "$LANG" = "ja_JP.UTF-8" ]; then
  echo "GNOME/KDE のウィンドウマネージャに Enlightment を選択した後、"
  echo "標準のウィンドウマネージャに戻したい場合は、"
  echo "次のファイルを修正してください。"
  echo "~/.gconf/desktop/gnome/sessionrequired-components/%gconf.xml"
elif [ "$LANG" = "ja_JP.utf8" ]; then
  echo "GNOME/KDE のウィンドウマネージャに Enlightment を選択した後、"
  echo "標準のウィンドウマネージャに戻したい場合は、"
  echo "次のファイルを修正してください。"
  echo "~/.gconf/desktop/gnome/sessionrequired-components/%gconf.xml"
else
  echo "You have chosen Enlightment window manager in GNOME/KDE,"
  echo "if would like to revert default window manager,"
  echo "please edit this file."
  echo "~/.gconf/desktop/gnome/sessionrequired-components/%gconf.xml"
fi

%files
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog docs/e16.html
%{_bindir}/*
%{_libdir}/e16/*.so
%{_datadir}/%{name}/*
%{_datadir}/locale/*
%{_datadir}/applications/*
%{_datadir}/gnome-session/*
%{_datadir}/xsessions/*
%{_sysconfdir}/X11/xinit/Xclients.d/*
%{_mandir}/*

%changelog
* Tue Jul 24 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.0.10.001-1
- new upstream snapshot
- added %%configure option --disable-rpath

* Sat Jan 14 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.0.10-1
- new upstream release
- dropt BuildRequires: esound-devel
- added BuildRequires: pulseaudio-libs-devel
- added configure option --enable-sound-pulse and --enable-sound-esound=no
- set contitional branch for GNOME session
  - deleted GNOME3 session (for Vine 6), GNOME2 session (for VineSeed)

* Wed May 4 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.0.8-1
- new upstream release

* Mon Dec 13 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.7-2
- add BuildRequires: libXinerama-devel

* Sun Dec 12 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.0.7-1
- initial build for VineSeed
