/[gentoo-x86]/net-misc/openconnect/openconnect-5.01.ebuild
Gentoo

Contents of /net-misc/openconnect/openconnect-5.01.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Mon Apr 27 19:01:33 2015 UTC (4 years, 7 months ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Use krb5 virtual, bug 547556. Remove old.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)

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/openconnect/openconnect-5.01.ebuild,v 1.6 2015/04/08 18:04:50 mgorny Exp $
4
5 EAPI="5"
6
7 PYTHON_COMPAT=( python2_7 )
8 PYTHON_REQ_USE="xml"
9
10 inherit eutils linux-info python-any-r1
11
12 DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software"
13 HOMEPAGE="http://www.infradead.org/openconnect.html"
14 # New versions of openconnect-script can be found here:
15 # http://git.infradead.org/users/dwmw2/vpnc-scripts.git/history/HEAD:/vpnc-script
16 SRC_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz
17 http://dev.gentoo.org/~hwoarang/distfiles/openconnect-script-20121108205904.tar.gz"
18
19 LICENSE="LGPL-2.1 GPL-2"
20 SLOT="0/2"
21 KEYWORDS="~amd64 ~ppc64 ~x86"
22 IUSE="doc +gnutls libproxy nls static-libs"
23 ILINGUAS="ar as ast bg bg_BG bn bn_IN bs ca ca@valencia cs da de el en_GB en_US eo es es_CR
24 es_MX et eu fa fi fr gd gl gu he hi hi_IN hu id it ja km kn ko ku lo lt lv ml mr
25 ms nb nl nn no or pa pl pt pt_BR pt_PT ro ru sk sl sq sr sr@latin sv ta te
26 tg th tl tr ug uk ur_PK vi vi_VN wa zh_CN zh_HK zh_TW"
27 for lang in $ILINGUAS; do
28 IUSE="${IUSE} linguas_${lang}"
29 done
30
31 DEPEND="dev-libs/libxml2
32 sys-libs/zlib
33 !gnutls? (
34 || (
35 >=dev-libs/openssl-1.0.1f:0[static-libs?]
36 (
37 >=dev-libs/openssl-1.0.1:0[static-libs?]
38 <dev-libs/openssl-1.0.1d:0[static-libs?]
39 )
40 <dev-libs/openssl-1.0.0k:0[static-libs?]
41 )
42 )
43 gnutls? (
44 || (
45 ( >=net-libs/gnutls-3[static-libs?] dev-libs/nettle )
46 ( =net-libs/gnutls-2.12*[nettle,static-libs?] dev-libs/nettle )
47 ( =net-libs/gnutls-2.12*[-nettle,static-libs?] dev-libs/libgcrypt:0[static-libs?] )
48 )
49 app-misc/ca-certificates
50 )
51 libproxy? ( net-libs/libproxy )
52 nls? ( virtual/libintl )"
53 RDEPEND="${DEPEND}
54 sys-apps/iproute2"
55 DEPEND="${DEPEND}
56 virtual/pkgconfig
57 doc? ( ${PYTHON_DEPS} )
58 nls? ( sys-devel/gettext )"
59
60 tun_tap_check() {
61 ebegin "Checking for TUN/TAP support"
62 if { ! linux_chkconfig_present TUN; }; then
63 eerror "Please enable TUN/TAP support in your kernel config, found at:"
64 eerror
65 eerror " Device Drivers --->"
66 eerror " [*] Network device support --->"
67 eerror " <*> Universal TUN/TAP device driver support"
68 eerror
69 eerror "and recompile your kernel ..."
70 die "no CONFIG_TUN support detected!"
71 fi
72 eend $?
73 }
74
75 pkg_setup() {
76 if use doc; then
77 python-any-r1_pkg_setup
78 fi
79
80 if use kernel_linux; then
81 get_version
82 if linux_config_exists; then
83 tun_tap_check
84 else
85 ewarn "Was unable to determine your kernel .config"
86 ewarn "Please note that OpenConnect requires CONFIG_TUN to be set in your"
87 ewarn "kernel .config, Without it, it will not work correctly."
88 # We don't die here, so it's possible to compile this package without
89 # kernel sources available. Required for cross-compilation.
90 fi
91 fi
92 }
93
94 src_configure() {
95 strip-linguas $ILINGUAS
96 echo ${LINGUAS} > po/LINGUAS
97 # Override vpn-script test since the build system violates the sandbox and
98 # needs the path set to the real default path after it's installed
99 sed -e "s#-x \"\$with_vpnc_script\"#-n \"${WORKDIR}/openconnect-script\"#" \
100 -i configure || die
101 if ! use doc; then
102 # If the python cannot be found, the docs will not build
103 sed -e 's#"${ac_cv_path_PYTHON}"#""#' -i configure || die
104 fi
105
106 # stoken and liboath not in portage
107 econf \
108 --with-vpnc-script=/etc/openconnect/openconnect.sh \
109 $(use_enable static-libs static) \
110 $(use_enable nls ) \
111 $(use_with !gnutls openssl) \
112 $(use_with gnutls ) \
113 $(use_with libproxy) \
114 --without-stoken \
115 --without-liboath
116 }
117
118 src_install() {
119 emake DESTDIR="${D}" install
120
121 dodoc AUTHORS TODO
122 newinitd "${FILESDIR}"/openconnect.init.in-r1 openconnect
123 dodir /etc/openconnect
124 insinto /etc/openconnect
125 newconfd "${FILESDIR}"/openconnect.conf.in openconnect
126 exeinto /etc/openconnect
127 newexe "${WORKDIR}"/openconnect-script openconnect.sh
128 insinto /etc/logrotate.d
129 newins "${FILESDIR}"/openconnect.logrotate openconnect
130 keepdir /var/log/openconnect
131
132 # Remove useless .la files
133 find "${D}" -name '*.la' -delete || die "la file removal failed"
134 }
135
136 pkg_postinst() {
137 elog "The init script for openconnect has changed and now supports multiple vpn tunnels."
138 elog
139 elog "You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d"
140 elog "instead of calling it directly:"
141 elog
142 elog "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
143 elog
144 elog "You can then start the vpn tunnel like this:"
145 elog
146 elog "/etc/init.d/openconnect.vpn0 start"
147 elog
148 elog "If you would like to run preup, postup, predown, and/or postdown scripts,"
149 elog "You need to create a directory in /etc/openconnect with the name of the vpn:"
150 elog
151 elog "mkdir /etc/openconnect/vpn0"
152 elog
153 elog "Then add executable shell files:"
154 elog
155 elog "mkdir /etc/openconnect/vpn0"
156 elog "cd /etc/openconnect/vpn0"
157 elog "echo '#!/bin/sh' > preup.sh"
158 elog "cp preup.sh predown.sh"
159 elog "cp preup.sh postup.sh"
160 elog "cp preup.sh postdown.sh"
161 elog "chmod 755 /etc/openconnect/vpn0/*"
162 }

  ViewVC Help
Powered by ViewVC 1.1.20