Name:           gnome-shell-extensions
Version:        3.2.3
Release:        1%{?_dist_release}
Summary:        Modify and extend GNOME Shell functionality and behavior
Group:          User Interface/Desktops
License:        GPLv2+ 
URL:            http://live.gnome.org/GnomeShell/Extensions

Source0:        gnome-shell-extensions-%{version}.tar.xz
Source1:        gnome-shell-extensions.gnome-3-2.20111216.ja.po

Patch0:		gnome-shell-extensions-3.2.3-dock.patch
Patch1:		gnome-shell-extensions-3.2.3-revert-reference-to-localedir.patch

BuildRequires:  gnome-common
BuildRequires:  intltool
BuildRequires:  glib2-devel
BuildRequires:  gnome-desktop3-devel
BuildRequires:  libgtop2-devel

Requires:       gnome-shell >= 3.1.91
BuildArch:      noarch

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
GNOME Shell Extensions is a collection of extensions providing additional 
and optional functionality to GNOME Shell.

Enabled extensions:

  * alternate-tab
  * alternative-status-menu
  * dock
  * windowsNavigator
  * user-theme
  * auto-move-windows
  * drive-menu
  * places-menu
  * native-window-placement
  * workspace-indicator
  * xrandr-indicator
  * apps-menu
  * systemMonitor

%package        common
Summary:        Files common to GNOME Shell Extensions
Group:          User Interface/Desktops
License:        GPLv2+ 
%description    common
GNOME Shell Extensions is a collection of extensions providing additional 
and optional functionality to GNOME Shell. Common files and directories 
needed by extensions are provided here.

%package        alternate-tab
Summary:        Classic Alt+Tab behavior. Window based instead of app based
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    alternate-tab
Lets you use classic Alt+Tab (window-based instead of app-based) in GNOME Shell.  
GNOME Shell groups multiple instances of the same application together. 
This extension disables grouping.  

%package        alternative-status-menu
Summary:        For those who want a power off item visible at all the time
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    alternative-status-menu
For those who want a power off item visible at all the time, replaces 
GNOME Shell status menu with one featuring separate Suspend and Power Off. 
Adds the ability to hibernate as well.

%package        dock
Summary:        Shows a dock-style task switcher permanently
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    dock
Shows a dock-style task switcher on the right side of the screen permanently.

%package        windowsNavigator
Summary:        Keyboard selection of windows and work-spaces in overlay mode
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    windowsNavigator
Allow keyboard selection of windows and work-spaces in overlay mode in 
GNOME Shell.  Switch to overview mode (press the windows or alt+f1 key) and 
press the alt key to show numbers over windows.  Press any number to switch
to the corresponding window.

%package        user-theme
Summary:        Lets the user select a custom theme for the shell
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    user-theme
Lets the user select a custom theme for the Gnome shell. It will allow you to 
apply a style from /.themes/[themeName]/gnome-shell/gnome-shell.css

%package        auto-move-windows
Summary:        Assign specific workspaces to applications
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    auto-move-windows
Lets you manage your workspaces more easily, assigning a specific workspace to
each application as soon as it creates a window, in a manner configurable with a
GSettings key.

%package        drive-menu
Summary:        Disk device manager in the system status area
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    drive-menu
Adds a menu in the system status area that tracks removable disk devices
attached and offers to browse them and eject/unmount them.

%package        places-menu
Summary:        Places menu indicator in the system status area
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    places-menu
Adds a menu in the system status area that resembles the Places menu from
GNOME 2.x

%package        native-window-placement
Summary:        Arrange windows in overview in a more native way
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    native-window-placement
This extension employs an algorithm (taken from KDE) for layouting the
thumbnails in the overview that more closely reflects the positions and relative
sizes of the actual windows, instead of using a fixed grid.

%package        workspace-indicator
Summary:        Workspace indicator in the system status area
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    workspace-indicator
Adds a workspace indicator in the system status area.

%package        apps-menu
Summary:        Application menu in the system status area
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    apps-menu
Adds an application menu in top bar

%package        xrandr-indicator
Summary:        Xrandr indicator in the system statys area
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    xrandr-indicator
Replace the GTK+ based indicator from gnome-settings-daemon with
a native one. Lets the user rotate the laptop monitor and open
display preferences quickly.

%package        systemMonitor
Summary:        Monitor your system status
Group:          User Interface/Desktops
License:        GPLv2+ 
Requires:       %{name}-common = %{version}-%{release}

%description    systemMonitor
An message tray indicator showing CPU and memory loads.

%prep
%setup -q
%patch0 -p1 -b .dock
%patch1 -p1 -b .revert_locale

# make g-s-e work with g-s 3.1.91.1
#sed -i "s|3.1.91|3.2.0|g" configure.ac

%build
# update ja.po
cp %{SOURCE1} po/ja.po
# since we build from a git checkout
[ -x autogen.sh ] && NOCONFIGURE=1 ./autogen.sh 

# TODO: once libgtop2 >= 2.28.4 is available, enable systemMonitor extension
# TODO: once gjs >= 0.7.15 is available, enable xrand-indicator extension
%configure \
  --enable-extensions="alternate-tab \
                       alternative-status-menu \
                       apps-menu \
                       dock \
		       windowsNavigator \
		       user-theme \
		       auto-move-windows \
		       drive-menu \
		       places-menu \
		       native-window-placement \
		       workspace-indicator \
		       xrandr-indicator
		       systemMonitor"
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%find_lang %{name}

%files common -f %{name}.lang
%defattr(-,root,root,-)
%doc README
%dir %{_datadir}/gnome-shell/extensions/

%files alternate-tab
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/alternate-tab*

%files alternative-status-menu
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/alternative-status-menu*

%files dock
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/dock*

%files windowsNavigator
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/windowsNavigator*

%files user-theme
%defattr(-,root,root,-)
%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.user-theme.gschema.xml
%{_datadir}/gnome-shell/extensions/user-theme*

%files auto-move-windows
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/auto-move-windows*

%files drive-menu
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/drive-menu*

%files places-menu
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/places-menu*

%files places-menu
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/places-menu*

%files auto-move-windows
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/auto-move-windows*

%files native-window-placement
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/native-window-placement*

%files workspace-indicator
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/workspace-indicator*

%files apps-menu
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/apps-menu*

%files xrandr-indicator
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/xrandr-indicator*

%files systemMonitor
%defattr(-,root,root,-)
%{_datadir}/gnome-shell/extensions/systemMonitor*

%posttrans user-theme
glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas || :

%postun user-theme
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :


%changelog
* Tue Jan 03 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.3-1
- update to 3.2.3
- remove old Patches
- add Patch0 (gnome-shell-extensions-3.2.3-dock.patch)
- add Patch1 (gnome-shell-extensions-3.2.3-revert-reference-to-localedir.patch)
- add Source1 (gnome-shell-extensions.gnome-3-2.20111216.ja.po)

* Sat Nov 26 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- update to 3.2.1
- add Patch0 (gnome-shell-extensions-git20111119.patch)
- add Patch1 (gnome-shell-extensions-3.2.1-alternative-status-menu.patch)

* Tue Oct 04 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.0-1
- update to 3.2.0

* Fri Sep 30 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.4-5
- rebuild with gnome-shell-3.2.0

* Mon Sep 19 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.4-4
- update Patch0 (gnome-shell-extensions-3.1.4-git20110908.patch)
- add BuildRequires:  gnome-desktop3-devel, libgtop2-devel

* Tue Sep 06 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.4-3
- update to 3.1.90 from git master (patch0)
- add xrandr-indicator, systemMonitor
- R: gnome-shell >= 3.1.90

* Sun Sep 04 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.4-2
- add Patch0 to update git master
- add workspace-indicator, apps-menu

* Wed Aug 17 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.4-1
- initial build for Vine Linux

