xrootd-4.4.0.ebuild 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils user
  5. DESCRIPTION="Extended ROOT remote file server"
  6. HOMEPAGE="http://xrootd.org/"
  7. SRC_URI="http://xrootd.org/download/v${PV}/${P}.tar.gz"
  8. LICENSE="LGPL-3"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
  11. IUSE="doc fuse http kerberos readline ssl test"
  12. RDEPEND="
  13. !<sci-physics/root-5.32[xrootd]
  14. sys-libs/zlib
  15. fuse? ( sys-fs/fuse )
  16. kerberos? ( virtual/krb5 )
  17. readline? ( sys-libs/readline:0= )
  18. ssl? ( dev-libs/openssl:0= )"
  19. DEPEND="${RDEPEND}
  20. doc? ( app-doc/doxygen[dot] )
  21. test? ( dev-util/cppunit )"
  22. REQUIRED_USE="http? ( kerberos ssl )"
  23. PATCHES=( "${FILESDIR}"/${PN}-no-werror.patch )
  24. # xrootd plugins are not intended to be linked with,
  25. # they are to be loaded at runtime by xrootd,
  26. # see https://github.com/xrootd/xrootd/issues/447
  27. QA_SONAME="/usr/lib.*/libXrd*-4.so"
  28. pkg_setup() {
  29. enewgroup xrootd
  30. enewuser xrootd -1 -1 "${EPREFIX}"/var/spool/xrootd xrootd
  31. }
  32. src_configure() {
  33. local mycmakeargs=(
  34. -DENABLE_FUSE=$(usex fuse)
  35. -DENABLE_HTTP=$(usex http)
  36. -DENABLE_KRB5=$(usex kerberos)
  37. -DENABLE_READLINE=$(usex readline)
  38. -DENABLE_CRYPTO=$(usex ssl)
  39. -DENABLE_TESTS=$(usex test)
  40. -DENABLE_CEPH=OFF
  41. -DENABLE_PYTHON=OFF # TODO: install python bindings properly
  42. )
  43. cmake-utils_src_configure
  44. }
  45. src_compile() {
  46. cmake-utils_src_compile
  47. if use doc; then
  48. doxygen Doxyfile || die
  49. fi
  50. }
  51. src_install() {
  52. use doc && HTML_DOCS=( doxydoc/html/. )
  53. dodoc docs/ReleaseNotes.txt
  54. cmake-utils_src_install
  55. find "${D}" \( -iname '*.md5' -o -iname '*.map' \) -delete || die
  56. # base configs
  57. insinto /etc/xrootd
  58. doins packaging/common/*.cfg
  59. fowners root:xrootd /etc/xrootd
  60. keepdir /var/log/xrootd
  61. fowners xrootd:xrootd /var/log/xrootd
  62. local i
  63. for i in cmsd frm_purged frm_xfrd xrootd; do
  64. newinitd "${FILESDIR}"/${i}.initd ${i}
  65. done
  66. # all daemons MUST use single master config file
  67. newconfd "${FILESDIR}"/xrootd.confd xrootd
  68. }