summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2008-03-17 16:59:57 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2008-03-17 16:59:57 +0000
commita71b5993594a7172311f448c6fa844dd1c72ce71 (patch)
tree39dd8990352b3a2c730e0557e76574865b055e60 /sys-cluster/gnbd
parentVersion bump. 1.0x.00 is scheduled to be removed soon. (diff)
downloadgentoo-2-a71b5993594a7172311f448c6fa844dd1c72ce71.tar.gz
gentoo-2-a71b5993594a7172311f448c6fa844dd1c72ce71.tar.bz2
gentoo-2-a71b5993594a7172311f448c6fa844dd1c72ce71.zip
Version bump. 1.0x.00 is scheduled to be removed soon.
(Portage version: 2.1.4.4)
Diffstat (limited to 'sys-cluster/gnbd')
-rw-r--r--sys-cluster/gnbd/ChangeLog16
-rw-r--r--sys-cluster/gnbd/files/gnbd-client-1.0x.conf (renamed from sys-cluster/gnbd/files/gnbd-client.conf)2
-rwxr-xr-xsys-cluster/gnbd/files/gnbd-client-1.0x.rc (renamed from sys-cluster/gnbd/files/gnbd-client.rc)2
-rw-r--r--sys-cluster/gnbd/files/gnbd-client-2.0x.conf5
-rwxr-xr-xsys-cluster/gnbd/files/gnbd-client-2.0x.rc100
-rw-r--r--sys-cluster/gnbd/files/gnbd-srv-1.0x.conf (renamed from sys-cluster/gnbd/files/gnbd-srv.conf)2
-rwxr-xr-xsys-cluster/gnbd/files/gnbd-srv-1.0x.rc (renamed from sys-cluster/gnbd/files/gnbd-srv.rc)2
-rw-r--r--sys-cluster/gnbd/files/gnbd-srv-2.0x.conf5
-rwxr-xr-xsys-cluster/gnbd/files/gnbd-srv-2.0x.rc81
-rw-r--r--sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild22
-rw-r--r--sys-cluster/gnbd/gnbd-1.03.00.ebuild18
-rw-r--r--sys-cluster/gnbd/gnbd-1.04.00.ebuild18
-rw-r--r--sys-cluster/gnbd/gnbd-2.02.00.ebuild67
13 files changed, 305 insertions, 35 deletions
diff --git a/sys-cluster/gnbd/ChangeLog b/sys-cluster/gnbd/ChangeLog
index 6b0d77606cca..d44cf585bb6a 100644
--- a/sys-cluster/gnbd/ChangeLog
+++ b/sys-cluster/gnbd/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for sys-cluster/gnbd
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/ChangeLog,v 1.23 2007/05/12 13:32:43 xmerlin Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/ChangeLog,v 1.24 2008/03/17 16:59:56 xmerlin Exp $
+
+*gnbd-2.02.00 (17 Mar 2008)
+
+ 17 Mar 2008; Christian Zoffoli <xmerlin@gentoo.org>
+ +files/gnbd-client-1.0x.conf, +files/gnbd-srv-1.0x.conf,
+ +files/gnbd-client-1.0x.rc, +files/gnbd-srv-1.0x.rc,
+ +files/gnbd-client-2.0x.conf, +files/gnbd-srv-2.0x.conf,
+ +files/gnbd-client-2.0x.rc, +files/gnbd-srv-2.0x.rc,
+ -files/gnbd-client.conf, -files/gnbd-client.rc, -files/gnbd-srv.conf,
+ -files/gnbd-srv.rc, gnbd-1.02.00-r1.ebuild, gnbd-1.03.00.ebuild,
+ gnbd-1.04.00.ebuild, +gnbd-2.02.00.ebuild:
+ Version bump. 1.0x.00 is scheduled to be removed soon.
12 May 2007; Christian Zoffoli <xmerlin@gentoo.org> gnbd-1.03.00.ebuild:
Stable on x86.
diff --git a/sys-cluster/gnbd/files/gnbd-client.conf b/sys-cluster/gnbd/files/gnbd-client-1.0x.conf
index 5952f4e7af5d..77590695b69f 100644
--- a/sys-cluster/gnbd/files/gnbd-client.conf
+++ b/sys-cluster/gnbd/files/gnbd-client-1.0x.conf
@@ -1,5 +1,5 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client.conf,v 1.1 2005/10/07 19:48:57 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client-1.0x.conf,v 1.1 2008/03/17 16:59:57 xmerlin Exp $
GNBD_CLIENT_OPTS=""
diff --git a/sys-cluster/gnbd/files/gnbd-client.rc b/sys-cluster/gnbd/files/gnbd-client-1.0x.rc
index b83bdac3f186..e14cc30bf829 100755
--- a/sys-cluster/gnbd/files/gnbd-client.rc
+++ b/sys-cluster/gnbd/files/gnbd-client-1.0x.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client.rc,v 1.6 2007/03/12 19:55:57 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client-1.0x.rc,v 1.1 2008/03/17 16:59:57 xmerlin Exp $
depend() {
use dns logger
diff --git a/sys-cluster/gnbd/files/gnbd-client-2.0x.conf b/sys-cluster/gnbd/files/gnbd-client-2.0x.conf
new file mode 100644
index 000000000000..751342e41abc
--- /dev/null
+++ b/sys-cluster/gnbd/files/gnbd-client-2.0x.conf
@@ -0,0 +1,5 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client-2.0x.conf,v 1.1 2008/03/17 16:59:57 xmerlin Exp $
+
+GNBD_CLIENT_OPTS=""
diff --git a/sys-cluster/gnbd/files/gnbd-client-2.0x.rc b/sys-cluster/gnbd/files/gnbd-client-2.0x.rc
new file mode 100755
index 000000000000..fbe8eb2d1d10
--- /dev/null
+++ b/sys-cluster/gnbd/files/gnbd-client-2.0x.rc
@@ -0,0 +1,100 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client-2.0x.rc,v 1.1 2008/03/17 16:59:57 xmerlin Exp $
+
+depend() {
+ use dns logger
+ need net
+ need cman
+}
+
+load_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Loading ${module} kernel module"
+ modprobe ${module}
+ eend $? "Failed to load ${module} kernel module"
+ done
+}
+
+unload_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Unloading ${module} kernel module"
+ modprobe -r ${module}
+ eend $? "Failed to unload ${module} kernel module"
+ done
+}
+
+
+start() {
+ if [ ! -f /etc/gnbdtab ] ; then
+ eerror "Please create /etc/gnbdtab"
+ eerror "Sample conf: /etc/gnbdtab"
+ return 1
+ fi
+
+ load_modules gnbd
+
+ GNBD=`cat /etc/gnbdtab | egrep '^import'`
+ if [ -n "$GNBD" ] ; then
+ ebegin "Importing all GNBDs devices"
+ einfo "$(awk '/^import/ { print "--> server:", $2 }' /etc/gnbdtab )"
+ cat /etc/gnbdtab | awk '/^import/ { print "-i", $2 }' | xargs -l gnbd_import ${GNBD_CLIENT_OPTS} > /dev/null
+ eend $? "Failed to import gnbd devices"
+ fi
+}
+
+stop() {
+ # umount manually mounted gfs filesystems
+ local sig retry
+ local remaining="$(awk '( $3 == "gfs" || $3 == "gfs2" ) && $1 ~ /\/dev\/gnbd\// { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
+
+ if [ -z "${remaining}" ]
+ then
+ ebegin "Unmounting GFS filesystems (GNBDs imported devices)"
+ eend 0
+ else
+ sig=
+ retry=3
+ while [ -n "${remaining}" -a "${retry}" -gt 0 ]
+ do
+ if [ "${retry}" -lt 3 ]
+ then
+ ebegin "Unmounting GFS filesystems (retry)"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems this retry"
+ else
+ ebegin "Unmounting GFS filesystems"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems"
+ fi
+ remaining="$(awk '( $3 == "gfs" || $3 == "gfs2" ) && $1 ~ /\/dev\/gnbd\// { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
+ [ -z "${remaining}" ] && break
+ /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
+ sleep 5
+ retry=$((${retry} -1))
+ sig=-9
+ done
+ fi
+
+ local GNBD_MONITOR_PROC
+
+ ebegin "Unimporting all GNBDs devices"
+ gnbd_import -q -R &> /dev/null
+ eend $?
+
+ GNBD_MONITOR_PROC="$(pgrep gnbd_clusterd)"
+ if [ -n "${GNBD_MONITOR_PROC}" ]; then
+ ebegin "Stopping gnbd_monitor"
+ killall gnbd_monitor &> /dev/null
+ eend $?
+ fi
+
+ unload_modules gnbd
+}
diff --git a/sys-cluster/gnbd/files/gnbd-srv.conf b/sys-cluster/gnbd/files/gnbd-srv-1.0x.conf
index e3511f425b4a..f6cabbce3ca6 100644
--- a/sys-cluster/gnbd/files/gnbd-srv.conf
+++ b/sys-cluster/gnbd/files/gnbd-srv-1.0x.conf
@@ -1,5 +1,5 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv.conf,v 1.1 2005/10/07 19:48:57 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv-1.0x.conf,v 1.1 2008/03/17 16:59:57 xmerlin Exp $
GNBD_SRV_OPTS=""
diff --git a/sys-cluster/gnbd/files/gnbd-srv.rc b/sys-cluster/gnbd/files/gnbd-srv-1.0x.rc
index 4000e8fd11c7..b057ef3e329a 100755
--- a/sys-cluster/gnbd/files/gnbd-srv.rc
+++ b/sys-cluster/gnbd/files/gnbd-srv-1.0x.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv.rc,v 1.4 2005/10/07 19:48:57 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv-1.0x.rc,v 1.1 2008/03/17 16:59:57 xmerlin Exp $
depend() {
use dns logger
diff --git a/sys-cluster/gnbd/files/gnbd-srv-2.0x.conf b/sys-cluster/gnbd/files/gnbd-srv-2.0x.conf
new file mode 100644
index 000000000000..179b5971247b
--- /dev/null
+++ b/sys-cluster/gnbd/files/gnbd-srv-2.0x.conf
@@ -0,0 +1,5 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv-2.0x.conf,v 1.1 2008/03/17 16:59:57 xmerlin Exp $
+
+GNBD_SRV_OPTS=""
diff --git a/sys-cluster/gnbd/files/gnbd-srv-2.0x.rc b/sys-cluster/gnbd/files/gnbd-srv-2.0x.rc
new file mode 100755
index 000000000000..7d396a327cde
--- /dev/null
+++ b/sys-cluster/gnbd/files/gnbd-srv-2.0x.rc
@@ -0,0 +1,81 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv-2.0x.rc,v 1.1 2008/03/17 16:59:57 xmerlin Exp $
+
+depend() {
+ use dns logger
+ need net
+ need cman
+}
+
+GNBD_SRV_TIMEOUT=5
+
+start() {
+ local GNBD
+
+ if [ ! -f /etc/gnbdtab ] ; then
+ eerror "Please create /etc/gnbdtab"
+ eerror "Sample conf: /etc/gnbdtab"
+ return 1
+ fi
+
+ ebegin "Loading needed kernel modules for gnbd"
+ modprobe gnbd
+ eend $? "Failed to load needed kernel modules for gnbd"
+
+ ebegin "Starting gnbd_serv"
+ start-stop-daemon --start --quiet --exec /sbin/gnbd_serv -- -q
+ eend $? "Failed to start gnbd_serv"
+
+ GNBD=`cat /etc/gnbdtab | egrep '^export'`
+ if [ -n "$GNBD" ] ; then
+ ebegin "Exporting all GNBDs devices"
+ einfo "$(awk '/^export/ { print "--> device:", $4, "as", $3 }' /etc/gnbdtab )"
+ cat /etc/gnbdtab | awk '/^export/ { print "-d", $4, "-e", $3 }' | xargs -l gnbd_export ${GNBD_SRV_OPTS} > /dev/null
+ eend $? "Failed to export gnbd devices"
+ fi
+}
+
+stop() {
+
+ local GNBD_SRV_PROCS GNBD_CLUSTERD_PROC
+
+ ebegin "Unexporting all GNBDs devices"
+ gnbd_export -q -R &> /dev/null
+ eend $?
+
+ if [ "$?" -ne 0 ]
+ then
+ ewend 1 "Failed to unexport all gnbd devices"
+ else
+ eend 0
+
+ fi
+
+ ebegin "Stopping gnbd_serv"
+
+ GNBD_SRV_PROCS="$(pgrep gnbd_serv)"
+ while [ -n "${GNBD_SRV_PROCS}" ] && [ ${GNBD_SRV_TIMEOUT} -gt 0 ] ; do
+ gnbd_serv -k &> /dev/null
+ sleep 1
+ GNBD_SRV_TIMEOUT=$(( ${GNBD_SRV_TIMEOUT}-1 ))
+ GNBD_SRV_PROCS="$(pgrep gnbd_serv)"
+ done
+
+ if [ -n "${GNBD_SRV_PROCS}" ]; then
+ gnbd_serv -K &> /dev/null
+ fi
+ eend $? "Failed to stop gnbd_serv"
+
+ GNBD_CLUSTERD_PROC="$(pgrep gnbd_clusterd)"
+ if [ -n "${GNBD_CLUSTERD_PROC}" ]; then
+ ebegin "Stopping gnbd_clusterd"
+ killall gnbd_clusterd &> /dev/null
+ eend $?
+ fi
+
+ ebegin "Unloading gnbd kernel module"
+ modprobe -r gnbd
+ eend $? "Failed to unload gnbd kernel module"
+}
diff --git a/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild b/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild
index ff3709388ddc..da34c6f647e7 100644
--- a/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild
+++ b/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild,v 1.5 2007/03/09 11:19:32 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild,v 1.6 2008/03/17 16:59:56 xmerlin Exp $
inherit eutils
@@ -29,8 +29,8 @@ S="${WORKDIR}/${MY_P}/${PN}"
src_unpack() {
unpack ${A}
- cd ${S}
- epatch ${WORKDIR}/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die
+ cd "${S}"
+ epatch "${WORKDIR}"/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die
}
src_compile() {
@@ -39,19 +39,19 @@ src_compile() {
}
src_install() {
- emake DESTDIR=${D} install || die "install problem"
+ emake DESTDIR="${D}" install || die "install problem"
- newinitd ${FILESDIR}/${PN}-client.rc ${PN}-client || die
- newinitd ${FILESDIR}/${PN}-srv.rc ${PN}-srv || die
+ newinitd "${FILESDIR}"/${PN}-client-1.0x.rc ${PN}-client || die
+ newinitd "${FILESDIR}"/${PN}-srv-1.0x.rc ${PN}-srv || die
- doconfd ${FILESDIR}/${PN}-client.conf || die
- doconfd ${FILESDIR}/${PN}-srv.conf || die
+ doconfd "${FILESDIR}"/${PN}-client-1.0x.conf || die
+ doconfd "${FILESDIR}"/${PN}-srv-1.0x.conf || die
insinto /etc
- doins ${FILESDIR}/gnbdtab
+ doins "${FILESDIR}"/gnbdtab
if $(has_version sys-fs/devfsd ) ; then
insinto /etc/devfs.d/
- newins ${FILESDIR}/gnbd.devfs gnbd
+ newins "${FILESDIR}"/gnbd.devfs gnbd
fi
}
diff --git a/sys-cluster/gnbd/gnbd-1.03.00.ebuild b/sys-cluster/gnbd/gnbd-1.03.00.ebuild
index acc8b81a921e..8bcb7ee64938 100644
--- a/sys-cluster/gnbd/gnbd-1.03.00.ebuild
+++ b/sys-cluster/gnbd/gnbd-1.03.00.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.03.00.ebuild,v 1.5 2007/05/12 13:32:43 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.03.00.ebuild,v 1.6 2008/03/17 16:59:56 xmerlin Exp $
CLUSTER_RELEASE="1.03.00"
MY_P="cluster-${CLUSTER_RELEASE}"
@@ -28,19 +28,19 @@ src_compile() {
}
src_install() {
- emake DESTDIR=${D} install || die "install problem"
+ emake DESTDIR="${D}" install || die "install problem"
- newinitd ${FILESDIR}/${PN}-client.rc ${PN}-client || die
- newinitd ${FILESDIR}/${PN}-srv.rc ${PN}-srv || die
+ newinitd "${FILESDIR}"/${PN}-client-1.0x.rc ${PN}-client || die
+ newinitd "${FILESDIR}"/${PN}-srv-1.0x.rc ${PN}-srv || die
- doconfd ${FILESDIR}/${PN}-client.conf || die
- doconfd ${FILESDIR}/${PN}-srv.conf || die
+ doconfd "${FILESDIR}"/${PN}-client-1.0x.conf || die
+ doconfd "${FILESDIR}"/${PN}-srv-1.0x.conf || die
insinto /etc
- doins ${FILESDIR}/gnbdtab
+ doins "${FILESDIR}"/gnbdtab
if $(has_version sys-fs/devfsd ) ; then
insinto /etc/devfs.d/
- newins ${FILESDIR}/gnbd.devfs gnbd
+ newins "${FILESDIR}"/gnbd.devfs gnbd
fi
}
diff --git a/sys-cluster/gnbd/gnbd-1.04.00.ebuild b/sys-cluster/gnbd/gnbd-1.04.00.ebuild
index 64b42940b590..b41c6ad7efa2 100644
--- a/sys-cluster/gnbd/gnbd-1.04.00.ebuild
+++ b/sys-cluster/gnbd/gnbd-1.04.00.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.04.00.ebuild,v 1.1 2007/03/09 11:19:32 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.04.00.ebuild,v 1.2 2008/03/17 16:59:56 xmerlin Exp $
CLUSTER_RELEASE="1.04.00"
MY_P="cluster-${CLUSTER_RELEASE}"
@@ -28,19 +28,19 @@ src_compile() {
}
src_install() {
- emake DESTDIR=${D} install || die "install problem"
+ emake DESTDIR="${D}" install || die "install problem"
- newinitd ${FILESDIR}/${PN}-client.rc ${PN}-client || die
- newinitd ${FILESDIR}/${PN}-srv.rc ${PN}-srv || die
+ newinitd "${FILESDIR}"/${PN}-client-1.0x.rc ${PN}-client || die
+ newinitd "${FILESDIR}"/${PN}-srv-1.0x.rc ${PN}-srv || die
- doconfd ${FILESDIR}/${PN}-client.conf || die
- doconfd ${FILESDIR}/${PN}-srv.conf || die
+ doconfd "${FILESDIR}"/${PN}-client-1.0x.conf || die
+ doconfd "${FILESDIR}"/${PN}-srv-1.0x.conf || die
insinto /etc
- doins ${FILESDIR}/gnbdtab
+ doins "${FILESDIR}"/gnbdtab
if $(has_version sys-fs/devfsd ) ; then
insinto /etc/devfs.d/
- newins ${FILESDIR}/gnbd.devfs gnbd
+ newins "${FILESDIR}"/gnbd.devfs gnbd
fi
}
diff --git a/sys-cluster/gnbd/gnbd-2.02.00.ebuild b/sys-cluster/gnbd/gnbd-2.02.00.ebuild
new file mode 100644
index 000000000000..3a4355457786
--- /dev/null
+++ b/sys-cluster/gnbd/gnbd-2.02.00.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-2.02.00.ebuild,v 1.1 2008/03/17 16:59:56 xmerlin Exp $
+
+inherit eutils versionator
+
+CLUSTER_RELEASE="${PV}"
+MY_P="cluster-${CLUSTER_RELEASE}"
+
+MAJ_PV="$(get_major_version)"
+MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
+
+DESCRIPTION="GFS Network Block Devices"
+HOMEPAGE="http://sources.redhat.com/cluster/"
+SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="=sys-cluster/cman-lib-${CLUSTER_RELEASE}*"
+DEPEND="${RDEPEND}"
+
+
+S="${WORKDIR}/${MY_P}/${PN}"
+
+src_compile() {
+ (cd "${WORKDIR}"/${MY_P};
+ ./configure \
+ --cc=$(tc-getCC) \
+ --cflags="-Wall" \
+ --disable_kernel_check \
+ --release_major="$MAJ_PV" \
+ --release_minor="$MIN_PV" \
+ --dlmlibdir=/usr/lib \
+ --dlmincdir=/usr/include \
+ --cmanlibdir=/usr/lib \
+ --cmanincdir=/usr/include \
+ ) || die "configure problem"
+
+ # fix the manual pages have executable bit
+ sed -i -e '
+ /\tinstall -d/s/install/& -m 0755/; t
+ /\tinstall/s/install/& -m 0644/' \
+ man/Makefile
+
+ emake clean all || die "compile problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install problem"
+
+ newinitd "${FILESDIR}"/${PN}-client-2.0x.rc ${PN}-client || die
+ newinitd "${FILESDIR}"/${PN}-srv-2.0x.rc ${PN}-srv || die
+
+ doconfd "${FILESDIR}"/${PN}-client-2.0x.conf || die
+ doconfd "${FILESDIR}"/${PN}-srv-2.0x.conf || die
+
+ insinto /etc
+ doins "${FILESDIR}"/gnbdtab
+
+ if $(has_version sys-fs/devfsd ) ; then
+ insinto /etc/devfs.d/
+ newins "${FILESDIR}"/gnbd.devfs gnbd
+ fi
+}