/[gentoo-x86]/net-misc/libreswan/libreswan-3.7.ebuild
Gentoo

Contents of /net-misc/libreswan/libreswan-3.7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Jan 6 19:55:34 2014 UTC (5 years, 10 months ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Fix pidfile handling in openrc init script.

(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/libreswan/libreswan-3.7.ebuild,v 1.4 2014/01/06 19:29:11 floppym Exp $
4
5 EAPI=5
6
7 inherit eutils systemd toolchain-funcs
8
9 if [[ ${PV} != 9999 ]]; then
10 SRC_URI="https://download.libreswan.org/${P}.tar.gz"
11 KEYWORDS="~amd64 ~ppc ~x86"
12 else
13 inherit git-r3
14 EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
15 fi
16
17 DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
18 HOMEPAGE="https://libreswan.org/"
19
20 LICENSE="GPL-2 BSD-4 RSA DES"
21 SLOT="0"
22 IUSE="caps curl dnssec ldap pam"
23
24 COMMON_DEPEND="
25 dev-libs/gmp
26 dev-libs/nspr
27 caps? ( sys-libs/libcap-ng )
28 curl? ( net-misc/curl )
29 dnssec? ( net-dns/unbound net-libs/ldns )
30 ldap? ( net-nds/openldap )
31 pam? ( sys-libs/pam )
32 "
33 DEPEND="${COMMON_DEPEND}
34 app-text/docbook-xml-dtd:4.1.2
35 app-text/xmlto
36 dev-libs/nss
37 sys-devel/bison
38 sys-devel/flex
39 virtual/pkgconfig
40 "
41 RDEPEND="${COMMON_DEPEND}
42 dev-libs/nss[utils(+)]
43 sys-apps/iproute2
44 !net-misc/openswan
45 !net-misc/strongswan
46 "
47
48 src_prepare() {
49 epatch "${FILESDIR}/libreswan-3.7-curl.patch"
50 epatch "${FILESDIR}/libreswan-3.7-openrc.patch"
51 epatch_user
52 }
53
54 usetf() {
55 usex "$1" true false
56 }
57
58 src_configure() {
59 tc-export AR CC
60 export INC_USRLOCAL=/usr
61 export INC_MANDIR=share/man
62 export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
63 export FINALDOCDIR=/usr/share/doc/${PF}/html
64 export INITSYSTEM=openrc
65 export INC_RCDIRS=
66 export INC_RCDEFAULT=/etc/init.d
67 export USERCOMPILE=
68 export USERLINK=
69 export USE_DNSSEC=$(usetf dnssec)
70 export USE_LIBCAP_NG=$(usetf caps)
71 export USE_LIBCURL=$(usetf curl)
72 export USE_LDAP=$(usetf ldap)
73 export USE_XAUTHPAM=$(usetf pam)
74 }
75
76 src_compile() {
77 emake programs
78 }
79
80 src_install() {
81 emake DESTDIR="${D}" install
82 sed -i -e '1s:python$:python2:' "${D}"/usr/libexec/ipsec/verify || die
83
84 echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
85 fperms 0600 /etc/ipsec.secrets
86
87 systemd_dounit "${FILESDIR}/ipsec.service"
88
89 dodoc BUGS CHANGES README
90 dodoc -r docs
91 }
92
93 pkg_postinst() {
94 local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
95 if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
96 ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
97 certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
98 eend $?
99 fi
100 }

  ViewVC Help
Powered by ViewVC 1.1.20