fence-agents-3.1.5-r2.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit multilib python-any-r1 versionator
  6. CLUSTER_RELEASE="${PV}"
  7. MY_P="cluster-${CLUSTER_RELEASE}"
  8. MAJ_PV="$(get_major_version)"
  9. MIN_PV="$(get_version_component_range 2-3)"
  10. DESCRIPTION="Cluster Fencing Agents"
  11. HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage"
  12. SRC_URI="https://fedorahosted.org/releases/f/e/${PN}/${PN}-${PV}.tar.gz"
  13. LICENSE="GPL-2"
  14. SLOT="0"
  15. KEYWORDS="~amd64 ~x86"
  16. IUSE=""
  17. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  18. RDEPEND="~sys-cluster/libccs-${PV}"
  19. DEPEND="${RDEPEND}
  20. ${PYTHON_DEPS}
  21. dev-libs/libxslt
  22. $(python_gen_any_dep '
  23. dev-python/pexpect[${PYTHON_USEDEP}]
  24. dev-python/pycurl[${PYTHON_USEDEP}]
  25. dev-python/suds[${PYTHON_USEDEP}]
  26. ')"
  27. src_configure() {
  28. econf \
  29. --docdir=/usr/share/doc/${P} \
  30. --libdir=/usr/$(get_libdir) \
  31. --localstatedir=/var
  32. }
  33. src_install() {
  34. default
  35. # dont force /var/run creation on installation wrt #451798
  36. rm -rf "${ED}"/var/run || die
  37. }
  38. pkg_postinst() {
  39. if [[ "${EROOT}" != "/" ]] ; then
  40. ewarn "You have to run 'ccs_update_schema' in the chroot-environment"
  41. ewarn "to update the schema file for the cluster configuration."
  42. ewarn "Otherwise you will not be able to define ressources."
  43. else
  44. elog "Running ccs_update_schema to update the configuration file schema"
  45. ccs_update_schema -v -f
  46. fi
  47. }
  48. pkg_postrm() {
  49. if [[ "${EROOT}" != "/" ]] ; then
  50. ewarn "You have to run 'ccs_update_schema' in the chroot-environment"
  51. ewarn "to update the schema file for the cluster configuration."
  52. ewarn "Otherwise you may be able to define ressources even though they"
  53. ewarn "are not present anymore."
  54. else
  55. elog "Running ccs_update_schema to update the configuration file schema"
  56. ccs_update_schema -v -f
  57. fi
  58. }