From b7041887a14479bd9ba5a9a983b38c41b64ed2e1 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sat, 5 Dec 2009 16:30:48 +0000 Subject: ebuild updates 0.3.2 (untested) --- gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild | 1 - gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild | 67 ++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild diff --git a/gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild b/gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild index fe91d5a..2b14c5c 100644 --- a/gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild +++ b/gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild @@ -39,7 +39,6 @@ src_compile() { src_install() { emake install DESTDIR=${D} rm -Rf ${D}/etc/init.d - keepdir /etc/anytun || die "failed to keep dir" keepdir /var/run/anytun || die "failed to mkdir" keepdir /var/run/anytun-controld || die "failed to mkdir" prepallman diff --git a/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild b/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild new file mode 100644 index 0000000..5c72f5d --- /dev/null +++ b/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils + +DESCRIPTION="tiny VPN daemon using Secure Anycast Tunneling" +HOMEPAGE="http://anytun.org/" +SRC_URI="http://anytun.org/download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples gcrypt" + +RDEPEND="gcrypt? ( dev-libs/libgcrypt ) + !gcrypt? ( dev-libs/openssl )" +DEPEND="${RDEPEND} + = 8.5.0 requires an -L switch not present in lower versions + +S=${S}/src + +src_compile() { + local myconf + use gcrypt || myconf="--use-ssl-crypto" + use examples && myconf="${myconf} --examplesdir=/usr/share/doc/${PF}/examples/etc/" + use examples || myconf="${myconf} --no-examples" + ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc ${myconf} || die "configure failed" + + emake || die "make failed" + + einfo "Building manpages" + emake manpage || die "failed building manpages" +} + +src_install() { + #make target install-bin is buggy + dosbin uanytun || die "failed to copy/install an executable" + newinitd "${FILESDIR}/${PN}-0.3.1.init" uanytun || die "failed to copy/install initrd script" + + emake install-man DESTDIR="${D}" || die "failed to install manpages" + + cd ../ + dodoc AUTHORS ChangeLog README || die "failed to install docs" + + if use examples; then + insinto /usr/share/doc/${PF}/examples/etc/ + doins -r etc/uanytun || die "failed to install examples" + fi +} + +pkg_config() { + [ -e "${ROOT}"/etc/uanytun ] && die "${ROOT}/etc/uanytun/ already present, rm -R it first" + [ ! -d "${ROOT}"/usr/share/doc/${PF}/examples/etc/uanytun/ ] && \ + die "can't copy example configs since examples were not installed (reemerge with USE=\"examples\")" + cp -vr "${ROOT}"/usr/share/doc/${PF}/examples/etc/uanytun "${ROOT}"/etc/ || die "failed to copy examples" +} + +pkg_postinst() { + enewgroup uanytun + enewuser uanytun -1 -1 /var/run/ uanytun + einfo "Note that each VPN gets its own directory under /etc/uanytun/" + einfo " (see examples provided with the package)" + einfo "Use the following example to create gentoo-style" + einfo " uanytun.{VPN} initrd scripts for each VPN" + einfo "# ln -s /etc/init.d/uanytun /etc/init.d/uanytun.client1" +} -- cgit v1.2.3