spacepaste

  1.  
  2. # Copyright 1999-2014 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. # $Header: $
  5. EAPI=6
  6. KEYWORDS="~amd64 ~x86"
  7. inherit git-r3
  8. EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
  9. PYTHON_COMPAT=( python2_7 )
  10. #PYTHON_COMPAT=( python3_4 )
  11. PYTHON_REQ_USE='threads(+)'
  12. inherit python-r1 waf-utils
  13. DESCRIPTION="The NTP reference implementation, refactored"
  14. HOMEPAGE="https://www.ntpsec.org/"
  15. LICENSE="ntp"
  16. SLOT="0"
  17. IUSE="ntpviz refclock ssl seccomp" #ionice
  18. X_CDEPEND="
  19. sys-libs/libcap
  20. dev-python/psutil
  21. ssl? ( dev-libs/openssl )
  22. seccomp? ( sys-libs/libseccomp )
  23. "
  24. RDEPEND="
  25. ${X_CDEPEND}
  26. ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )
  27. "
  28. DEPEND="
  29. ${X_CDEPEND}
  30. app-text/asciidoc
  31. app-text/docbook-xsl-stylesheets
  32. sys-devel/bison
  33. "
  34. src_prepare() {
  35. python_setup
  36. eapply_user
  37. }
  38. src_configure() {
  39. local group_127=()
  40. # $(use ssl && echo "--enable-crypto") \ ## Replaced
  41. waf-utils_src_configure --nopyc --nopyo \
  42. --prefix="${EPREFIX}/usr" \
  43. $(use ssl && echo "--enable-crypto") \
  44. $(use seccomp && echo "--enable-seccomp") \
  45. $(use refclock && echo "--refclock=all") \
  46. --mandir=/usr/share/man/
  47. }
  48. src_install() {
  49. waf-utils_src_install
  50. mv -v "${ED}/usr/"{,share/}man
  51. if use ntpviz ; then
  52. dosbin "${S}/contrib/cpu-temp-log" \
  53. "${S}/contrib/gps-log" \
  54. "${S}/contrib/smartctl-temp-log" \
  55. "${S}/contrib/temper-temp-log" \
  56. "${S}/contrib/zone-temp-log"
  57. else
  58. dorm "${ED}/bin/ntpviz" "${ED}/share/man/man1/ntpviz.1.bz2"
  59. fi
  60. dodoc "${S}/contrib/ntp.conf.basic.sample" "${S}/contrib/ntp.conf.log.sample"
  61. dosbin "${S}/attic/ntpdate"
  62. cp "${files}/ntpd.service" "/usr/lib/systemd/system/"
  63. }
  64.