logmein-hamachi-2.1.0.139.ebuild 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils linux-info systemd
  5. DESCRIPTION="LogMeIn Hamachi VPN tunneling engine"
  6. HOMEPAGE="https://secure.logmein.com/products/hamachi"
  7. SRC_URI="x86? ( https://secure.logmein.com/labs/${P}-x86.tgz )
  8. amd64? ( https://secure.logmein.com/labs/${P}-x64.tgz )"
  9. LICENSE="LogMeIn"
  10. SLOT="0"
  11. KEYWORDS="-* ~amd64 ~x86"
  12. IUSE=""
  13. RDEPEND="!net-misc/hamachi"
  14. RESTRICT="mirror"
  15. QA_PREBUILT="/opt/${PN}/bin/hamachid"
  16. QA_PRESTRIPPED="/opt/${PN}/bin/hamachid"
  17. QA_WX_LOAD="/opt/${PN}/bin/hamachid"
  18. pkg_setup() {
  19. einfo "Checking your kernel configuration for TUN/TAP support."
  20. CONFIG_CHECK="~TUN"
  21. check_extra_config
  22. }
  23. src_unpack() {
  24. unpack ${A}
  25. mv "${P}-$(use x86 && echo x86 || echo x64)" "${S}" || die
  26. }
  27. src_install() {
  28. into /opt/${PN}
  29. dobin hamachid dnsup dnsdown
  30. dosym /opt/${PN}/bin/hamachid /usr/bin/hamachi
  31. # Config and log directory
  32. dodir /var/lib/${PN}
  33. newconfd "${FILESDIR}"/${PN}.confd ${PN}
  34. newinitd "${FILESDIR}"/${PN}.initd ${PN}
  35. systemd_dounit "${FILESDIR}"/${PN}.service
  36. dodoc CHANGES README
  37. }
  38. pkg_postinst() {
  39. elog "LogMeIn Hamachi2 is installed."
  40. elog "Consult the README file on how to configure your client."
  41. elog "You can run the client 'hamachi' as root,"
  42. elog "or as a user if you add a newline terminated line:"
  43. elog "Ipc.User <login name>"
  44. elog "to the file '/var/lib/${PN}/h2-engine-override.cfg'"
  45. elog "and restart the daemon with"
  46. elog "/etc/init.d/${PN} restart"
  47. elog "or:"
  48. elog "systemctl restart ${PN}"
  49. elog "To enable auto-login when the service starts set a nickname in"
  50. elog "/etc/conf.d/${PN} (only supported using openRC)"
  51. }