# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils mono DESCRIPTION="OpenVPN-Admin is a GUI for OpenVPN" HOMEPAGE="http://sourceforge.net/projects/openvpnadmin/" SRC_URI="mirror://sourceforge/${PN}/${P}-2.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~x86" IUSE="gnome kde sudo" RDEPEND="net-misc/openvpn dev-lang/mono >=dev-dotnet/glade-sharp-2.3.91 >=dev-dotnet/gtk-sharp-2.3.91 x11-libs/gksu kde? ( kde-base/kdelibs ) sudo? ( app-admin/sudo )" DEPEND="${RDEPEND}" src_unpack() { unpack ${A} cd ${S} if use kde; then sed -i 's/Exec=/Exec=kdesu -t -d --nonewdcop -u root -caption "OpenVPN Admin" -c /' openvpn-admin.desktop elif use sudo; then sed -i 's/Exec=/Exec=\/usr\/bin\/sudo /' openvpn-admin.desktop fi } src_install() { make DESTDIR=${D} install || die "make install failed" dodoc AUTHORS ChangeLog NEWS README TODO keepdir /var/log/openvpn } pkg_postinst() { einfo "OpenVPN-Admin must run with root privledges in order to start openvpn." einfo "" einfo "If the kde USE flag is enabled you will be prompted to enter the" einfo "root password when launching OpenVPN-Admin from the application menu." einfo "" einfo "You may also use sudo (USE=sudo) to allow a user or group to run it." einfo "The below allows users in the wheel group to run OpenVPN-Admin." einfo "Place these lines in /etc/sudoers :" einfo "" einfo "Defaults:%wheel !env_reset" einfo "%wheel ALL=NOPASSWD: /usr/sbin/openvpn-admin" einfo "" ewarn "YOU are responsible for understanding the security implications of sudo." einfo "" einfo "Please note that at this time the /etc/init.d/openvpn scripts are not" einfo "used by this program." einfo "" ewarn "OpenVPN-Admin does not work with passphrase protected keys." }