--- pvfs2-2.6.3.ebuild 2007-06-25 14:24:35.000000000 -0400 +++ pvfs2-2.6.3.ebuild_p 2007-06-25 14:24:12.000000000 -0400 @@ -16,7 +16,7 @@ virtual/linux-sources" SLOT="0" LICENSE="GPL-2" -KEYWORDS="~ppc ~x86 ~amd64" +KEYWORDS="~ppc ~x86 ~amd64 ~ppc64" S="${WORKDIR}/${MY_P}" #Without this, the make kmod_install in src_install() would fail. @@ -26,11 +26,11 @@ linux-mod_pkg_setup if kernel_is 2 4; then - BUILD_TARGETS="kmod24 all" + BUILD_TARGETS="kmod24" ECONF_PARAMS="--with-kernel24=${KV_DIR}" MODULE_NAMES="pvfs2(fs::src/kernel/linux-2.4)" else - BUILD_TARGETS="kmod all" + BUILD_TARGETS="kmod" ECONF_PARAMS="--with-kernel=${KV_DIR} --enable-verbose-build" MODULE_NAMES="pvfs2(fs::src/kernel/linux-2.6)" fi @@ -49,9 +49,16 @@ epatch "${FILESDIR}"/${PV}-link-librt-properly.patch epatch "${FILESDIR}"/${PV}-soname.patch epatch "${FILESDIR}"/${PV}-as-needed.patch - if kernel_is gt 2 6 20 ; then - epatch "${FILESDIR}"/${PV}-register_sysctl_table.patch - fi + + # Fix so we can install kernapps separate from kmod_install + sed -i '/^kmod_install: kmod/{ + s/\(kmod_install:.*kernapps\)\(.*\)/\1_install\2\n.PHONY: kernapps_install\nkernapps_install: kernapps/}' Makefile.in + sed -i '/^kmod24_install: kmod/{ + s/\(kmod24_install:.*kernapps\)\(.*\)/\1_install\2\n.PHONY: kernapps_install\nkernapps_install: kernapps/}' Makefile.in + + if kernel_is gt 2 6 20 ; then + epatch "${FILESDIR}"/${PV}-register_sysctl_table.patch + fi #This is needed when gcc doesn't support -Wno-pointer-sign. Now it will give us some warnings so it also removes -Werror. #It's unsafe, not recommended @@ -68,21 +75,17 @@ } src_compile() { - econf ${ECONF_PARAMS} || die "Unable to run econf ${ECONF_PARAMS}" - emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" ${LDFLAGS} ${BUILD_TARGETS} \ - || die "Unable to make ${BUILD_TARGETS}." + econf ${ECONF_PARAMS} || die "Unable to run econf ${ECONF_PARAMS}" + linux-mod_src_compile || die "Unable to linux-mod_src_compile" + emake all || die "Unable to make ${BUILD_TARGETS}." } src_install() { - #We don't use linux-mod_src_install because kmod_install also installs some other important files - if kernel_is 2 4; then - emake DESTDIR="${D}" kmod24_install || die "install failed" - else - emake DESTDIR="${D}" kmod_install || die "install failed" - fi + linux-mod_src_install || die "linux-mod_src_install failed" + emake DESTDIR="${D}" kernapps_install || die "kernapps_install failed" emake DESTDIR="${D}" install || die "install failed" newinitd "${FILESDIR}"/pvfs2-server.rc pvfs2-server - newconfd "${FILESDIR}"/pvfs2-server.conf pvfs2-server + newconfd "${FILESDIR}"/pvfs2-server.conf pvfs2-server dodoc AUTHORS CREDITS ChangeLog INSTALL README docinto examples dodoc examples/{fs.conf,pvfs2-server.rc,server.conf-localhost} @@ -100,8 +103,8 @@ pkg_postinst() { linux-mod_pkg_postinst - elog "To enable PVFS2 Server on boot you will have to add it to the" - elog "default profile, issue the following command as root to do so." - elog - elog "rc-update add pvfs2-server default" + elog "To enable PVFS2 Server on boot you will have to add it to the" + elog "default profile, issue the following command as root to do so." + elog + elog "rc-update add pvfs2-server default" }