diff options
Diffstat (limited to 'meta/recipes-kernel/kmod')
5 files changed, 140 insertions, 0 deletions
diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb new file mode 100644 index 000000000..96de8b8ef --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod-native_git.bb @@ -0,0 +1,14 @@ +# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +require kmod.inc +inherit native + +PR = "${INC_PR}.0" + +do_install_append (){ + for tool in depmod insmod lsmod modinfo modprobe rmmod + do + ln -s kmod ${D}${bindir}/$tool + done +} diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc new file mode 100644 index 000000000..5f655fd83 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod.inc @@ -0,0 +1,32 @@ +# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ + insert, remove, list, check properties, resolve dependencies and aliases." +HOMEPAGE = "http://packages.profusion.mobi/kmod/" +LICENSE = "GPL-2.0+ & LGPL-2.1+" +LICENSE_libkmod = "LGPL-2.1+" +SECTION = "base" +PV = "8" +INC_PR = "r0" +DEPENDS += "gnome-doc-utils-native" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + " +inherit autotools + +SRC_URI = "git://git.profusion.mobi/kmod.git;protocol=git;branch=master \ + file://depmod-search.conf \ + file://0001-man-disable-man-page-generation-because-we-don-t-hav.patch \ + " + +SRCREV = "819f79a24d58e3c8429f1631df2f8f85a2f95d4a" + +S = "${WORKDIR}/git" + +EXTRA_AUTORECONF += "--install --symlink" +EXTRA_OECONF +="--enable-debug --enable-logging --enable-tools" + +do_configure_prepend () { + gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make +} diff --git a/meta/recipes-kernel/kmod/kmod/0001-man-disable-man-page-generation-because-we-don-t-hav.patch b/meta/recipes-kernel/kmod/kmod/0001-man-disable-man-page-generation-because-we-don-t-hav.patch new file mode 100644 index 000000000..5361b847c --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/0001-man-disable-man-page-generation-because-we-don-t-hav.patch @@ -0,0 +1,26 @@ +From ce6f0cabb65e67dd4d31e1e555db8bc6eaf435d3 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Fri, 24 Feb 2012 07:35:38 +0100 +Subject: [PATCH] man: disable man page generation because we don't have + working xsltproc + +Upstream-Status: Inappropriate [build system specific change] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 141c102..a8bdfd1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . libkmod/docs man ++SUBDIRS = . libkmod/docs + + DISTCLEAN_LOCAL_HOOKS = + EXTRA_DIST = +-- +1.7.8.4 + diff --git a/meta/recipes-kernel/kmod/kmod/depmod-search.conf b/meta/recipes-kernel/kmod/kmod/depmod-search.conf new file mode 100644 index 000000000..527c0bb6e --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/depmod-search.conf @@ -0,0 +1,6 @@ +# +# /etc/depmod.d/depmod.conf +# + +search updates extramodules built-in + diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb new file mode 100644 index 000000000..fd38d8797 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod_git.bb @@ -0,0 +1,62 @@ +# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +require kmod.inc + +PR = "${INC_PR}.2" + +PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RCONFLICTS_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RREPLACES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" + +# to force user to remove old module-init-tools and replace them with kmod variants +RCONFLICTS_libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" + +# autotools set prefix to /usr, however we want them in /bin and /sbin +bindir = "${base_bindir}" +sbindir = "${base_sbindir}" +# libdir = "${base_libdir}" + +do_install_append () { + install -dm755 ${D}${base_bindir} + install -dm755 ${D}${base_sbindir} + # add symlinks to kmod + ln -s ..${base_bindir}/kmod ${D}${base_bindir}/lsmod.kmod + for tool in {ins,rm,dep}mod mod{info,probe}; do + ln -s ..${base_bindir}/kmod ${D}${base_sbindir}/${tool}.kmod + done + # configuration directories + install -dm755 ${D}${base_libdir}/depmod.d + install -dm755 ${D}${base_libdir}/modprobe.d + install -dm755 ${D}${sysconfdir}/depmod.d + install -dm755 ${D}${sysconfdir}/modprobe.d + + # install depmod.d file for search/ dir + install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf" +} + +pkg_postinst_kmod() { + for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do + bn=`basename $f` + update-alternatives --install /$f $bn /$f.kmod 60 + done + update-alternatives --install /bin/lsmod bin-lsmod /bin/lsmod.kmod 60 + update-alternatives --install /sbin/lsmod lsmod /bin/lsmod.kmod 60 + update-alternatives --install /sbin/depmod depmod /sbin/depmod.kmod 60 +} + +pkg_prerm_kmod() { + for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do + bn=`basename $f` + update-alternatives --remove $bn /$f.kmod + done + update-alternatives --remove bin-lsmod /bin/lsmod.kmod + update-alternatives --remove lsmod /bin/lsmod.kmod + update-alternatives --remove depmod /sbin/depmod.kmod +} + +PACKAGES =+ "libkmod" + +FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}" +FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d" |
