Summary: 	GKsu is a GTK+ frontend to the su and sudo programs.
Summary(ja):	su および sudo プログラムの gtk+ フロントエンド
Name:	 	gksu
Version: 	2.0.2
Release:        5%{?_dist_release}

License: 	GPLv2
Group: 	 	Applications/System
URL:		http://www.nongnu.org/gksu/

Source:  	%{name}-%{version}.tar.gz
Patch0:		%{name}-2.0.2-glib.patch
Patch1:		%{name}-2.0.2-nautilus-3.x.patch
Patch20:	%{name}-2.0.2-vine.patch

BuildRoot: 	%{_tmppath}/%{name}-%{version}-root
BuildRequires: 	gettext pkgconfig gtk2-devel bison autoconf
BuildRequires:	libgksu-devel >= 2.0.9-1
BuildRequires:	GConf2-devel
BuildRequires:	gtk-doc, perl-XML-Parser
BuildRequires:	gcr-devel
BuildRequires:	nautilus-devel
BuildRequires:	desktop-file-utils
BuildRequires:  intltool, autoconf, automake

Vendor:         Project Vine
Distribution:   Vine Linux
Packager:	daisuke

%description
gksu is a Gtk+ frontend to /bin/su. It supports login shells and preserving
environment when acting as a su frontend. It is useful to menu items or
other graphical programs that need to ask a user's password to run another
program as another user.

%package -n nautilus-gksu
Summary:	gksu extensions for Nautilus
Summary(ja):	Nautilus 用 gksu 拡張
Group:		User Interface/Desktops

Requires:	%{name} = %{version}-%{release}
Requires:	nautilus

%description -n nautilus-gksu
%{summary}


%prep
%setup
%patch0 -p1
%patch1 -p1
%patch20 -p1 -b .vine

%build
intltoolize -f
autoreconf -f -i
%configure --disable-static
make %{?_smp_mflags}

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

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

%find_lang %{name}


%clean
rm -fr $RPM_BUILD_ROOT


%files -f %name.lang
%defattr (-,root,root)
%doc ABOUT-NLS AUTHORS ChangeLog COPYING README
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*.png
%{_datadir}/%{name}
%{_mandir}/man1/*.1.*

%files -n nautilus-gksu
%defattr (-,root,root)
%{_libdir}/nautilus/extensions-3.0/libnautilus-gksu.so

%changelog
* Fri Sep 26 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.0.2-5
- fixed nautilus-gksu Group

* Wed Jul 09 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.2-4
- rebuild for VineSeed environment
- create nautilus-gksu subpackage
- change BuildRequires: gcr-devel instead of gnome-keyring-devel
- add Patch0 (gksu-2.0.2-glib.patch)
- add Patch1 (gksu-2.0.2-nautilus-3.x.patch)

* Thu Apr 21 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.2-3
- rebuild for Vine 6

* Wed Jun 24 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.0.2-2
- update Patch20 to exec gnome-terminal -e 'su -' (<BTS:VineLinux:0707>)

* Wed May 27 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.2-1
- new upstream release
- spec in utf-8
- add BR: nautilus-devel instead of nautilus
- add BR: intltool, automake, autoconf

* Wed Aug 15 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.0-0vl1
- new upstream release

* Wed Aug 15 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.7-0vl4
- convert ja.po to UTF-8
- update desktop files
  - fix desktop file to pass desktop-file-validate (<BTS:wishes:0124>)
  - add "-l" option for gksu (<BTS:wishes:0124>)
  - convert gksu*.desktop to UTF-8 (<BTS:509>)

* Tue May 16 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.7-0vl3
- changed Group:
- updated ja.po

* Sun Mar 27 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.7-0vl2
- rebuild with new environment

* Tue Aug 10 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.7-0vl1
- new upstream release
- initial build for Vine Linux based on mandrake package.
- add ja.po

* Wed Nov 19 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.9.18-1mdk
- 0.9.18

* Mon Aug 25 2003 Austin Acton <aacton@yorku.ca> 0.9.15-2mdk
- remove description of sudo functionality (removed)

* Mon Aug 25 2003 Austin Acton <aacton@yorku.ca> 0.9.15-1mdk
- 0.9.15

* Sun May 11 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.9.9-1mdk
- 0.9.9

* Fri Apr 25 2003 Austin Acton <aacton@yorku.ca> 0.9.8-2mdk
- buildrequires autoconf2.5
- add clean section

* Wed Apr 9 2003 Austin Acton <aacton@yorku.ca> 0.9.8-1mdk
- 0.9.8

* Tue Apr 01 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.9.7-1mdk
- 0.9.7

* Mon Mar 24 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.9.1-2mdk
- url

* Wed Feb 19 2003 Austin Acton <aacton@yorku.ca> 0.9.1-1mdk
- 0.9.1
- add man pages

* Wed Jan 29 2003 Austin Acton <aacton@yorku.ca> 0.9.0-1mdk
- initial package
