diff options
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/vpnc/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/vpnc/files/vpnc-tmpfiles.conf | 1 | ||||
-rw-r--r-- | net-misc/vpnc/files/vpnc.service | 21 | ||||
-rw-r--r-- | net-misc/vpnc/vpnc-0.5.3_p527-r1.ebuild | 72 |
4 files changed, 101 insertions, 1 deletions
diff --git a/net-misc/vpnc/ChangeLog b/net-misc/vpnc/ChangeLog index df3fde13a428..50d7789a27bc 100644 --- a/net-misc/vpnc/ChangeLog +++ b/net-misc/vpnc/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/vpnc # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/ChangeLog,v 1.116 2013/06/05 14:38:11 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/ChangeLog,v 1.117 2013/08/07 20:20:46 jlec Exp $ + +*vpnc-0.5.3_p527-r1 (07 Aug 2013) + + 07 Aug 2013; Justin Lecher <jlec@gentoo.org> +vpnc-0.5.3_p527-r1.ebuild, + +files/vpnc.service, +files/vpnc-tmpfiles.conf: + Add systemD support, #479354 05 Jun 2013; Justin Lecher <jlec@gentoo.org> vpnc-0.5.3_p527.ebuild: Drop USE=-caps restriction for libgcrypt as it was removed, #472392; this diff --git a/net-misc/vpnc/files/vpnc-tmpfiles.conf b/net-misc/vpnc/files/vpnc-tmpfiles.conf new file mode 100644 index 000000000000..67224ac3ef2d --- /dev/null +++ b/net-misc/vpnc/files/vpnc-tmpfiles.conf @@ -0,0 +1 @@ +D /run/vpnc 0755 root root - diff --git a/net-misc/vpnc/files/vpnc.service b/net-misc/vpnc/files/vpnc.service new file mode 100644 index 000000000000..afd6caae68f0 --- /dev/null +++ b/net-misc/vpnc/files/vpnc.service @@ -0,0 +1,21 @@ +[Unit] +Description=Free Cisco VPN connection to %i +Documentation=man:vpnc(8) http://www.unix-ag.uni-kl.de/~massar/vpnc/ +Requires=network.target +After=network.target +ConditionPathExists=/dev/net/tun + +[Service] +Type=forking +EnvironmentFile=/etc/vpnc/%i.conf +PIDFile=/run/vpnc/%i.pid + +ExecPreStart=/etc/vpnc/scripts.d/%i-preup.sh +ExecStart=/usr/sbin/vpnc --pid-file /run/vpnc/%i.pid +ExecPostStart=/etc/vpnc/scripts.d/%i-postup.sh + +ExecPreStop=/etc/vpnc/scripts.d/%i-predown.sh +ExecPostStop=/etc/vpnc/scripts.d/%i-postdown.sh + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/vpnc/vpnc-0.5.3_p527-r1.ebuild b/net-misc/vpnc/vpnc-0.5.3_p527-r1.ebuild new file mode 100644 index 000000000000..d39174d060a9 --- /dev/null +++ b/net-misc/vpnc/vpnc-0.5.3_p527-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/vpnc-0.5.3_p527-r1.ebuild,v 1.1 2013/08/07 20:20:46 jlec Exp $ + +EAPI=5 + +inherit eutils linux-info systemd toolchain-funcs + +DESCRIPTION="Free client for Cisco VPN routing software" +HOMEPAGE="http://www.unix-ag.uni-kl.de/~massar/vpnc/" +SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz" + +LICENSE="GPL-2 BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" +IUSE="resolvconf +gnutls bindist" + +REQUIRED_USE="bindist? ( gnutls )" + +DEPEND=" + dev-lang/perl + dev-libs/libgcrypt + >=sys-apps/iproute2-2.6.19.20061214[-minimal] + gnutls? ( net-libs/gnutls ) + !gnutls? ( dev-libs/openssl )" +RDEPEND="${DEPEND} + resolvconf? ( net-dns/openresolv )" + +CONFIG_CHECK="~TUN" + +src_prepare() { + if ! use gnutls && ! use bindist; then + sed -i -e '/^#OPENSSL_GPL_VIOLATION/s:#::g' "${S}"/Makefile || die + ewarn "Building SSL support with OpenSSL instead of GnuTLS. This means that" + ewarn "you are not allowed to re-distibute the binaries due to conflicts between BSD license and GPL," + ewarn "see the vpnc Makefile and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440318" + else + elog "Will build with GnuTLS (default) instead of OpenSSL so you may even redistribute binaries." + elog "See the Makefile itself and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440318" + fi + + epatch "${FILESDIR}"/${PN}-0.5.3_p514-as-needed.patch + + sed -e 's:test/cert0.pem::g' -i Makefile || die + + tc-export CC + + sed \ + -e 's:/var/run:/run:g' \ + -i ChangeLog config.c TODO || die +} + +src_install() { + emake PREFIX="/usr" DESTDIR="${D}" install + dodoc README TODO VERSION + keepdir /etc/vpnc/scripts.d + newinitd "${FILESDIR}/vpnc-3.init" vpnc + newconfd "${FILESDIR}/vpnc.confd" vpnc + sed -e "s:/usr/local:/usr:" -i "${D}"/etc/vpnc/vpnc-script || die + + systemd_dotmpfilesd "${FILESDIR}"/vpnc-tmpfiles.conf + systemd_newunit "${FILESDIR}"/vpnc.service vpnc@.service + + # COPYING file resides here, should not be installed + rm -rf "${ED}"/usr/share/doc/vpnc/ || die +} + +pkg_postinst() { + elog "You can generate a configuration file from the original Cisco profiles of your" + elog "connection by using /usr/bin/pcf2vpnc to convert the .pcf file" + elog "A guide is available in http://www.gentoo.org/doc/en/vpnc-howto.xml" +} |