drbd-8.0.16.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils versionator
  4. LICENSE="GPL-2"
  5. KEYWORDS="amd64 x86"
  6. MY_PV="${PV/_/}"
  7. MY_MAJ_PV="$(get_version_component_range 1-2 ${PV})"
  8. DESCRIPTION="mirror/replicate block-devices across a network-connection"
  9. SRC_URI="http://oss.linbit.com/drbd/${MY_MAJ_PV}/${PN}-${MY_PV}.tar.gz"
  10. HOMEPAGE="http://www.drbd.org"
  11. IUSE=""
  12. DEPEND=""
  13. RDEPEND=""
  14. PDEPEND="~sys-cluster/drbd-kernel-${PV}"
  15. SLOT="0"
  16. S="${WORKDIR}/${PN}-${MY_PV}"
  17. src_compile() {
  18. emake -j1 tools || die "compile problem"
  19. }
  20. src_install() {
  21. emake PREFIX="${D}" install-tools || die "install problem"
  22. # gentoo-ish init-script
  23. newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
  24. # docs
  25. dodoc README ChangeLog ROADMAP
  26. # we put drbd.conf into docs
  27. # it doesnt make sense to install a default conf in /etc
  28. # put it to the docs
  29. rm -f "${D}"/etc/drbd.conf
  30. dodoc scripts/drbd.conf || die
  31. }
  32. pkg_postinst() {
  33. einfo ""
  34. einfo "Please copy and gunzip the configuration file"
  35. einfo "drbd.conf from /usr/share/doc/${PF} to /etc"
  36. einfo "and edit it to your needs. Helpful commands:"
  37. einfo "man 5 drbd.conf"
  38. einfo "man 8 drbdsetup"
  39. einfo "man 8 drbdadm"
  40. einfo "man 8 drbddisk"
  41. einfo "man 8 drbdmeta"
  42. einfo ""
  43. }