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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Jul 29 08:33:36 2009 UTC (10 years, 4 months ago) by wschlich
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
version bumps fixing bug #279319, removed old versions
(Portage version: 2.2_rc33/cvs/Linux i686)

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.8.ebuild,v 1.2 2009/06/23 12:53:15 keytoaster Exp $
4
5 inherit eutils linux-info autotools
6
7 UGID="ipsec"
8
9 DESCRIPTION="Open Source implementation of IPsec for the Linux operating system."
10 HOMEPAGE="http://www.strongswan.org/"
11 SRC_URI="http://download.strongswan.org/${P}.tar.bz2"
12
13 LICENSE="GPL-2 RSA-MD2 RSA-MD5 RSA-PKCS11 DES"
14 SLOT="0"
15 KEYWORDS="~ppc ~sparc ~x86 ~amd64"
16 IUSE="cisco curl debug ldap nat smartcard static xml"
17
18 COMMON_DEPEND="!net-misc/openswan
19 dev-libs/gmp"
20 DEPEND="${COMMON_DEPEND}
21 virtual/linux-sources
22 sys-kernel/linux-headers
23 curl? ( net-misc/curl )
24 ldap? ( net-nds/openldap )
25 smartcard? ( dev-libs/opensc )
26 xml? ( dev-libs/libxml2 )"
27 RDEPEND="${COMMON_DEPEND}
28 virtual/logger
29 sys-apps/iproute2"
30
31 src_unpack() {
32 unpack ${A}
33 cd "${S}"
34
35 sed -i -e 's/getline/getline_own/g' src/libfreeswan/optionsfrom.c
36
37 epatch "${FILESDIR}"/${PN}-4.2.7-install.patch
38 eautoreconf
39 }
40
41 pkg_setup() {
42 linux-info_pkg_setup
43
44 einfo "Linux kernel is version ${KV_FULL}"
45
46 if kernel_is 2 6; then
47 einfo "This ebuild will set ${P} to use 2.6 native IPsec (KAME)."
48 else
49 eerror "Sorry, no support for your kernel version ${KV_FULL}."
50 die "Install an IPsec enabled 2.6 kernel."
51 fi
52
53 # change to an unprivileged user by default
54 enewgroup ${UGID}
55 enewuser ${UGID} -1 -1 -1 ${UGID}
56 }
57
58 src_compile() {
59 local myconf=""
60
61 # change to an unprivileged user by default
62 #myconf="${myconf} --with-user=${UGID} --with-group=${UGID}"
63 # strongswan enables both by default; switch to the user's wish
64 if use static; then
65 myconf="${myconf} --enable-static --disable-shared"
66 else
67 myconf="${myconf} --disable-static --enable-shared"
68 fi
69
70 econf \
71 $(use_enable curl http) \
72 $(use_enable ldap) \
73 $(use_enable xml) \
74 $(use_enable smartcard) \
75 $(use_enable cisco cisco-quirks) \
76 $(use_enable debug leak-detective) \
77 $(use_enable nat nat-transport) \
78 ${myconf} \
79 || die "econf failed"
80
81 emake || die "emake failed"
82 }
83
84 src_install() {
85 einstall || die "einstall failed."
86
87 doinitd "${FILESDIR}"/ipsec
88
89 fowners ipsec:ipsec /etc/ipsec.conf
90 }
91
92 pkg_postinst() {
93 echo
94 ewarn "Starting with the strongswan-4 branch, the configuration files"
95 ewarn "will be installed into the default directory \"/etc/\""
96 ewarn "instead of the Gentoo-specific directory \"/etc/ipsec/\"."
97 ewarn "Please adjust your configuration!"
98 echo
99 einfo "For your own security we install strongSwan without superuser"
100 einfo "privileges. If you use iptables, you might want to change that"
101 einfo "setting. See http://wiki.strongswan.org/wiki/nonRoot for more"
102 einfo "information."
103 echo
104 einfo "The up-to-date configuration manual is available online at"
105 einfo "http://www.strongswan.org/docs/readme.htm"
106 echo
107 }

  ViewVC Help
Powered by ViewVC 1.1.20