peervpn-0.044-r3.ebuild 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit systemd toolchain-funcs user
  5. DESCRIPTION="P2P mesh VPN"
  6. HOMEPAGE="https://github.com/peervpn/peervpn"
  7. EGIT_COMMIT="eb35174277fbf745c5ee0d5875d659dad819adfc"
  8. SRC_URI="https://github.com/peervpn/peervpn/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="GPL-3"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE=""
  13. RDEPEND="dev-libs/openssl:0="
  14. DEPEND="${RDEPEND}"
  15. S=${WORKDIR}/${PN}-${EGIT_COMMIT}
  16. PATCHES=(
  17. "${FILESDIR}/${P}-strncpy-null-terminator.patch"
  18. )
  19. pkg_setup() {
  20. enewgroup ${PN}
  21. enewuser ${PN} -1 -1 -1 ${PN}
  22. }
  23. src_prepare() {
  24. default
  25. sed -e 's|^CFLAGS+=-O2||' -i Makefile || die
  26. }
  27. src_compile() {
  28. emake CC=$(tc-getCC) || die
  29. }
  30. src_install() {
  31. dosbin ${PN}
  32. insinto /etc/${PN}
  33. newins peervpn.conf peervpn.conf.example
  34. fowners ${PN}:${PN} /etc/${PN}
  35. fperms 0700 /etc/${PN}
  36. newinitd "${FILESDIR}/${PN}.initd" "${PN}"
  37. systemd_dounit "${FILESDIR}/${PN}.service"
  38. keepdir /var/log/${PN}
  39. insinto /etc/logrotate.d
  40. newins "${FILESDIR}/${PN}.logrotated" "${PN}"
  41. }