diff options
Diffstat (limited to 'gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild')
-rw-r--r-- | gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild | 35 |
1 files changed, 19 insertions, 16 deletions
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 04f9fc7..49aadfd 100644 --- a/gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild +++ b/gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild @@ -17,14 +17,14 @@ RDEPEND=">=dev-libs/boost-1.35 gcrypt? ( dev-libs/libgcrypt ) !gcrypt? ( dev-libs/openssl )" DEPEND="${RDEPEND} - app-text/asciidoc" + app-text/asciidoc" 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 gcrypt || myconf="--use-ssl-crypto" + use examples && myconf="${myconf} --examplesdir=/usr/share/doc/${PF}/examples/etc" use examples || myconf="${myconf} --no-examples" econf --ebuild-compat ${myconf} || die "configure failed" @@ -36,36 +36,39 @@ src_compile() { } src_install() { - emake install DESTDIR=${D} + emake install DESTDIR="${D}" || die "make install failed" rm -Rf ${D}/etc/init.d + #as long as README just contains path to examples, only install it with examples + use examples || rm ${D}/etc/${PN}/README keepdir /var/run/anytun || die "failed to mkdir" keepdir /var/run/anytun-controld || die "failed to mkdir" - prepallman - newinitd "${FILESDIR}/${PN}-0.3.1.init" anytun || die "failed to copy/install initrd script" - - cd ../../ - insinto /usr/share/${P}/wireshark-lua/ - doins wireshark-lua/* || die "failed to install wireshark-lua contrib script" + newinitd "${FILESDIR}/${PN}-0.3.1.init" ${PN} || die "failed to copy/install initrd script" + cd ../ dodoc AUTHORS ChangeLog README || die "failed to install docs" + + insinto /usr/share/${P}/wireshark-lua/ + doins wireshark-lua/satp.lua || die "failed to install wireshark-lua contrib script" } pkg_config() { - [ -e "${ROOT}"/etc/anytun ] && die "${ROOT}/etc/anytun/ already present, rm -R it first" - [ ! -d "${ROOT}"/usr/share/doc/${PF}/examples/etc/anytun ] && \ + [ ! -d "${ROOT}"/usr/share/doc/${PF}/examples/etc/${PN} ] && \ die "can't copy example configs since examples were not installed (reemerge with USE=\"examples\")" - cp -rv "${ROOT}"/usr/share/doc/${PF}/examples/etc/anytun "${ROOT}"/etc/ || die "failed to copy examples" + for example in autostart server client1 client2 client3 p2p-a p2p-b; do + [ -e "${ROOT}"/etc/${PN}/${example} ] && die "${ROOT}/etc/${PN}/${example} already present, rm -R it first" + done + cp -rv "${ROOT}"/usr/share/doc/${PF}/examples/etc/${PN} "${ROOT}"/etc/ || die "failed to copy examples" } pkg_postinst() { enewgroup anytun enewuser anytun -1 -1 /var/run/anytun anytun - einfo "Please refer to the README file regarding the syntax of the /etc/anytun/" + einfo "Please refer to the README file regarding the syntax of the /etc/${PN}/" einfo "configuration files or see examples provided with the package" - einfo "You can use gentoo-style anytun.{VPN} initrd scripts to start " + einfo "You can use gentoo-style ${PN}.{VPN} initrd scripts to start " einfo "VPNs separately. Just symlink to the initscript, e.g.:" - einfo "# ln -s /etc/init.d/anytun /etc/init.d/anytun.client1" + einfo "# ln -s /etc/init.d/${PN} /etc/init.d/${PN}.client1" einfo einfo "You can disect anytun traffic using wireshark by plugging the script" einfo " /usr/share/${P}/wireshark-lua/satp.lua into wireshark" |