Index: openafs-kernel-1.6.1.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/net-fs/openafs-kernel/openafs-kernel-1.6.1.ebuild,v retrieving revision 1.1 diff -u -r1.1 openafs-kernel-1.6.1.ebuild --- openafs-kernel-1.6.1.ebuild 5 Apr 2012 00:20:48 -0000 1.1 +++ openafs-kernel-1.6.1.ebuild 8 Jul 2012 16:21:01 -0000 @@ -29,14 +29,20 @@ ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!" ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled" +QA_TEXTRELS_x86_fbsd="/boot/modules/libafs.ko" +QA_TEXTRELS_amd64_fbsd="/boot/modules/libafs.ko" + pkg_setup() { - linux-mod_pkg_setup + if use kernel_linux; then + linux-mod_pkg_setup + fi } src_prepare() { EPATCH_EXCLUDE="012_all_kbuild.patch" \ EPATCH_SUFFIX="patch" \ epatch "${WORKDIR}"/gentoo/patches + epatch "${FILESDIR}"/patch # packaging is f-ed up, so we can't run automake (i.e. eautoreconf) sed -i 's/^\(\s*\)a/\1ea/' regen.sh @@ -57,10 +63,25 @@ } src_install() { - MOD_SRCDIR=$(expr "${S}"/src/libafs/MODLOAD-*) - [ -f "${MOD_SRCDIR}"/libafs.${KV_OBJ} ] || die "Couldn't find compiled kernel module" + if use kernel_linux; then + MOD_SRCDIR=$(expr "${S}"/src/libafs/MODLOAD-*) + [ -f "${MOD_SRCDIR}"/libafs.${KV_OBJ} ] || die "Couldn't find compiled kernel module" + + MODULE_NAMES='libafs(fs/openafs:$MOD_SRCDIR)' + + linux-mod_src_install + elif use kernel_FreeBSD; then + insinto /boot/modules + doins "${S}"/src/libafs/MODLOAD/libafs.ko + fi +} - MODULE_NAMES='libafs(fs/openafs:$MOD_SRCDIR)' +pkg_postinst() { + # Update linker.hints file + use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules" +} - linux-mod_src_install +pkg_postrm() { + # Update linker.hints file + use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules" }