libgksu-2.0.7-2kkr2009.0.spec

%define name libgksu
%define version 2.0.7
%define release %mkrel 2

%define fakename gksu2.0

%define major 0
%define libname %mklibname %{fakename}_ %major
%define libnamedev %mklibname %{fakename}_ %major -d

Name: %{name}
Summary: GKSu libraries
Version: %{version}
Release: %{release}
Source: http://people.debian.org/~kov/gksu/libgksu/%{name}-%{version}.tar.gz
Url: http://www.nongnu.org/gksu/
Group: System/Libraries
BuildRoot: %{_tmppath}/%{name}-buildroot
License: GPL
BuildRequires: glib2-devel
BuildRequires: gtk-doc
BuildRequires: libgtop2.0-devel
BuildRequires: startup-notification-devel
BuildRequires: gnome-keyring-devel
BuildRequires: libGConf2-devel
BuildRequires: gtk+2-devel
BuildRequires: libglade2.0-devel
BuildRequires: perl-XML-Parser
BuildRequires: desktop-file-utils
BuildRequires: dbus-glib-devel
Provides: libgksu
Provides: libgksu2
Obsoletes: libgksu1.2

%description
GKSu is a library that provides a Gtk+ frontend to su and sudo. 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 %libname
Summary: GKSu libraries
Group: System/Libraries

%description -n %libname
GKSu is a library that provides a Gtk+ frontend to su and sudo. 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 %libnamedev
Summary: Development package for %{name}
Group: Development/Other
Requires: %libname = %version
Provides: libgksu2.0-devel = %version-%release
Provides: libgksu2-devel = %version-%release
Provides: libgksu-devel
Obsoletes: libgksu1.2-devel

%description -n %libnamedev
Development package for %{name}

GKSu is a library that provides a Gtk+ frontend to su and sudo. 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 gksu-utils
Summary: Utilities package for %{name}
Group: System/Base
Requires: %libname = %version

%description -n gksu-utils
Utilities package for %{name}

GKSu is a library that provides a Gtk+ frontend to su and sudo. 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.

%prep
%setup -q 
%{__sed} -i 's:\(gchar auxcommand\[\] = PREFIX "/\)lib\(/" PACKAGE "/gksu-run-helper";\):\1%{_lib}\2:' libgksu/libgksu.c

%configure2_5x

%build

%make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall_std

desktop-file-install --vendor="" \
  --remove-category="Application" \
  --remove-category="AdvancedSettings" \
  --add-category="Settings" \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/*

%find_lang %name

%clean
rm -rf $RPM_BUILD_ROOT

%if %mdkversion < 200900
%post -n %libname -p /sbin/ldconfig
%endif
%if %mdkversion < 200900
%postun -n %libname -p /sbin/ldconfig
%endif

%post -n gksu-utils
%post_install_gconf_schemas gksu

%preun -n gksu-utils
%preun_uninstall_gconf_schemas gksu

%files -n %libname -f %name.lang
%defattr(-,root,root)
%{_libdir}/*.so.%{major}*
%_libdir/%name

%files -n %libnamedev
%defattr(-,root,root)
%doc INSTALL ChangeLog AUTHORS
%{_libdir}/lib*.a
%{_libdir}/*.so
%attr(644,root,root) %{_libdir}/lib*.la
%{_includedir}/*
%_libdir/pkgconfig/*
%_datadir/gtk-doc/html/%name

%files -n gksu-utils
%{_sysconfdir}/gconf/schemas/gksu.schemas
%{_bindir}/gksu-properties
%{_datadir}/applications/gksu-properties.desktop
%{_datadir}/libgksu/gksu-properties.glade
%{_datadir}/pixmaps/gksu.png





%changelog
* Wed Dec 24 2008 kakurasan <kakurasan AT gmail DOT com> 2.0.7-2kkr2009.0
- fix helper location problem on x86_64

* Thu Aug 14 2008 Emmanuel Andry <eandry AT mandriva DOT org> 2.0.7-1mdv2009.0
+ Revision: 271961
- BR dbus?\195-glib-devel
- New version

  + Thierry Vignaud <tvignaud AT mandriva DOT com>
    - rebuild
    - kill re-definition of %%buildroot on Pixel's request

  + Pixel <pixel AT mandriva DOT com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

  + Olivier Blin <oblin AT mandriva DOT com>
    - restore BuildRoot

* Tue Jul 03 2007 Emmanuel Andry <eandry AT mandriva DOT org> 2.0.5-1mdv2008.0
+ Revision: 47621
- new version

* Fri Jun 22 2007 Thierry Vignaud <tvignaud AT mandriva DOT com> 2.0.4-2mdv2008.0
+ Revision: 43013
- remove "AdvancedSettings" category from menu
- kill X-MandrivaLinux-System-Configuration-Other
- fix group


* Tue Mar 06 2007 Emmanuel Andry <eandry AT mandriva DOT org> 2.0.4-1mdv2007.0
+ Revision: 134081
- New version 2.0.4
- disable gtk-doc (build problem)

* Tue Feb 20 2007 G旦tz Waschk <waschk AT mandriva DOT org> 2.0.3-5mdv2007.1
+ Revision: 123029
- fix scripts

* Sat Jan 27 2007 Emmanuel Andry <eandry AT mandriva DOT org> 2.0.3-4mdv2007.1
+ Revision: 114416
- xdg menu
  handles gconf schemas

* Sat Jan 06 2007 Emmanuel Andry <eandry AT mandriva DOT org> 2.0.3-3mdv2007.1
+ Revision: 104863
- fix provides

* Sat Jan 06 2007 Emmanuel Andry <eandry AT mandriva DOT org> 2.0.3-2mdv2007.1
+ Revision: 104797
- rebuild

* Sat Jan 06 2007 Emmanuel Andry <eandry AT mandriva DOT org> 2.0.3-1mdv2007.1
+ Revision: 104663
- buildrequires perl-XML-Parser
- buildrequires libglade2.0-devel
- buildrequires libGConf2-devel
  buildrequires gtk+2-devel
- buildrequires startup-notification-devel
  gnome-keyring-devel
- New version 2.0.3
  fix provides
  buildrequires libgtop2.0-devel

  + J辿r担me Soyer <saispo AT mandriva DOT org>
    - Import libgksu