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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Wed Jan 21 18:15:55 2009 UTC (10 years, 10 months ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +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 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/strongswan/strongswan-2.8.0.ebuild,v 1.12 2007/12/16 14:32:49 pylon Exp $
4
5 inherit eutils linux-info
6
7 DESCRIPTION="IPsec-based VPN Solution for Linux"
8 HOMEPAGE="http://www.strongswan.org/"
9 SRC_URI="http://download.strongswan.org/${P}.tar.bz2"
10
11 LICENSE="GPL-2 RSA-MD2 RSA-MD5 RSA-PKCS11 DES"
12 SLOT="0"
13 KEYWORDS="amd64 ppc sparc x86"
14 IUSE="curl ldap smartcard"
15
16 COMMON_DEPEND="!net-misc/openswan
17 dev-libs/gmp"
18 DEPEND="${COMMON_DEPEND}
19 virtual/linux-sources
20 <sys-kernel/linux-headers-2.6.18
21 curl? ( net-misc/curl )
22 ldap? ( net-nds/openldap )
23 smartcard? ( dev-libs/opensc )"
24 RDEPEND="${COMMON_DEPEND}
25 virtual/logger
26 sys-apps/iproute2"
27
28 pkg_setup() {
29 linux-info_pkg_setup
30
31 if kernel_is 2 6; then
32 einfo "This ebuild will set ${P} to use 2.6 native IPsec (KAME)."
33 einfo "KLIPS will not be compiled/installed."
34 MYMAKE="programs"
35
36 elif kernel_is 2 4; then
37 if ! [ -d /usr/src/linux/net/ipsec ]; then
38 eerror "You need to have an IPsec enabled 2.4.x kernel."
39 eerror "Ensure you have one running and make a symlink to it in /usr/src/linux"
40 die
41 fi
42
43 einfo "Using patched-in IPsec code for kernel 2.4."
44 einfo "Your kernel only supports KLIPS for kernel level IPsec."
45 MYMAKE="confcheck programs"
46
47 else
48 eerror "Sorry, no support for your kernel version ${KV_FULL}."
49 die "Install an IPsec enabled 2.4 or 2.6 kernel."
50 fi
51 }
52
53 src_unpack() {
54 unpack ${A}
55 cd "${S}"
56
57 epatch "${FILESDIR}"/ipsec-path.patch.bz2
58
59 if use curl ; then
60 ebegin "Curl support requested. Enabling curl support"
61 sed -i -e 's:\(USE_LIBCURL?=\)false:\1true:g' Makefile.inc || die
62 eend $?
63 fi
64
65 if use ldap ; then
66 ebegin "LDAP support requested. Enabling LDAPv3 support"
67 sed -i -e 's:\(USE_LDAP?=\)false:\1true:g' Makefile.inc || die
68 eend $?
69 fi
70
71 if use smartcard ; then
72 ebegin "Smartcard support requested. Enabling opensc support"
73 sed -i -e 's:\(USE_SMARTCARD?=\)false:\1true:g' Makefile.inc || die
74 sed -i -e 's:\(PKCS11_DEFAULT_LIB=\\\"/usr/lib/pkcs11/opensc-pkcs11.so\\\"\):#\1:g' \
75 Makefile.inc || die
76 sed -i -e 's:#\(PKCS11_DEFAULT_LIB=\\\"/usr/lib/opensc-pkcs11.so\\\"\):\1:g' \
77 Makefile.inc || die
78 eend $?
79 fi
80
81 # patch broken check-rule
82 sed -i -e 's#check: uml#check: programs checkprograms#' Makefile
83
84 }
85
86 src_compile() {
87 emake \
88 DESTDIR="${D}" \
89 USERCOMPILE="${CFLAGS}" \
90 FINALCONFDIR=/etc/ipsec \
91 INC_RCDEFAULT=/etc/init.d \
92 INC_USRLOCAL=/usr \
93 INC_MANDIR=share/man \
94 FINALEXAMPLECONFDIR=/usr/share/doc/${P} \
95 FINALDOCDIR=/usr/share/doc/${P} \
96 ${MYMAKE} || die "make failed"
97 }
98
99 src_install() {
100 # make install wants this directory
101 dodir /etc/init.d
102
103 emake \
104 DESTDIR="${D}" \
105 USERCOMPILE="${CFLAGS}" \
106 FINALCONFDIR=/etc/ipsec \
107 INC_RCDEFAULT=/etc/init.d \
108 INC_USRLOCAL=/usr \
109 INC_MANDIR=share/man \
110 FINALEXAMPLECONFDIR=/usr/share/doc/${P} \
111 FINALDOCDIR=/usr/share/doc/${P} \
112 install || die "make install failed"
113
114 dohtml doc/*html
115 rm -f "${S}"/doc/*.html
116 dodoc CHANGES COPYING CREDITS INSTALL README doc/*
117
118 doinitd "${FILESDIR}"/ipsec
119
120 fperms -R a-X /etc/ipsec /usr/share
121 keepdir /var/run/pluto
122
123 einfo "Configuration files are installed into /etc/ipsec/"
124 }
125
126 pkg_postinst() {
127 if kernel_is 2 6; then
128 CONFIG_CHECK="~NET_KEY ~INET_XFRM_MODE_TRANSPORT ~INET_XFRM_MODE_TUNNEL ~INET_AH ~INET_ESP ~INET_IPCOMP"
129 WARNING_INET_AH="CONFIG_INET_AH:\tmissing IPsec AH support (needed if you want only authentication)"
130 WARNING_INET_ESP="CONFIG_INET_ESP:\tmissing IPsec ESP support (needed if you want authentication and encryption)"
131 WARNING_INET_IPCOMP="CONFIG_INET_IPCOMP:\tmissing IPsec Payload Compression (required for compress=yes)"
132 check_extra_config
133 fi
134 }

  ViewVC Help
Powered by ViewVC 1.1.20