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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Wed Jan 21 18:15:55 2009 UTC (10 years, 11 months ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
maintainer-needed so I cleaned out the mess so it's easier to pick up in the future.  (bug #227639, bug #226805, and bug #248999)
(Portage version: 2.1.6.4/cvs/Linux 2.6.27.8 i686)

1 pylon 1.1 # Copyright 1999-2008 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 mr_bones_ 1.5 # $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/strongswan-4.1.11.ebuild,v 1.4 2008/08/23 17:59:58 maekke Exp $
4 pylon 1.1
5     inherit eutils linux-info
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 maekke 1.4 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
16 pylon 1.1 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     epatch "${FILESDIR}"/ipsec-install-${PV}.patch
36     }
37    
38     pkg_setup() {
39     linux-info_pkg_setup
40    
41     einfo "Linux kernel is version ${KV_FULL}"
42    
43     if kernel_is 2 6; then
44     einfo "This ebuild will set ${P} to use 2.6 native IPsec (KAME)."
45     else
46     eerror "Sorry, no support for your kernel version ${KV_FULL}."
47     die "Install an IPsec enabled 2.6 kernel."
48     fi
49    
50     # change to an unprivileged user by default
51     enewgroup ${UGID}
52     enewuser ${UGID} -1 -1 -1 ${UGID}
53     }
54    
55     src_compile() {
56     local myconf=""
57    
58     # change to an unprivileged user by default
59     myconf="${myconf} --with-uid=$(id -u ${UGID}) --with-gid=$(id -g ${UGID})"
60     # strongswan enables both by default; switch to the user's wish
61     if use static; then
62     myconf="${myconf} --enable-static --disable-shared"
63     else
64     myconf="${myconf} --disable-static --enable-shared"
65     fi
66    
67     econf \
68     $(use_enable curl http) \
69     $(use_enable ldap) \
70     $(use_enable xml) \
71     $(use_enable smartcard) \
72     $(use_enable cisco cisco-quirks) \
73     $(use_enable debug leak-detective) \
74     $(use_enable nat nat-transport) \
75     ${myconf} \
76     || die "econf failed"
77    
78     emake || die "emake failed"
79     }
80    
81     src_install() {
82     einstall || die "einstall failed."
83    
84     doinitd "${FILESDIR}"/ipsec
85 pylon 1.2
86     fowners ipsec:ipsec /etc/ipsec.conf
87 pylon 1.1 }
88    
89     pkg_postinst() {
90     echo
91     ewarn "Starting with the strongswan-4 branch, the configuration files"
92     ewarn "will be installed into the default directory \"/etc/\""
93     ewarn "instead of the Gentoo-specific directory \"/etc/ipsec/\"."
94     ewarn "Please adjust your configuration!"
95     echo
96 pylon 1.2 einfo "For your own security we install strongSwan without superuser"
97     einfo "privileges. If you use iptables, you might want to change that"
98     einfo "setting. See http://wiki.strongswan.org/wiki/nonRoot for more"
99     einfo "information."
100     echo
101 pylon 1.1 einfo "The up-to-date configuration manual is available online at"
102     einfo "http://www.strongswan.org/docs/readme.htm"
103     echo
104     }

  ViewVC Help
Powered by ViewVC 1.1.20