diff options
Diffstat (limited to 'gentoo-linux/net-misc/anytun/anytun-0.3.1.ebuild')
-rw-r--r-- | gentoo-linux/net-misc/anytun/anytun-0.3.1.ebuild | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/gentoo-linux/net-misc/anytun/anytun-0.3.1.ebuild b/gentoo-linux/net-misc/anytun/anytun-0.3.1.ebuild index 2e84f15..7f03a48 100644 --- a/gentoo-linux/net-misc/anytun/anytun-0.3.1.ebuild +++ b/gentoo-linux/net-misc/anytun/anytun-0.3.1.ebuild @@ -11,7 +11,7 @@ HOMEPAGE="http://anytun.org/" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86 ~x86-fbsd" -IUSE="gcrypt doc" +IUSE="gcrypt doc examples" DEPEND=">=dev-libs/boost-1.35 gcrypt? ( dev-libs/libgcrypt ) @@ -54,7 +54,6 @@ src_compile() { src_install() { cd "${S}/src" dosbin anytun - use static && dosbin anytun-static dobin anytun-config anytun-controld anytun-showtables anytun-nosync newinitd "${FILESDIR}/${PN}-0.3.1.init" anytun @@ -62,9 +61,6 @@ src_install() { #insinto /etc/default/ #doins ${S}/etc/default/* - cd ${S}/etc/anytun/ - find -type f -exec install -dm644 {} ${D}/etc/anytun/{} - insinto /usr/share/${P}/wireshark-lua/ doins ${S}/wireshark-lua/* @@ -73,6 +69,10 @@ src_install() { dodir /var/run/anytun-controld keepdir /var/run/anytun-controld + if use examples; then + insinto /usr/share/doc/${PF}/etc-anytun-examples/ + doins -r ${S}/etc/anytun/* + fi if use doc; then cd ${S} dodoc AUTHORS ChangeLog LICENSE README @@ -80,24 +80,37 @@ src_install() { doman anyrtpproxy.8 anytun-config.8 anytun-controld.8 anytun-showtables.8 anytun.8 prepalldocs fi + +} + +pkg_config() { + mkdir -p ${ROOT}/etc/anytun/ + tar xv --strip-components 3 -f ${DISTDIR}/${P}.tar.gz -C ${ROOT}/etc/anytun/ ${P}/etc/anytun } pkg_postinst() { enewgroup anytun enewuser anytun -1 -1 /var/run/anytun anytun - - einfo "Example configuration files have been installed in /etc/anytun" - einfo "tunnels get their own directory in /etc/anytun and should then" - einfo "be added to the /etc/anytun/autostart file" + + if use examples; then + einfo "Example configuration files have been installed in" + einfo " /usr/share/doc/${PF}/etc-anytun-examples/" + einfo "" + fi + einfo "To install inital config files for anytun use" + einfo "> emerge --config anytun" einfo "" - einfo "Alternatively you can forget the autostart file and create" - einfo "gentoostyle anytun.{VPN} initrd scripts for each VPN" - einfo " ex: ln -s /etc/init.d/anytun /etc/init.d/anytun.client1" + einfo "Note that each VPN gets it's own directory under /etc/anytun/" + einfo "You can either add tunnels to /etc/anytun/autostart and" + einfo "start them using /etc/init.d/anytun" + einfo "Or you can forget the autostart file and create" + einfo "gentoo-style anytun.{VPN} initrd scripts for each VPN" + einfo "e.g.> ln -s /etc/init.d/anytun /etc/init.d/anytun.client1" einfo "" einfo "Don't forget to " - einfo " rc-update add anytun default" + einfo "> rc-update add anytun default" einfo "or" - einfo " rc-update add anytun.client1 default" + einfo "> rc-update add anytun.client1 default" einfo "" einfo "You can disect anytun traffic using wireshark by plugging the script" einfo "/usr/share/${P}/wireshark-lua/satp.lua into wireshark" |