dlm-2.03.09.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2009 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils linux-mod versionator
  4. CLUSTER_RELEASE="${PV}"
  5. MY_P="cluster-${CLUSTER_RELEASE}"
  6. MAJ_PV="$(get_major_version)"
  7. MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
  8. DESCRIPTION="General-purpose Distributed Lock Manager"
  9. HOMEPAGE="https://sourceware.org/cluster/wiki/"
  10. SRC_URI="ftp://sourceware.org/pub/cluster/releases/${MY_P}.tar.gz"
  11. LICENSE="GPL-2"
  12. SLOT="0"
  13. KEYWORDS="amd64 x86"
  14. IUSE=""
  15. DEPEND=">=sys-kernel/linux-headers-2.6.24
  16. !sys-cluster/dlm-headers
  17. !sys-cluster/dlm-kernel
  18. =sys-cluster/dlm-lib-${CLUSTER_RELEASE}*
  19. "
  20. RDEPEND="${DEPEND}"
  21. S="${WORKDIR}/${MY_P}/${PN}"
  22. src_unpack() {
  23. unpack ${A}
  24. cd "${S}"
  25. # fix the manual pages have executable bit
  26. sed -i -e '
  27. /\tinstall -d/s/install/& -m 0755/; t
  28. /\tinstall/s/install/& -m 0644/' \
  29. man/Makefile || die "failed patching man pages permission"
  30. }
  31. src_compile() {
  32. (cd "${WORKDIR}"/${MY_P};
  33. ./configure \
  34. --cc=$(tc-getCC) \
  35. --cflags="-Wall" \
  36. --disable_kernel_check \
  37. --kernel_src=${KERNEL_DIR} \
  38. --somajor="$MAJ_PV" \
  39. --sominor="$MIN_PV" \
  40. --cmanlibdir=/usr/lib \
  41. --dlmlibdir=/usr/lib \
  42. --dlmincdir=/usr/include \
  43. ) || die "configure problem"
  44. emake clean || die "clean problem"
  45. for i in tool man; do
  46. emake -C $i || die "compile problem"
  47. done
  48. }
  49. src_install() {
  50. for i in tool man; do
  51. emake DESTDIR="${D}" -C $i install || die "install problem"
  52. done
  53. dodoc doc/*.txt
  54. }