rgmanager-agents-3.9.2.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2011 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit multilib versionator
  5. CLUSTER_RELEASE="3.1.5"
  6. MY_PN="resource-agents"
  7. MY_P="${MY_PN}-${PV}"
  8. DESCRIPTION="Resource Manager Agents"
  9. HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage"
  10. SRC_URI="https://fedorahosted.org/releases/r/e/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
  11. LICENSE="GPL-2"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. IUSE=""
  15. RDEPEND="~sys-cluster/rgmanager-${CLUSTER_RELEASE}
  16. ~sys-cluster/cman-${CLUSTER_RELEASE}"
  17. DEPEND="${RDEPEND}"
  18. S="${WORKDIR}/${MY_P}"
  19. src_configure() {
  20. econf \
  21. --docdir=/usr/share/doc/${P} \
  22. --libdir=/usr/$(get_libdir) \
  23. --localstatedir=/var \
  24. --sysconfdir=/etc \
  25. --with-ras-set=rgmanager
  26. }
  27. src_install() {
  28. default
  29. # remove useless RHEV check script and log directory
  30. rm -rf "${D}/usr/sbin" "${D}/var"
  31. }
  32. pkg_postinst() {
  33. if [[ "${ROOT}" != "/" ]] ; then
  34. ewarn "You have to run 'ccs_update_schema' in the chroot-environment"
  35. ewarn "to update the schema file for the cluster configuration."
  36. ewarn "Otherwise you will not be able to define ressources."
  37. else
  38. elog "Running ccs_update_schema to update the configuration file schema"
  39. /usr/sbin/ccs_update_schema -v -f
  40. fi
  41. }
  42. pkg_postrm() {
  43. if [[ "${ROOT}" != "/" ]] ; then
  44. ewarn "You have to run 'ccs_update_schema' in the chroot-environment"
  45. ewarn "to update the schema file for the cluster configuration."
  46. ewarn "Otherwise you may be able to define ressources even though they"
  47. ewarn "are not present anymore."
  48. else
  49. elog "Running ccs_update_schema to update the configuration file schema"
  50. /usr/sbin/ccs_update_schema -v -f
  51. fi
  52. }