summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2008-05-07 19:32:32 +0000
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2008-05-07 19:32:32 +0000
commit303a2ec5460b37f90529888825e9ce6f664c0291 (patch)
tree662eb351905117176260ccbdfc4c5406873a7132 /net-misc/usbip/usbip-0.1.6.ebuild
parentmedia-gfx/textext: Added ~x86 support and inkscape dep. (diff)
downloadsunrise-303a2ec5460b37f90529888825e9ce6f664c0291.tar.gz
sunrise-303a2ec5460b37f90529888825e9ce6f664c0291.tar.bz2
sunrise-303a2ec5460b37f90529888825e9ce6f664c0291.zip
net-misc/usbip: Add ebuild for usbip from bug 220771
svn path=/sunrise/; revision=6173
Diffstat (limited to 'net-misc/usbip/usbip-0.1.6.ebuild')
-rw-r--r--net-misc/usbip/usbip-0.1.6.ebuild72
1 files changed, 72 insertions, 0 deletions
diff --git a/net-misc/usbip/usbip-0.1.6.ebuild b/net-misc/usbip/usbip-0.1.6.ebuild
new file mode 100644
index 000000000..dfd0833fa
--- /dev/null
+++ b/net-misc/usbip/usbip-0.1.6.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit autotools eutils linux-info linux-mod
+
+DESCRIPTION="A general USB device sharing system over IP networks"
+HOMEPAGE="http://usbip.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND=">=sys-fs/sysfsutils-2
+ sys-apps/tcp-wrappers
+ dev-libs/glib"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ >=sys-devel/automake-1.9
+ sys-devel/libtool"
+
+MODULE_NAMES="usbip(usbip:${S}/drivers/head:${S}/drivers/head) usbip_common_mod(usbip:${S}/drivers/head:${S}/drivers/head) vhci-hcd(usbip:${S}/drivers/head:${S}/drivers/head)"
+BUILD_PARAMS=""
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ if kernel_is lt 2 6 24
+ then
+ eerror "You need at least kernel 2.6.24"
+ die "Kernel too old"
+ fi
+
+ ebegin "Checking for CONFIG_USB enabled"
+ linux_chkconfig_present USB
+ eend $?
+ [[ $? -ne 0 ]] && die "USB is not enabled in the kernel."
+
+ if use debug
+ then
+ ebegin "Checking for CONFIG_USB_DEBUG enabled"
+ linux_chkconfig_present USB_DEBUG
+ eend $?
+ [[ $? -ne 0 ]] && die "USE=debug requires that USB debugging is enabled in the kernel."
+ BUILD_PARAMS+="DEBUG=y"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"/src
+ eautoreconf
+}
+
+src_compile() {
+ # compiling kernel modules
+ cd "${S}"/drivers/head
+ emake ARCH="$(tc-arch-kernel)" ${BUILD_PARAMS} || die "Compiling kernel modules failed"
+
+ # compiling userspace tools
+ cd "${S}"/src
+ econf
+ emake KSOURCE="${KV_DIR}" || die "Compiling userspace tools failed"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ cd "${S}"/src
+ emake DESTDIR="${D}" install || die "Installing userspace tools failed"
+ dodoc README* || die
+}