/[gentoo-x86]/net-misc/strongswan/strongswan-4.2.17.ebuild
Gentoo

Contents of /net-misc/strongswan/strongswan-4.2.17.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Apr 2 15:39:54 2010 UTC (9 years, 8 months ago) by yngwin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
  Remove 'nat' useflag as it is misleading and replace it with an
  appropriate 'nat-transport' flag and warn users about it. Fix dependency on
  openssl[-bindist] wrt bug #311981. Thanks to Thomas Klute for reporting this.
  Overhaul of package/useflag descriptions. Drop built_with_use again
  (deprecated) which I introduced in the latest revision. Addition of several
  new warnings/logs that will hopefully help the user. Drop old (and
  unsupported by proxy maintainer) ebuilds. Update metadata.xml.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/strongswan-4.2.17.ebuild,v 1.1 2009/07/29 08:33:36 wschlich Exp $
4
5 EAPI=2
6 inherit eutils linux-info autotools
7
8 UGID="ipsec"
9
10 DESCRIPTION="Open Source implementation of IPsec for the Linux operating system."
11 HOMEPAGE="http://www.strongswan.org/"
12 SRC_URI="http://download.strongswan.org/${P}.tar.bz2"
13
14 LICENSE="GPL-2 RSA-MD2 RSA-MD5 RSA-PKCS11 DES"
15 SLOT="0"
16 KEYWORDS="~ppc ~sparc ~x86 ~amd64"
17 IUSE="caps cisco curl debug ldap nat smartcard static xml"
18
19 COMMON_DEPEND="!net-misc/openswan
20 dev-libs/gmp
21 caps? ( sys-libs/libcap )
22 curl? ( net-misc/curl )
23 ldap? ( net-nds/openldap )
24 smartcard? ( dev-libs/opensc )
25 xml? ( dev-libs/libxml2 )"
26 DEPEND="${COMMON_DEPEND}
27 virtual/linux-sources
28 sys-kernel/linux-headers"
29 RDEPEND="${COMMON_DEPEND}
30 virtual/logger
31 sys-apps/iproute2"
32
33 src_prepare() {
34 sed -i -e 's/getline/getline_own/g' src/libfreeswan/optionsfrom.c
35
36 epatch "${FILESDIR}"/${PN}-4.2.7-install.patch
37 eautoreconf
38 }
39
40 pkg_setup() {
41 linux-info_pkg_setup
42
43 einfo "Linux kernel is version ${KV_FULL}"
44
45 if kernel_is 2 6; then
46 einfo "This ebuild will set ${P} to use 2.6 native IPsec (KAME)."
47 else
48 eerror "Sorry, no support for your kernel version ${KV_FULL}."
49 die "Install an IPsec enabled 2.6 kernel."
50 fi
51
52 # change to an unprivileged user by default
53 enewgroup ${UGID}
54 enewuser ${UGID} -1 -1 -1 ${UGID}
55 }
56
57 src_configure() {
58 local myconf=""
59
60 # change to an unprivileged user by default
61 myconf="${myconf} --with-user=${UGID} --with-group=${UGID}"
62 # strongswan enables both by default; switch to the user's wish
63 if use static; then
64 myconf="${myconf} --enable-static --disable-shared"
65 else
66 myconf="${myconf} --disable-static --enable-shared"
67 fi
68
69 # TODO: Review new configure options such as networkmanager
70 econf \
71 $(use_with caps capabilities libcap) \
72 $(use_enable curl) \
73 $(use_enable ldap) \
74 $(use_enable xml smp) \
75 $(use_enable smartcard) \
76 $(use_enable cisco cisco-quirks) \
77 $(use_enable debug leak-detective) \
78 $(use_enable nat nat-transport) \
79 ${myconf} \
80 || die "econf failed"
81 }
82
83 src_install() {
84 einstall || die "einstall failed."
85
86 doinitd "${FILESDIR}"/ipsec
87
88 fowners ipsec:ipsec /etc/ipsec.conf
89 }
90
91 pkg_postinst() {
92 echo
93 einfo "For your own security we install strongSwan without superuser"
94 einfo "privileges. If you use iptables, you might want to change that"
95 einfo "setting. See http://wiki.strongswan.org/wiki/nonRoot for more"
96 einfo "information."
97 # TODO: Should we recommend this sudoers line to users?
98 # %ipsec ALL = NOPASSWD: /sbin/iptables
99 echo
100 einfo "The up-to-date configuration manual is available online at"
101 einfo "http://www.strongswan.org/docs/readme42.htm"
102 echo
103 }

  ViewVC Help
Powered by ViewVC 1.1.20