# Template file for 'gksu'
pkgname=gksu
version=2.0.2
revision=2
distfiles="http://people.debian.org/~kov/gksu/$pkgname-$version.tar.gz"
build_style=gnu_configure
configure_args="--disable-gtk-doc --localstatedir=/var"
short_desc="GTK+ frontend to su and sudo commands"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=a1de3dca039d88c195fcdc9516379439a1d699750417f1e655aa2101a955ee5a
long_desc="
 gksu is a Gtk+ frontend to /bin/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."
 
Add_dependency run glibc
Add_dependency run libgksu
Add_dependency run startup-notification
Add_dependency run libgnome-keyring
Add_dependency run GConf
Add_dependency run nautilus
Add_dependency run libpng
Add_dependency run gdk-pixbuf
Add_dependency run gtk+
Add_dependency run atk
Add_dependency run glib
Add_dependency run pango
Add_dependency run cairo
Add_dependency run freetype
Add_dependency run fontconfig

Add_dependency build pkg-config
Add_dependency build intltool
Add_dependency build libgksu-devel
Add_dependency build startup-notification-devel
Add_dependency build libgnome-keyring-devel
Add_dependency build GConf-devel
Add_dependency build nautilus-devel
Add_dependency build gtk+-devel
Add_dependency build atk-devel
Add_dependency build glib-devel
Add_dependency build pango-devel
Add_dependency build cairo-devel
Add_dependency build freetype-devel
Add_dependency build fontconfig-devel

Add_dependency full sudo
Add_dependency full desktop-file-utils

post_install()
{
	rm -vf ${DESTDIR}/usr/lib/nautilus/extensions-2.0/*.a
	sed -i -e "s|/usr/bin/x-terminal-emulator|-l gnome-terminal|g" \
		${DESTDIR}/usr/share/applications/gksu.desktop
	echo "TryExec=gnome-terminal" >> \
		${DESTDIR}/usr/share/applications/gksu.desktop
	chmod 644 ${DESTDIR}/usr/share/applications/gksu.desktop
}
