# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="OpenVPN-Admin is a GUI for OpenVPN" HOMEPAGE="http://sourceforge.net/projects/openvpnadmin/" SRC_URI="mirror://sourceforge/openvpnadmin/openvpn-admin-${PV}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~x86" IUSE="sudo" DEPEND="net-misc/openvpn dev-lang/mono >=dev-dotnet/glade-sharp-2.3.91 >=dev-dotnet/gtk-sharp-2.3.91" RDEPEND="sudo? app-admin/sudo" src_compile() { econf || die "econf failed" MONO_SHARED_DIR="${WORKDIR}/../temp" emake || die "emake failed" } src_install() { make DESTDIR=${D} install || die keepdir /var/log/openvpn if use sudo; then sed -i 's/Exec=/Exec=\/usr\/bin\/sudo /' ${D}/usr/share/applications/openvpn-admin.desktop fi dodoc AUTHORS ChangeLog NEWS README TODO } pkg_postinst() { einfo "OpenVPN-Admin must run with root privledges in order to start openvpn." einfo "You may 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." }