/[gentoo-x86]/net-misc/openswan/openswan-2.4.7.ebuild
Gentoo

Contents of /net-misc/openswan/openswan-2.4.7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Oct 22 23:02:50 2007 UTC (12 years ago) by mrness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove obsolete versions.
(Portage version: 2.1.3.9)

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/openswan/openswan-2.4.7.ebuild,v 1.3 2007/05/24 14:14:19 gustavoz Exp $
4
5 inherit eutils linux-info
6
7 DESCRIPTION="Open Source implementation of IPsec for the Linux operating system (was SuperFreeS/WAN)."
8 HOMEPAGE="http://www.openswan.org/"
9 SRC_URI="http://www.openswan.org/download/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="amd64 ~ppc ~sparc x86"
14 IUSE=""
15
16 COMMON_DEPEND="!net-misc/strongswan
17 >=dev-libs/gmp-4.2.1"
18 DEPEND="${COMMON_DEPEND}
19 virtual/linux-sources"
20 RDEPEND="${COMMON_DEPEND}
21 virtual/logger
22 sys-apps/iproute2"
23
24 pkg_setup() {
25 linux-info_pkg_setup
26
27 if kernel_is 2 6; then
28 einfo "This ebuild will set ${P} to use 2.6 native IPsec (KAME)."
29 einfo "KLIPS will not be compiled/installed."
30 MYMAKE="programs"
31
32 elif kernel_is 2 4; then
33 if ! [ -d /usr/src/linux/net/ipsec ]; then
34 eerror "You need to have an IPsec enabled 2.4.x kernel."
35 eerror "Ensure you have one running and make a symlink to it in /usr/src/linux"
36 die
37 fi
38
39 einfo "Using patched-in IPsec code for kernel 2.4"
40 einfo "Your kernel only supports KLIPS for kernel level IPsec."
41 MYMAKE="confcheck programs"
42
43 else
44 die "Unrecognised kernel version"
45 fi
46 }
47
48 src_unpack() {
49 unpack ${A}
50
51 cd "${S}"
52 epatch "${FILESDIR}"/${P}-gentoo.patch
53 }
54
55 src_compile() {
56 make \
57 DESTDIR="${D}" \
58 USERCOMPILE="${CFLAGS}" \
59 FINALCONFDIR=/etc/ipsec \
60 INC_RCDEFAULT=/etc/init.d \
61 INC_USRLOCAL=/usr \
62 INC_MANDIR=share/man \
63 FINALEXAMPLECONFDIR=/usr/share/doc/${P} \
64 FINALDOCDIR=/usr/share/doc/${P} \
65 ${MYMAKE} || die "make failed"
66 }
67
68 src_install() {
69 make \
70 DESTDIR="${D}" \
71 USERCOMPILE="${CFLAGS}" \
72 FINALCONFDIR=/etc/ipsec \
73 INC_RCDEFAULT=/etc/init.d \
74 INC_USRLOCAL=/usr \
75 INC_MANDIR=share/man \
76 FINALEXAMPLECONFDIR=/usr/share/doc/${P} \
77 FINALDOCDIR=/usr/share/doc/${P} \
78 install || die "make install failed"
79
80 dosym /etc/ipsec/ipsec.d /etc/ipsec.d
81
82 doinitd "${FILESDIR}"/ipsec
83
84 fperms -R a-X /etc/ipsec /usr/share
85 keepdir /var/run/pluto
86 }
87
88 pkg_postinst() {
89 if kernel_is 2 6; then
90 CONFIG_CHECK="~NET_KEY ~INET_XFRM_MODE_TRANSPORT ~INET_XFRM_MODE_TUNNEL ~INET_AH ~INET_ESP ~INET_IPCOMP"
91 WARNING_INET_AH="CONFIG_INET_AH:\tmissing IPsec AH support (needed if you want only authentication)"
92 WARNING_INET_ESP="CONFIG_INET_ESP:\tmissing IPsec ESP support (needed if you want authentication and encryption)"
93 WARNING_INET_IPCOMP="CONFIG_INET_IPCOMP:\tmissing IPsec Payload Compression (required for compress=yes)"
94 check_extra_config
95 fi
96 }

  ViewVC Help
Powered by ViewVC 1.1.20