/[gentoo-x86]/net-misc/vpnc/vpnc-0.5.3_p550.ebuild
Gentoo

Contents of /net-misc/vpnc/vpnc-0.5.3_p550.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Feb 27 08:05:58 2015 UTC (4 years, 11 months ago) by jlec
Branch: MAIN
Restrict binary distribution with USE=-bindist, #541450; bump to latest svn snapshot

(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)

1 jlec 1.1 # Copyright 1999-2015 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/vpnc-0.5.3_p527-r1.ebuild,v 1.13 2015/01/05 12:55:51 jlec Exp $
4    
5     EAPI=5
6    
7     inherit eutils linux-info systemd toolchain-funcs
8    
9     DESCRIPTION="Free client for Cisco VPN routing software"
10     HOMEPAGE="http://www.unix-ag.uni-kl.de/~massar/vpnc/"
11     SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
12    
13     LICENSE="GPL-2 BSD"
14     SLOT="0"
15     KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
16     IUSE="resolvconf +gnutls bindist selinux"
17    
18     REQUIRED_USE="bindist? ( gnutls )"
19    
20     DEPEND="
21     dev-lang/perl
22     dev-libs/libgcrypt:0=
23     >=sys-apps/iproute2-2.6.19.20061214[-minimal]
24     gnutls? ( net-libs/gnutls:= )
25     !gnutls? ( dev-libs/openssl )"
26     RDEPEND="${DEPEND}
27     resolvconf? ( net-dns/openresolv )
28     selinux? ( sec-policy/selinux-vpn )
29     "
30    
31     RESTRICT="!bindist? ( bindist )"
32    
33     CONFIG_CHECK="~TUN"
34    
35     src_prepare() {
36     if ! use gnutls && ! use bindist; then
37     sed -i -e '/^#OPENSSL_GPL_VIOLATION/s:#::g' "${S}"/Makefile || die
38     ewarn "Building SSL support with OpenSSL instead of GnuTLS. This means that"
39     ewarn "you are not allowed to re-distibute the binaries due to conflicts between BSD license and GPL,"
40     ewarn "see the vpnc Makefile and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440318"
41     else
42     elog "Will build with GnuTLS (default) instead of OpenSSL so you may even redistribute binaries."
43     elog "See the Makefile itself and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440318"
44     fi
45    
46     sed -e 's:test/cert0.pem::g' -i Makefile || die
47    
48     tc-export CC
49    
50     sed \
51     -e 's:/var/run:/run:g' \
52     -i ChangeLog config.c TODO || die
53     }
54    
55     src_install() {
56     emake PREFIX="/usr" DESTDIR="${D}" install
57     dodoc README TODO VERSION
58     keepdir /etc/vpnc/scripts.d
59     newinitd "${FILESDIR}/vpnc-3.init" vpnc
60     newconfd "${FILESDIR}/vpnc.confd" vpnc
61     sed -e "s:/usr/local:/usr:" -i "${ED}"/etc/vpnc/vpnc-script || die
62    
63     systemd_dotmpfilesd "${FILESDIR}"/vpnc-tmpfiles.conf
64     systemd_newunit "${FILESDIR}"/vpnc.service vpnc@.service
65    
66     # COPYING file resides here, should not be installed
67     rm -rf "${ED}"/usr/share/doc/vpnc/ || die
68     }
69    
70     pkg_postinst() {
71     elog "You can generate a configuration file from the original Cisco profiles of your"
72     elog "connection by using /usr/bin/pcf2vpnc to convert the .pcf file"
73     elog "A guide is available at https://wiki.gentoo.org/wiki/Vpnc"
74     }

  ViewVC Help
Powered by ViewVC 1.1.20