%define name            @PACKAGE@
%define version         @VERSION@
%define release 1
%define prefix /usr

Summary: Simple keyboard state indicator and switcher for GNOME panel.

Name: %{name}
Version: %{version}
Release: %{release}
Group: X11/Utilities
Copyright: GPL

Url: http://gswitchit.sourceforge.net/

Source: http://gswitchit.sourceforge.net/%{name}-%{version}.tar.gz
Buildroot: /var/tmp/%{name}-%{version}-%{release}-root

%description
GSwitchIt is just a simple keyboard state indicator 
and switcher for GNOME panel. Nothing more. 
There exists wonderful utility for Windows - SwitchIt - 
which controls and shows switching between the different
keyboard layouts. I hope, GSwitchIt eventually will be 
as useful and comfortable for users as its Windows analog.
	  
%prep

%setup -q

%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --sysconfdir=/etc --enable-install-schemas
make

%install
if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi
mkdir -p $RPM_BUILD_ROOT%{prefix}
make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT/etc install-strip

%files
%defattr(-,root,root)
%doc README ChangeLog AUTHORS CREDITS NEWS
%attr(755,root,root) %{prefix}/bin/gswitchit_applet
%attr(755,root,root) %{prefix}/bin/gswitchit-properties_capplet
%{prefix}/share/applets/Utility/gswitchit_applet.desktop
%{prefix}/share/pixmaps/*
%{prefix}/share/control-center/capplets/*
%{prefix}/share/gnome/apps/Settings/*
%{prefix}/man/man1/gswitchit_applet.1.gz
%{prefix}/share/locale/ru/LC_MESSAGES/gswitchit_applet.mo
%{prefix}/share/locale/de/LC_MESSAGES/gswitchit_applet.mo

%config /etc/CORBA/servers/gswitchit_applet.gnorba
%config /etc/gconf/schemas/gswitchit_applet.schemas

%clean
rm -r $RPM_BUILD_ROOT
