ocfs2-tools-1.8.2-r2.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit autotools python-single-r1
  6. DESCRIPTION="Support programs for the Oracle Cluster Filesystem 2"
  7. HOMEPAGE="http://oss.oracle.com/projects/ocfs2-tools/"
  8. SRC_URI="https://dev.gentoo.org/~alexxy/distfiles/${P}.tar.xz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="debug external gtk"
  13. RDEPEND="
  14. dev-libs/libaio:=
  15. sys-apps/util-linux:=
  16. sys-cluster/libcman
  17. external? (
  18. sys-cluster/libdlm
  19. sys-cluster/pacemaker[-heartbeat]
  20. )
  21. sys-fs/e2fsprogs
  22. sys-libs/e2fsprogs-libs:=
  23. sys-libs/ncurses:0=
  24. sys-libs/readline:0=
  25. sys-process/psmisc
  26. gtk? (
  27. ${PYTHON_DEPS}
  28. dev-python/pygtk[${PYTHON_USEDEP}]
  29. )
  30. "
  31. # 99% of deps this thing has is automagic
  32. # specialy cluster things corosync/pacemaker
  33. DEPEND="${RDEPEND}"
  34. REQUIRED_USE="gtk? ( ${PYTHON_REQUIRED_USE} )"
  35. DOCS=(
  36. "${S}/documentation/samples/cluster.conf"
  37. "${S}/documentation/users_guide.txt"
  38. )
  39. MAKEOPTS+=" -j1"
  40. PATCHES=(
  41. "${FILESDIR}/${PN}-1.6.4-asneeded.patch"
  42. "${FILESDIR}/${PN}-recent-kernels.patch"
  43. )
  44. pkg_setup() {
  45. use gtk && python-single-r1_pkg_setup
  46. }
  47. src_prepare() {
  48. sed -e 's/ncurses, tgetstr/ncurses, printw/g' -i configure.in || die
  49. # gentoo uses /sys/kernel/dlm as dlmfs mountpoint
  50. sed -e 's:"/dlm/":"/sys/kernel/dlm":g' \
  51. -i libo2dlm/o2dlm_test.c \
  52. -i libocfs2/dlm.c || die "sed failed"
  53. default
  54. rm -f aclocal.m4 || die
  55. AT_M4DIR=. eautoreconf
  56. use gtk && python_fix_shebang .
  57. }
  58. src_configure() {
  59. econf \
  60. $(use_enable debug debug) \
  61. $(use_enable debug debugexe) \
  62. $(use_enable gtk ocfs2console) \
  63. --enable-dynamic-fsck \
  64. --enable-dynamic-ctl
  65. }
  66. src_install() {
  67. default
  68. use gtk && python_optimize
  69. newinitd "${FILESDIR}/ocfs2.initd" ocfs2
  70. newconfd "${FILESDIR}/ocfs2.confd" ocfs2
  71. }