From 1a92b0ee6719f709d3fc33936f0f8b8c02630c6f Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Fri, 16 Jan 2015 05:01:31 +0000 Subject: ebuild --- gentoo-linux/net-misc/anytun/anytun-0.3.6.ebuild | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gentoo-linux/net-misc/anytun/anytun-0.3.6.ebuild b/gentoo-linux/net-misc/anytun/anytun-0.3.6.ebuild index 7d5a433..71fa737 100644 --- a/gentoo-linux/net-misc/anytun/anytun-0.3.6.ebuild +++ b/gentoo-linux/net-misc/anytun/anytun-0.3.6.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -inherit eutils +inherit eutils systemd DESCRIPTION="VPN daemon using Secure Anycast Tunneling" HOMEPAGE="http://anytun.org/" @@ -32,7 +32,7 @@ src_compile() { use examples\ && myconf="${myconf} --examplesdir=/usr/share/doc/${PF}/examples/etc" \ || myconf="${myconf} --no-examples" - use systemd && myconf="${myconf} --with-systemd" + use systemd && myconf="${myconf} --with-systemd $(systemd_with_unitdir) --with-systemdtmpfilesdir=/usr/lib/tmpfiles.d" econf --ebuild-compat ${myconf} einfo "Building executables" @@ -49,6 +49,7 @@ src_install() { use examples || rm -f "${D}"/etc/${PN}/README keepdir /var/run/anytun || die "failed to mkdir" keepdir /var/run/anytun-controld || die "failed to mkdir" + use systemd && systemd_newtmpfilesd "${D}"/usr/lib/tmpfiles.d/anytun.conf anytun.conf && rm -Rf "${D}"/usr/lib/tmpfiles.d/ newinitd "${FILESDIR}/${PN}-0.3.3.init" ${PN} || die "failed to copy/install initrd script" @@ -74,9 +75,17 @@ pkg_postinst() { enewuser anytun -1 -1 /var/run/anytun anytun elog "Please refer to the README file regarding the syntax of the /etc/${PN}/" elog "configuration files or see examples provided with the package" + use systemd && { + elog "You can enable VPN configurations separately using systemd@syntax." + elog "For clients:" + elog " systemctl --system enable anytun@{VPN}.service" + elog "For servers:" + elog " systemctl --system enable anytun-controld@{VPN}.service" + } || { elog "You can use gentoo-style ${PN}.{VPN} initrd scripts to start " elog "VPNs separately. Just symlink to the initscript, e.g.:" elog "# ln -s /etc/init.d/${PN} /etc/init.d/${PN}.client1" + } elog elog "You can disect anytun traffic using wireshark by plugging the script" elog "satp.lua into wireshark. Get it here:" -- cgit v1.2.3