summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/libreswan
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/libreswan')
-rw-r--r--net-misc/libreswan/Manifest6
-rwxr-xr-xnet-misc/libreswan/files/ipsec.service19
-rw-r--r--net-misc/libreswan/files/libreswan-3.7-curl.patch30
-rw-r--r--net-misc/libreswan/files/libreswan-3.7-openrc-pidfile.patch37
-rw-r--r--net-misc/libreswan/files/libreswan-3.7-openrc.patch24
-rw-r--r--net-misc/libreswan/libreswan-3.10.ebuild99
-rw-r--r--net-misc/libreswan/libreswan-3.12.ebuild99
-rw-r--r--net-misc/libreswan/libreswan-3.13.ebuild99
-rw-r--r--net-misc/libreswan/libreswan-3.7-r1.ebuild101
-rw-r--r--net-misc/libreswan/libreswan-3.8.ebuild100
-rw-r--r--net-misc/libreswan/libreswan-3.9.ebuild100
-rw-r--r--net-misc/libreswan/libreswan-9999.ebuild99
-rw-r--r--net-misc/libreswan/metadata.xml11
13 files changed, 824 insertions, 0 deletions
diff --git a/net-misc/libreswan/Manifest b/net-misc/libreswan/Manifest
new file mode 100644
index 000000000000..9e20181db59f
--- /dev/null
+++ b/net-misc/libreswan/Manifest
@@ -0,0 +1,6 @@
+DIST libreswan-3.10.tar.gz 9787915 SHA256 aa6bb559c27dfaef58a9bc3e194c6633a2423bbfcb4888591596f1678eec4c1e SHA512 fe3dbe0c8779050e5787da08541c312a79b091c2669cec102b3bb07ce1d4a53f2f7f99cbe60665cde4002c8e98597485f2039ea73640194c317d2d3fb15626d9 WHIRLPOOL 93c3542a74d4cef97b5f0b8af6e43078aed8af5aa15810b31a29285bad5f64520924470e5b3a924fcb078497ce40be51a95e40d988e01781d8543e568fc6d101
+DIST libreswan-3.12.tar.gz 9793222 SHA256 044dc63a69637e99ee4c0b86c2d9775d14b14e9e22ebd5a27caf504a956cf1be SHA512 d378d9290ba4a552b5c5eacb324651733b28094c4e4d72123bcc7ca9c6c651679bdf514b48585db16731bd18059c62cb950140066d0cbb5c3aa8c85b8b23652c WHIRLPOOL c0e7bde2dc1f5e09da3e5fda43a9c50225f793ac5b72d5b860249459c73a67387f4a2ea006a04b612a38f2d72feede2d4ab0af9e393b8aa33e313e778d71e2c9
+DIST libreswan-3.13.tar.gz 9797529 SHA256 25a6888f850a83eb17d7f041783babb316b07f88a4a327f276d760a273b86f32 SHA512 81385a566b736a97836e70fb4e7827864f6bd27387d29aaaf49c126af305fd8b82c92021186eecceb830418e27ed1d775d70b47a1d1cfe159bc9f2b9c2430e2d WHIRLPOOL 805f9b3adef86367fe9de44908705254693bc1036bac2dca2addd4fb9c661efeb84334d1b77f25612ade5e5a203b33c9cc78b5c117a8b12c3e530b1e01f5600a
+DIST libreswan-3.7.tar.gz 11135078 SHA256 7d62d11d30d3b7a4c011dfff4385e0eb778d99ccb2cdf2e8c35b37b34bd156c9 SHA512 b612d956ac4fe1dc102898e5a0a500a0a855654cd30363cae41d4ef4bcb9091c8f058a962ceab1c00348e301b17258f31b6814120c4578d6a119abede30ecff3 WHIRLPOOL 171014eef323a2d49019452f1bb429f76ca091f736e567aea906a3e811fc9c3b67794ec6c42ee6513b4087bb94c44776051b7e975224ddbae1bedfe26bf64c6f
+DIST libreswan-3.8.tar.gz 11104943 SHA256 a2e285fc9d20d2819a8fd8e3742d3aa5b1b33f0fd371584788800b7a5ebf12e4 SHA512 de2c7b92a22762bb3fb2d10c5efd60d9de2cc8289f31e61c23ee6c9e876a8f3fd327b3613de7c38b1fc4979cdf047baa5d78f7f809196c59f62d2b51b93cb246 WHIRLPOOL fe515ea5923b7f0161f056788d20991e243b67cb237b6b954c6385652148afac3df1ab5235b36f31bfbcf3bb680b718e32a80734abc047e1e9110d4030073294
+DIST libreswan-3.9.tar.gz 9720359 SHA256 3b586a8f6121c982757a09c1711a86c853be6f7bb7bf81a8a265dba31728f74b SHA512 59b2a461ed6877886e3e64603ae9adf83840c8348be96fb719a2b268a62d15495c049a8aebeb3d76156b1e6cda806fd7fe674c7006e8c1bd727996717f31e5e9 WHIRLPOOL 62f9be12b25fd9e0f36b778290674313f40b2da9be9525217285882250a184f38ce0ce48781b74ff6aa358e0525e04aeaf0ee15a8f7dcb10909d14e6268f48d4
diff --git a/net-misc/libreswan/files/ipsec.service b/net-misc/libreswan/files/ipsec.service
new file mode 100755
index 000000000000..36e2f97d822c
--- /dev/null
+++ b/net-misc/libreswan/files/ipsec.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Internet Key Exchange (IKE) Protocol Daemon for IPsec
+After=syslog.target
+After=network.target
+
+[Service]
+Type=simple
+ExecStartPre=/usr/libexec/ipsec/addconn --config /etc/ipsec.conf --checkconfig
+ExecStartPre=/usr/libexec/ipsec/_stackmanager start
+ExecStart=/usr/libexec/ipsec/pluto --config /etc/ipsec.conf --nofork
+ExecStop=/usr/libexec/ipsec/whack --shutdown
+ExecStopPost=/bin/ip xfrm policy flush
+ExecStopPost=/bin/ip xfrm state flush
+ExecReload=/usr/libexec/ipsec/whack --listen
+
+[Install]
+WantedBy=multi-user.target
+Alias=libreswan.service
+Alias=pluto.service
diff --git a/net-misc/libreswan/files/libreswan-3.7-curl.patch b/net-misc/libreswan/files/libreswan-3.7-curl.patch
new file mode 100644
index 000000000000..cc808abb0ae8
--- /dev/null
+++ b/net-misc/libreswan/files/libreswan-3.7-curl.patch
@@ -0,0 +1,30 @@
+diff --git a/include/secrets.h b/include/secrets.h
+index c5ac092..92c1679 100644
+--- a/include/secrets.h
++++ b/include/secrets.h
+@@ -173,10 +173,8 @@ extern struct secret *lsw_find_secret_by_id(struct secret *secrets,
+ const struct id *his_id,
+ bool asym);
+
+-#if defined(LIBCURL) || defined(LDAP_VER)
+ extern void lock_certs_and_keys(const char *who);
+ extern void unlock_certs_and_keys(const char *who);
+-#endif
+
+ #include "x509.h"
+ extern const struct RSA_private_key*lsw_get_x509_private_key(
+diff --git a/include/x509.h b/include/x509.h
+index f85e5b9..a796f89 100644
+--- a/include/x509.h
++++ b/include/x509.h
+@@ -230,8 +230,9 @@ extern void unlock_authcert_list(const char *who); /* in secrets.c */
+ #else
+ /* WARNING empty x509 locking functions defined bypassing real locking */
+ /* not fixing this hack, see issues #1390, #1391, #1392 */
++#define check_crls(who) /* nothing */
++#define lock_crl_list(who) /* nothing */
+ #define unlock_crl_list(who) /* nothing */
+-#define lock_cacert_list(who) /* nothing */
+ #define lock_authcert_list(who) /* nothing */
+ #define unlock_authcert_list(who) /* nothing */
+ #endif
diff --git a/net-misc/libreswan/files/libreswan-3.7-openrc-pidfile.patch b/net-misc/libreswan/files/libreswan-3.7-openrc-pidfile.patch
new file mode 100644
index 000000000000..9c9f696d0834
--- /dev/null
+++ b/net-misc/libreswan/files/libreswan-3.7-openrc-pidfile.patch
@@ -0,0 +1,37 @@
+From ee43bdf59ad20e099093a5de4a7cfe63f0c12ba0 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 6 Jan 2014 14:43:37 -0500
+Subject: [PATCH] packaging: Fix pidfile handling in openrc init script
+
+Variable is referenced as PLUTO_PIDFILE in start() and stop().
+
+Also, don't initialize PLUTO_OPTS to blank; this allows the sysadmin to
+set it in /etc/conf.d/ipsec.
+---
+ initsystems/openrc/ipsec.init.in | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/initsystems/openrc/ipsec.init.in b/initsystems/openrc/ipsec.init.in
+index f3ab2f9..c121897 100755
+--- a/initsystems/openrc/ipsec.init.in
++++ b/initsystems/openrc/ipsec.init.in
+@@ -1,7 +1,5 @@
+ #!/sbin/runscript
+
+-PLUTO_OPTS=""
+-
+ name="ipsec pluto daemon"
+ extra_commands="configtest"
+ extra_started_commands="reload"
+@@ -12,7 +10,7 @@ description_reload="reloads the configuration - does not affect existing connect
+ PLUTO_BINARY=${PLUTO_BINARY:-@FINALLIBDIR@/pluto}
+ PLUTO_CONFFILE=${PLUTO_CONFFILE:-@FINALCONFFILE@}
+ IPSEC_BINARY=${IPSEC_BINARY:-@FINALSBINDIR@/ipsec}
+-PLUTO_PID=${PLUTO_PID:-/var/run/pluto/pluto.pid}
++PLUTO_PIDFILE=${PLUTO_PIDFILE:-/var/run/pluto/pluto.pid}
+
+ depend() {
+ need net
+--
+1.8.5.2
+
diff --git a/net-misc/libreswan/files/libreswan-3.7-openrc.patch b/net-misc/libreswan/files/libreswan-3.7-openrc.patch
new file mode 100644
index 000000000000..6bbbda53e61f
--- /dev/null
+++ b/net-misc/libreswan/files/libreswan-3.7-openrc.patch
@@ -0,0 +1,24 @@
+From 2ad34532b42cfb791ed25cbf2fb9f6c964a12fcb Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sat, 4 Jan 2014 14:44:51 -0500
+Subject: [PATCH] packaging: Fix srcdir in openrc Makfile
+
+Signed-off-by: Paul Wouters <pwouters@redhat.com>
+---
+ initsystems/openrc/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/initsystems/openrc/Makefile b/initsystems/openrc/Makefile
+index 837ad61..eb5515e 100644
+--- a/initsystems/openrc/Makefile
++++ b/initsystems/openrc/Makefile
+@@ -1,5 +1,5 @@
+ LIBRESWANSRCDIR?=$(shell cd ../..; pwd)
+-srcdir?=${LIBRESWANSRCDIR}/initsystems/sysvinit/
++srcdir?=${LIBRESWANSRCDIR}/initsystems/openrc/
+
+ INITDFILE=ipsec.init
+ SUBDIRS=
+--
+1.8.5.2
+
diff --git a/net-misc/libreswan/libreswan-3.10.ebuild b/net-misc/libreswan/libreswan-3.10.ebuild
new file mode 100644
index 000000000000..e2e4694ea546
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.10.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="amd64 ~ppc x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-3.12.ebuild b/net-misc/libreswan/libreswan-3.12.ebuild
new file mode 100644
index 000000000000..c6d6c25a8b72
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.12.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-3.13.ebuild b/net-misc/libreswan/libreswan-3.13.ebuild
new file mode 100644
index 000000000000..1f36ee572908
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.13.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="amd64 ~ppc x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp:0=
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-3.7-r1.ebuild b/net-misc/libreswan/libreswan-3.7-r1.ebuild
new file mode 100644
index 000000000000..0f68e88bdcea
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.7-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch "${FILESDIR}/libreswan-3.7-curl.patch"
+ epatch "${FILESDIR}/libreswan-3.7-openrc.patch"
+ epatch "${FILESDIR}/libreswan-3.7-openrc-pidfile.patch"
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ sed -i -e '1s:python$:python2:' "${D}"/usr/libexec/ipsec/verify || die
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc BUGS CHANGES README
+ dodoc -r docs
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-3.8.ebuild b/net-misc/libreswan/libreswan-3.8.ebuild
new file mode 100644
index 000000000000..e86fa02bfe63
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.8.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="amd64 ~ppc x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ sed -i -e '1s:python$:python2:' "${D}"/usr/libexec/ipsec/verify || die
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc BUGS CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-3.9.ebuild b/net-misc/libreswan/libreswan-3.9.ebuild
new file mode 100644
index 000000000000..e4bcdb98a6c4
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.9.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ sed -i -e '1s:python$:python2:' "${D}"/usr/libexec/ipsec/verify || die
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-9999.ebuild b/net-misc/libreswan/libreswan-9999.ebuild
new file mode 100644
index 000000000000..b4c24412356b
--- /dev/null
+++ b/net-misc/libreswan/libreswan-9999.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp:0=
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/metadata.xml b/net-misc/libreswan/metadata.xml
new file mode 100644
index 000000000000..006bc2396c11
--- /dev/null
+++ b/net-misc/libreswan/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <use>
+ <flag name="dnssec">Use DNSSEC resolver (requires <pkg>net-dns/unbound</pkg></flag>
+ </use>
+</pkgmetadata>