# Note that this is NOT a relocatable package
%define backendsver	2.6.0
%define ver      	2.22.0
%define rel		1%{?_dist_release}

Summary:	GNOME System Tools
Summary(ja):	GNOMEシステムツール
Name: 		gnome-system-tools
Version: 	%ver
Release: 	%rel
License: 	LGPL
Group: 		Applications/System

Source:		%{name}-%{version}.tar.bz2
#Source100:	%{name}-2.14.0-ja.po

# patches for vine
#Patch100:	%{name}-2.14.0-wider-window.patch

BuildRoot: 	%{_tmppath}/%{name}-%{version}-root
URL: 		http://www.gnome.org/projects/gst/
Requires:	system-tools-backends >= %{backendsver}
Requires:	usermode
BuildRequires:  PolicyKit-devel >= 0.8
BuildRequires:	liboobs-devel >= 2.21.3
BuildRequires:  nautilus >= 2.22.0

%description
Day-to-day system management on Unix systems is a chore. Even when you're
using a friendly graphical desktop, seemingly basic tasks like setting the
system time, changing the network setup, importing and exporting network
shared filesystems and configuring swap partitions requires editing
configuration files by hand, and the exact procedure varies between different
operating systems and distributions.

The GNOME System Tools solve all these problems, giving you a simple graphical
interface for each task, which uses an advanced backend to edit all the
relevant files and apply your changes. The interface looks and acts in exactly
the same way regardless of what platform you're using.

%prep
%setup -q

#%patch100 -p1 -b .wider

#cp -f po/ja.po po/ja.po.orig
#cp -f %{SOURCE100} po/ja.po

%build
%configure --disable-scrollkeeper
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make DESTDIR=$RPM_BUILD_ROOT install
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

# console-helper
mv %{buildroot}/%{_bindir} %{buildroot}/%{_sbindir}
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_sysconfdir}/security/console.apps
mkdir -p %{buildroot}/%{_sysconfdir}/pam.d

for wrappedapp in boot network services time users shares
do
  ln -sf consolehelper %{buildroot}/%{_bindir}/${wrappedapp}-admin
  cat << EOF > %{buildroot}/%{_sysconfdir}/security/console.apps/${wrappedapp}-admin
USER=root
PROGRAM=/usr/sbin/${wrappedapp}-admin
SESSION=true
EOF
  chmod 644 %{buildroot}/%{_sysconfdir}/security/console.apps/${wrappedapp}-admin
  cat << EOF > %{buildroot}/etc/pam.d/${wrappedapp}-admin
#%PAM-1.0
auth		include		config-util
account		include		config-util
session		include		config-util
EOF
done

# Get rid of stuff we don't want
rm -rf $RPM_BUILD_ROOT%{_libdir}/debug
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/X11

rm -f $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-2.0/*.*a

rm -rf $RPM_BUILD_ROOT%{_localstatedir}/scrollkeeper
rm -rf $RPM_BUILD_ROOT%{_localstatedir}/lib/scrollkeeper

%find_lang %{name}

%clean
rm -rf %{buildroot}

%post
scrollkeeper-update > /dev/null 2>&1 || :
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
SCHEMAS="gnome-system-tools.schemas"
for S in $SCHEMAS; do
  gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S > /dev/null
done


%files -f %{name}.lang
%defattr(-,root,root)
%doc README AUTHORS COPYING HACKING NEWS ChangeLog
%config(noreplace) %{_sysconfdir}/security/console.apps/*
%config(noreplace) %{_sysconfdir}/pam.d/*
%{_bindir}/*
%{_sbindir}/*
%{_sysconfdir}/gconf/schemas/*.schemas
%{_datadir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/gnome/help/*
%{_datadir}/omf/*
%{_datadir}/icons/hicolor/*/*/*
%{_libdir}/nautilus/extensions-2.0/*.so
%{_libdir}/pkgconfig/*


%changelog
* Thu Jul  3 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.22.0-1
- updated to new upstream release
- new versioning policy; spec in UTF-8

* Fri May 11 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.18.1-0vl4
- add BuildRequires: nautilus

* Sun Apr 29 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.1-0vl3
- remove Patch22
- use console-helper instead of gksu

* Sat Apr 28 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.1-0vl2
- add Patch22 from ubuntu to use gksu

* Fri Apr 27 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.1-0vl1
- new upstream release

* Thu Oct 26 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.0-0vl3
- add some services to visible on services-admin
- update ja.po

* Thu Jun 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.0-0vl2
- enable disks-admin
- import Patch10-14 from ubuntu

* Tue Mar 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.0-0vl1
- new upstream release

* Wed Mar 08 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.13.2-0vl1
- new upstream release

* Thu Sep 22 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.0-0vl1
- new upstream release

* Sun Jul 10 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.0.1-0vl1
- new upstream release

* Sat Mar 26 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.0-0vl1
- new upstream release

* Wed Nov 10 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.0-0vl2
- drop consolehelper support. 
  The g-s-t have internal authentication system.

* Wed Nov 10 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.0-0vl1
- new upstream release
- update ja.po
- add shares-admin

* Sat Oct 30 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.0.0-0vl2
- disable boot-admin on ppc (TODO: make boot-admin compatible with ppc)

* Tue Sep 28 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.0-0vl1
- new upstream release
- temporally removed 'default gateway device' combobox from network-admin.
  it generate broken GATEWAYDEV entry.

* Thu Sep 09 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.92.0-0vl2
- drop disks-admin

* Thu Sep 02 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.92.0-0vl1
- new upstream release
- update ja.po
- remove vine patch which is merged in upstream

* Sat Jul 31 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.90.0-0vl1
- new upstream release
- update vine patch

* Mon Jul 26 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.33.0-0vl6
- fixed bogus consolehelper symlinks.

* Sat Jul 24 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.33.0-0vl5
- set "last_version" to (really) disable warning in first run.

* Sun Jul 18 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.33.0-0vl4
- don't show warning in first run.

* Tue Jun 29 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.33.0-0vl3
- update ja.po
- update Patch10 to support Vine Linux more.

* Thu Jun 24 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.33.0-0vl2
- update ja.po
- add Patch10 to fix network-admin problem

* Wed May 19 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.33.0-0vl1
- new upstream release
- s/Copyright/License/

* Sat Jan 31 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.31.1-0vl1
- new upstream release

* Wed Dec 10 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.30.0-0vl1
- new upstream release

* Tue Oct 14 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.28.0-0vl1
- new upstream release

* Thu Sep 11 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.27.0-0vl2
- update ja.po

* Tue Aug 26 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.27.0-0vl1
- new upstream release

* Sat May 31 2003 Tomoya TAKA <taka@vinelinux.org> 0.26.0-0vl2
- add %%defattr into %%file section

* Mon May 26 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.26.0-0vl1
- new upstream release

* Tue May 06 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.25.0-0vl1
- new upstream release

* Sat Feb 22 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.23.0-0vl1
- new upstream release

* Sat Jan 25 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.22.0-0vl1
- initial release
